1. Clock Synchronization (15pts)
A distributed system with N nodes uses a Berkeley clock synchronization algorithm.. The communication time between nodes is 0.1sec. Modify the Berkeley algorithm to account for communication time, assuming node 0 acts the time daemon.
2. Mutual Exclusion (15)
A system with 4 processes (IDs 1 to 4) uses the distributed mutual exclusion algorithm (p. 324 in
the textbook). The logical clocks at these processes have values 4,9,6, and 5 (4 at process 1, etc).
Processes 2 and 3 request access to the resource at this point in time. Show the sequence of
messages exchanged and their logical clocks until the first process gains access to the resource.
3. Elections (15pts)
A system has 6 processes (1-6), but process 6 is not active. Process 5 crashes and process 4
notices this and initiates the election. Process 6 becomes active immediately after this. Show all
election messages and replies in this election when using the Bully algorithm. (Hint: processes
know the ids of all other processes in the system.)