Concurrent Programming (19530-V)

Dr. Richard S. Hall WS 01/02

- Übung 2 -

Assigned: 30.10.2001
Due: 6.11.2001

1.  Exercise

The client/server system presented in the lecture is described here:

CLIENT = (call->wait->continue->CLIENT).
SERVER = (request->service->reply->SERVER).
||CLIENT_SERVER = (CLIENT || SERVER) /{call/request,reply/wait}.

Modify this system so that more than one client can use the server; this does not imply that the server can accept multiple requests at the same time, rather it services one request at a time from any one of multiple clients.

2.  Exercise

Show that the processes, S1 and S2, below describe the same behavior.

P = (a->b->P).
Q = (c->b->Q).
||S1 = (P || Q).

S2 = (a->c->b->S2 | c->a->b->S2).

3.  Exercise

A museum allows N visitors to enter through the east entrace and leave through its west entrance.  Arrivals and departures are signaled to the museum controller by the turnstiles at the entrance and exit, respectively.  At opening time, the museum director signals to the controller that the museum is open and then the controller permits both arrivals and departures. At closing time, the director signals that the museum is closing, at which point only departures are permitted by the controller. The museum is locked once everyone has left.  Given that the system consists of the four processes EAST, WEST, DIRECTOR, and CONTROL, provide an FSP description for each of the processes and the overall composition.