1 / 5

Why Contexts?

Why Contexts?. Parallel libraries require isolation of messages from one another and from the user that cannot be adequately handled by tags. The following examples are due to Marc Snir. Sub1 and Sub2 are from different libraries Sub1(); Sub2(); Sub1a and Sub1b are from the same library

tania
Download Presentation

Why Contexts?

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Why Contexts? • Parallel libraries require isolation of messages from one another and from the user that cannot be adequately handled by tags. • The following examples are due to Marc Snir. • Sub1 and Sub2 are from different libraries Sub1(); Sub2(); • Sub1a and Sub1b are from the same library Sub1a(); Sub2(); Sub1b();

  2. Process 0 Process 1 Process 2 Recv(any) Send(1) Sub1 Recv(any) Send(0) Recv(1) Send(0) Sub2 Recv(2) Send(1) Send(2) Recv(0) Correct Execution of Library Calls

  3. Recv(1) Send(2) Incorrect Execution of Library Calls Process 0 Process 1 Process 2 Recv(any) Send(1) Sub1 Recv(any) Send(0) Send(0) ? Sub2 Recv(2) Send(1) Recv(0) Program hangs (Recv(1) never satisfied)

  4. Recv(any) Send(1) Sub1a Send(0) Recv(2) Send(0) Send(2) Recv(1) Sub2 Send(1) Recv(0) Recv(any) Sub1b Correct Execution of Library Calls with Pending Communication

  5. Recv(any) Send(1) Sub1a Send(0) Recv(2) Send(0) Send(2) Recv(1) Sub2 Send(1) Recv(0) Recv(any) Sub1b Incorrect Execution of Library Calls with Pending Communication Program Runs—but with wrong data!

More Related