Podcast
Questions and Answers
Which of the following is a property of a communication link that allows only one process at a time to execute a receive operation?
Which of the following is a property of a communication link that allows only one process at a time to execute a receive operation?
What is the purpose of allowing a link to be associated with at most two processes?
What is the purpose of allowing a link to be associated with at most two processes?
In the context of message passing, what is the purpose of notifying the sender about the receiver?
In the context of message passing, what is the purpose of notifying the sender about the receiver?
Which of the following is a primitive for indirect communication in message passing systems?
Which of the following is a primitive for indirect communication in message passing systems?
Signup and view all the answers
What is the purpose of the rendezvous mechanism in message passing?
What is the purpose of the rendezvous mechanism in message passing?
Signup and view all the answers
Which of the following is an example of indirect communication using shared memory in POSIX?
Which of the following is an example of indirect communication using shared memory in POSIX?
Signup and view all the answers
In the context of sockets, what is the purpose of a port number?
In the context of sockets, what is the purpose of a port number?
Signup and view all the answers
What is the purpose of stubs in remote procedure calls (RPC)?
What is the purpose of stubs in remote procedure calls (RPC)?
Signup and view all the answers
Which of the following is a characteristic of pipes in interprocess communication?
Which of the following is a characteristic of pipes in interprocess communication?
Signup and view all the answers
What is the purpose of the loopback IP address (127.0.0.1) in socket communication?
What is the purpose of the loopback IP address (127.0.0.1) in socket communication?
Signup and view all the answers
Study Notes
Interprocess Communication – Message Passing
- A mechanism is needed to allow user processes to synchronize their actions when accessing shared memory.
- Message passing is a mechanism for processes to communicate and synchronize their actions without using shared variables.
- The IPC facility provides two operations:
send(message)
andreceive(message)
. - The message size can be either fixed or variable.
Establishing Communication Links
- For processes P and Q to communicate, they need to establish a communication link between them.
- Implementation issues for establishing links include:
- How are links established?
- Can a link be associated with more than two processes?
- How many links can there be between every pair of communicating processes?
- What is the capacity of a link?
- Is the size of a message that the link can accommodate fixed or variable?
- Is a link unidirectional or bi-directional?
Implementation of Communication Links
- Physical implementation of communication link:
- Shared memory
- Hardware bus
- Network
- Logical implementation of communication link:
- Direct or indirect
- Synchronous or asynchronous
- Automatic or explicit buffering
Direct Communication
- Processes must name each other explicitly.
-
send(P, message)
sends a message to process P. -
receive(Q, message)
receives a message from process Q. - Properties of direct communication link:
- Links are established automatically.
- A link is associated with exactly one pair of communicating processes.
- Between each pair, there exists exactly one link.
- The link may be unidirectional, but is usually bi-directional.
Indirect Communication
- Messages are directed and received from mailboxes (also referred to as ports).
- Each mailbox has a unique id.
- Processes can communicate only if they share a mailbox.
- Properties of indirect communication link:
- Link established only if processes share a common mailbox.
- A link may be associated with many processes.
- Each pair of processes may share several communication links.
- Link may be unidirectional or bi-directional.
Indirect Communication Operations
- Operations in indirect communication:
- Create a new mailbox (port)
- Send and receive messages through mailbox
- Destroy a mailbox
- Primitives defined as:
-
send(A, message)
– send a message to mailbox A -
receive(A, message)
– receive a message from mailbox A
-
Mailbox Sharing
- Mailbox sharing example:
- P1, P2, and P3 share mailbox A
- P1 sends; P2 and P3 receive
- Who gets the message?
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Description
Test your knowledge on mechanisms for processes to communicate and synchronize their actions using interprocess communication (IPC) methods. This quiz covers topics such as message passing, sending and receiving messages between processes, and avoiding shared variables in communication.