Ch 3 - Processes (Part 2) - VID

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/28

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 3:06 AM on 9/4/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

29 Terms

1
New cards

INTERPROCESS COMMUNICATION

Process within a system may be independent or cooperating

What is an independent process vs cooperating process?

knowt flashcard image
2
New cards

Reasons for cooperating processes: ?

knowt flashcard image
3
New cards

Cooperating processes need IPC.

what is IPC? are what are its models?

knowt flashcard image
4
New cards

INTERPROCESS COMMUNICATION

knowt flashcard image
5
New cards

COMMUNICATIONS MODELS

high level view of message passing and shared memor

knowt flashcard image
6
New cards

Metaphor for message passing and shared memory:

message passing : mailbox approach

shared memory: bulletin board


shared memory:

  • in case of shared memory, the processes share portion of the memory as a privately shared bulletin board where only process A and B can access themr

  • process A can read or write using the shared memory and so can process B

  • this way process A and B can communicate


message passing:

  • process cannot communicate directly

  • they need to write a message like a mail and put it in the mailbox (message queue in the operating system)

  • the message queue, will store and send and deliver the message to the recipient process


7
New cards

What are the pros and cons of message passing vs shared memory?

SHARED MEMORY PROS AND CONS:

  • shared memory is easy to use; process A and process B can both write and read in the shared memory area so its fast and easy to use

  • BUT because both process A and B can access anywhere in the shared memory, without proper control and careful management, the shared memory data may be corrupted or incorrect information used by the processes


MESSAGES PASSING PROS AND CONS:

  • with message passing, you don’t have to worry about the message content as long as they use the same agreed protocol. Process A and B can safely send and receive messages because all messages are delivered and handled by the operating system

  • HOWEVER, the message queue is a separate entity from process A and B as well as a regular schedule of the operating system so it means its slower than the shared memeory

  • process A has to send msg and wait for the operating system to deliver msg to process B

  • the message queue is maintained by the subsystem of the operating system

  • Relatively slow speed is the drawback of message passing


8
New cards

Producer-Consumer Problem

  • paradigm for cooperating processes, producer process produces information that is consumed by a consumer process


* What is unbounded-buffer and bounded-buffer ?


  • unbounded-buffer places no practical limit on the size of the buffer

  • bounded-buffer assumes there is a fixed buffer size


it’s a problem but also a design pattern


<ul><li><p>unbounded-buffer places no practical limit on the size of the buffer</p></li><li><p>bounded-buffer assumes there is a fixed buffer size</p></li></ul><p></p><p>it’s a problem but also a design pattern</p><p></p>
9
New cards
<p>Inter process Communication - Shared Memory</p>

Inter process Communication - Shared Memory

that was the shared memory solution

10
New cards

Interprocess Communication - Message Passing


What is the Message System?

Message System - processes communicate with each other without resorting to shared variables

11
New cards

Interprocess Communication - Message Passing


What is IPC and what two operations does the facility provide?

IPC facility provides two operations:

  • send(message)

  • receive(message)

the message size is either fixed or variable

12
New cards
<p>Interprocess Communication - Message Passing</p>

Interprocess Communication - Message Passing

this is the message passing solution

13
New cards
<p>Message Passing (Cont.)</p>

Message Passing (Cont.)

14
New cards
<p>Message Passing (Cont.)</p>

Message Passing (Cont.)

15
New cards

Direct Communication features

knowt flashcard image
16
New cards

Indirect Communication features

knowt flashcard image
17
New cards

Indirect Communication Operations and Primitives

knowt flashcard image
18
New cards

Indirect Communication

knowt flashcard image
19
New cards

Block vs non-blocking in Synchronization

knowt flashcard image
20
New cards

Buffering:

knowt flashcard image
21
New cards

Examples of IPC Systems - Windows

knowt flashcard image
22
New cards
<p>Communications in Client-Server Systems</p>

Communications in Client-Server Systems

23
New cards
<p>Sockets</p>

Sockets

24
New cards
<p>Remote Procedure Calls</p>

Remote Procedure Calls

25
New cards

Remote Procedure Calls (Cont.)

knowt flashcard image
26
New cards

Execution of RPC

knowt flashcard image
27
New cards

Pipes

knowt flashcard image
28
New cards

Ordinary Pipes

knowt flashcard image
29
New cards

Named Pipes

knowt flashcard image