Lec11 - Computer Science Lecture 11, page CS677:...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Computer Science Lecture 11, page CS677: Distributed OS CS677: Distributed OS Last Class: Naming Naming Distributed naming DNS LDAP 1 CS677: Distributed OS Computer Science Lecture 11, page Today: Canonical Problems in Distributed Systems Time ordering and clock synchronization Leader election Mutual exclusion Distributed transactions Deadlock detection 2 CS677: Distributed OS Computer Science Lecture 11, page Clock Synchronization Time in unambiguous in centralized systems System clock keeps time, all entities use this for time Distributed systems: each node has own system clock Crystal-based clocks are less accurate (1 part in million) Problem: An event that occurred after another may be assigned an earlier time 3 CS677: Distributed OS Computer Science Lecture 11, page Physical Clocks: A Primer Accurate clocks are atomic oscillators (one part in 10 13 ) Most clocks are less accurate (e.g., mechanical watches) Computers use crystal-based blocks (one part in million) Results in clock drift How do you tell time? Use astronomical metrics (solar day) Coordinated universal time (UTC) international standard based on atomic time Add leap seconds to be consistent with astronomical time UTC broadcast on radio (satellite and earth) Receivers accurate to 0.1 10 ms Need to synchronize machines with a master or with one another 4 CS677: Distributed OS Computer Science Lecture 11, page Clock Synchronization Each clock has a maximum drift rate ! 1- ! <= dC/dt <= 1+ ! Two clocks may drift by 2 ! " t in time " t To limit drift to # => resynchronize every # / 2 ! seconds 5 CS677: Distributed OS Computer Science Lecture 11, page Cristian s Algorithm Synchronize machines to a time server with a UTC receiver Machine P requests time from server every # /2 ! seconds Receives time t from server, P sets clock to t+t reply where t reply is the time to send reply to P Use ( t req +t reply )/2 as an estimate of t reply Improve accuracy by making a series of measurements 6 CS677: Distributed OS Computer Science Lecture 11, page Berkeley Algorithm Used in systems without UTC receiver Keep clocks synchronized with one another One computer is master , other are slaves Master periodically polls slaves for their times Average times and return differences to slaves Communication delays compensated as in Cristians algo Failure of master => election of a new master 7 CS677: Distributed OS Computer Science Lecture 11, page Berkeley Algorithm...
View Full Document

Page1 / 15

Lec11 - Computer Science Lecture 11, page CS677:...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online