Summary of 1/28/97 Operating Systems Class

Differences between Monitors/Serializers and CSP/ADA

Monitor/Serializer CSP/Ada
The called procedure begins executing right away. It waits if the object is not in a proper state. The call is only accepted by the called procedure if certain conditions are satisfied.
Passive synchronization. Synchronization between active threads.
Inherently non-distributed. Possibility for distributed programming using synchronous message passing.

CSP: Communicating Sequential Processes

CSP Commands

CSP Example: Bounded Buffer Problem

buffer: (0..9) portion;
in, out: integer; in := 0; out := 0;

* [ in < out + 10; producer?buffer(in mod 10)
    --> in := in + 1;
    []
    out < in; consumer?more()
    --> consumer!buffer(out mod 10);
        out := out + 1;
]

Ada


Cara Cocking