200 likes | 219 Views
Lecture 8. Processes and events Local and global states Time Causality and concurrent events Logical clocks Message delivery to processes Synchronous systems Asynchronous systems Monitoring models. Student presentation next week. Up to 5 minute presentations followed by discussions.
E N D
Lecture 8 • Processes and events • Local and global states • Time • Causality and concurrent events • Logical clocks • Message delivery to processes • Synchronous systems • Asynchronous systems • Monitoring models
Student presentation next week • Up to 5 minute presentations followed by discussions. • All presentations in Power Point • Format: • Title of project/research • Motivation (why is the problem important) • Background (who did what) • Specific objectives (what do you plan to do) • Literature • Each student will provide feedback about each presentation (grades - A, B, C, F- and comments).
Processes and Events • Event: change in the state of a process. • Local history • Distributed systems: multiple processes • Local events • Communication events • Space-time diagrams
Local and global states • The global state of distributed computation with n processes is an n-dimensional vector. • Global state (i,,j,k) of a computation with 3 processes means: • p1 has just experienced event i • p2 has just experienced event j • p3 has just experienced event k
Time • We need to measure time intervals • We need also the concept of global time. • Timestamps
Causality • Binary cause-effect relationship between events: • Local events: causality can be derived from local history • Communication events: a receive(m) is causally related to the send(m) • Transitivity. • Concurrent events: events in the global history that are not related by causality.
Logical clocks • LC(e) – the local variable associated with event e. • Each process timestamps a message sent m: TS(m) = LC(send(m)) • Rules to update the local clock: • LC(e) = LC + 1 local event or send(m) • LC(e) = max (LC, TS(m)+1) e=receive(m) • Logical clocks do not allow global ordering of events
Message delivery to processes • Delivery rules – how channels deliver messages to processes • FIFO delivery • Causal delivery extension of causal delivery when a process receives messages from multiple sources. Allows a process to reason about the entire system using only local information.
Synchronous systems • Delay is bounded. • Consensus is possible • Examples • Collision-free multiple access systems • Token rings • Multiple access systems based upon collision resolution protocols • FCFS algorithm of Gallagher • Stack algorithm
Asynchronous systems • No upper bounds on processing or communication delays. • Any algorithm for an asynchronous system can be used for a synchronous one but the opposite is not true. • RTT – round trip time for TCP.
Monitoring models • Monitor • Run total ordering of all events in the global history consistent with the local history of each process. • Cut. The frontier of a cut. • Consistent cut