Can a link be associated with more than 2 processes How many links can there be

Can a link be associated with more than 2 processes

This preview shows page 43 - 51 out of 56 pages.

How are links established? ± Can a link be associated with more than 2 processes? ± How many links can there be between every pair of communicating processes? ± What is the capacity of a link? ± Fixed or variable size messages? ± Unidirectional or bidirectional links? …….
Image of page 43
Direct Communication ° Sender and Receiver processes must name each other explicitly: ± send ( P , message ) - send a message to process P ± receive ( Q , message ) - receive a message from process Q Properties of communication link: ° ± Links are established automatically. ± A link is associated with exactly one pair of communicating processes. ± Exactly one link between each pair. ± Link may be unidirectional, usually bidirectional.
Image of page 44
Indirect Communication ° Messages are directed to and received from mailboxes (also called ports) ² Unique ID for every mailbox. ² Processes can communicate only if they share a mailbox. Send ( A , message ) /* send message to mailbox A */ Receive ( A , message ) /* receive message from mailbox A */ ° Properties of communication link ² Link established only if processes share a common mailbox. ² Link can be associated with many processes. ² Pair of processes may share several communication links ² Links may be unidirectional or bidirectional
Image of page 45
Indirect Communication using mailboxes
Image of page 46
Mailboxes (cont.) ° Operations ² create a new mailbox ² send/receive messages through mailbox ² destroy a mailbox ° Issue: Mailbox sharing P1, P2 and P3 share mailbox A. ² ² P1 sends message, P2 and P3 receive… who gets message?? ° Possible Solutions ² disallow links between more than 2 processes ² allow only one process at a time to execute receive operation ² allow system to arbitrarily select receiver and then notify sender.
Image of page 47
Message Buffering ° Link has some capacity - determine the number of messages that can reside temporarily in it. ° Queue of messages attached to link ± Zero-capacity Queues: 0 messages ² sender waits for receiver (synchronization is called rendezvous ) ± Bounded capacity Queues: Finite length of n messages ² sender waits if link is full ± Unbounded capacity Queues: Infinite queue length ² sender never waits
Image of page 48
Message Problems - Exception Conditions ± Process Termination ° Problem: P(sender) terminates, Q(receiver) blocks forever. ± Solutions: ² System terminates Q. ² System notifies Q that P has terminated. ² Q has an internal mechanism(timer) that determines how long to wait for a message from P. ° Problem: P(sender) sends message, Q(receiver) terminates. In automatic buffering, P sends message until buffer is full or forever. In no-buffering scheme, P blocks forever. ± Solutions: ² System notifies P ² System terminates P ² P and Q use acknowledgement with timeout
Image of page 49
Message Problems - Exception Conditions ° Lost Messages ² OS guarantees retransmission ² sender is responsible for detecting it using timeouts ² sender gets an exception Scrambled Messages ° ± Message arrives from sender P to receiver Q, but information in message is corrupted due to noise in communication channel.
Image of page 50
Image of page 51

You've reached the end of your free preview.

Want to read all 56 pages?

  • One '20

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors