Distributed Systems - Homework 1 - Fall 2006 | CS 425, Assignments of Computer Science

Material Type: Assignment; Class: Distributed Systems; Subject: Computer Science; University: University of Illinois - Urbana-Champaign; Term: Unknown 1989;

Typology: Assignments

Pre 2010

Uploaded on 03/16/2009

koofers-user-2mk
koofers-user-2mk 🇺🇸

10 documents

1 / 6

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CS 425: Distributed Systems Homework 1
Due date: June 30, 2006 by 11:59pm CST (Friday)
Problem 1 (Clock synchronization) Problem 10.4. A client attempts to synchronize with a timer server.
It records the round-trip times and timestamps returned by the server in the table below. Which of
these times should it use to set its clock? To what time should it set it? Estimate the accuracy of the
setting with respect to the server's clock. If it is known that the time between sending and receiving a
message in the system concerned is at least 8 ms, do your answers change?
Round trip (ms) Time (hr:min:sec)
22 10:54:23.674
25 10:54:25.450
20 10:54:28.342
Problem 2 (Network time protocol) An NTP server B receives server A's message at 18:34:45 bearing a
timestamp 18:34:13 and replies to it. Server A receives the message at 18:37:05, bearing B's timestamp
18:36:25. Estimate the offset, o i , between A's clock and B's clock and the accuracy of the estimate
(i.e., the error bound [-di/2, di/2]).
pf3
pf4
pf5

Partial preview of the text

Download Distributed Systems - Homework 1 - Fall 2006 | CS 425 and more Assignments Computer Science in PDF only on Docsity!

CS 425: Distributed Systems Homework 1

Due date: June 30, 2006 by 11:59pm CST (Friday)

Problem 1 (Clock synchronization) Problem 10.4. A client attempts to synchronize with a timer server. It records the round trip times and timestamps returned by the server in the table below. Which of these times should it use to set its clock? To what time should it set it? Estimate the accuracy of the setting with respect to the server's clock. If it is known that the time between sending and receiving a message in the system concerned is at least 8 ms, do your answers change? Round trip (ms) Time (hr:min:sec) 22 10:54:23. 25 10:54:25. 20 10:54:28. Problem 2 (Network time protocol) An NTP server B receives server A's message at 18:34:45 bearing a timestamp 18:34:13 and replies to it. Server A receives the message at 18:37:05, bearing B's timestamp 18:36:25. Estimate the offset, o i , between A's clock and B's clock and the accuracy of the estimate (i.e., the error bound [ di/2, di/2]).

Problem 3 (Virtual timestamp and ordered multicast) Consider Figure 1: Assume that the initial timestamp for processes P1 P3 is (0,0,0). Fill out the table below with the vector timestamp of each process at the end of execution. P P P

Problem 4 (Snapshot algorithm) The above scenario (Fig. 3) is a stage in the snapshot algorithm as discussed in class. Process p3 takes its state at e1 and initiates snapshot by sending markers to p1 and p2. Channel Cij stands for the message channel from p i to pj. Messages a, b, c, d, and e are regular messages, while messages marked as M are marker messages. Fill in the table below with the information about the global state as recorded by the algorithm. (i) Show the state of each process by the event when the state is recorded, e.g., the state of p2 is S2 = e2 ; and (ii) Depict on Fig. 3 the cut that corresponds to the (consistent) global state taken by this instance of the snapshot algorithm. Process State Channel states p1 C 21 = { }, C 31 = { } p2 C 12 = { }, C 32 = { } p3 S 3 = e^13 C 13 = { }, C 23 = { }

Problem 5 (Mutual Exclusion) Suppose the tree based mutual exclusion algorithm (i.e., Raymond's token based approach) is used for distributed mutual exclusion, and the 7 processes are arranged in the tree structure given in Fig. 4. Process 1 is initially the token holder. If events take place in the following order: (1) P5 makes a request, (2) P6 makes a request, (3) P2 makes a request, (4) P1 exits the critical section and releases the token, (5) P3 makes a request, (6) P5 exits the critical section and releases the token, and so on (assuming no more requests are made and the token is released to the requester as determined by the algorithm). Label in the following diagrams (ii) how each process updates its queue and (i) how the token is being passed, until all the requests have been served.