Assignment 3

Due date: G1 11.05.2006, G2 18.05.2006)


Clock synchronization

Theoretical background will be given in the meetings of  04.05, and 11.05.

Consider a distributed system consisting of a number of computational nodes. All nodes are connected to a common communication bus, i.e. there can be a broadcast mechanism available. Assuming the local clock of each node may drift from an idealistic global time, each node has to adjust its clock accordingly so that all nodes in the system have the same notion of global time.

Requirements: Implement a clock synchronization mechanism using the local time of the PC as clock source and maintaining another logical clock as the global time. In order to simulate clock drifts you may introduce a small random offset in the value read from the local clock. The software (written in Java/C/C++/C#) should run on one or more PCs in order to illustrate the required behavior.
There is no specific requirement on the algorithm to use (ex. Berkeley or Christian algorithms or any other derivations).

Bonus points: Implementation on a real-time communication bus (such as RT-Ethernet) using RT-Linux or other RTOS.

Hints: IEEE1588 standard, NTP standard, Time-triggered systems.