ch18 - Chapter 18: Distributed Coordination Chapter Adapted...

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

View Full Document Right Arrow Icon
Chapter 18: Distributed Coordination Chapter 18: Distributed Coordination Adapted to COP4610 by Robert van Engelen
Background image of page 1

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

View Full DocumentRight Arrow Icon
18.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Apr 11, 2005 Event Ordering Event Ordering Happened-before relation (denoted by ) defined by: If A and B are events in the same process, and A was executed before B , then A B If A is the event of sending a message by one process and B is the event of receiving that message by another process, then A B If A B and B C then A C
Background image of page 2
18.3 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Apr 11, 2005 Relative Time for Three Concurrent Processes Relative Time for Three Concurrent Processes
Background image of page 3

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

View Full DocumentRight Arrow Icon
18.4 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Apr 11, 2005 Implementation of Implementation of Associate a timestamp with each system event Require that for every pair of events A and B , if A B , then the timestamp of A is less than the timestamp of B Within each process P i a logical clock , LC i is associated The logical clock can be implemented as a simple counter that is incremented between any two successive events executed within a process The logical clock is monotonically increasing
Background image of page 4
18.5 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Apr 11, 2005 Implementation of Implementation of (cont.) (cont.) Associate a timestamp with each system event A process advances its logical clock when it receives a message whose timestamp is greater than the current value of its logical clock If the timestamps of two events A and B are the same, then the events are concurrent We may use the process identity numbers to break ties and to create a total ordering
Background image of page 5

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

View Full DocumentRight Arrow Icon
18.6 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Apr 11, 2005 Distributed Mutual Exclusion (DME) Distributed Mutual Exclusion (DME) Assumptions The system consists of n processes, where each process P i resides at a different processor Each process has a critical section that requires mutual exclusion Requirement If P i is executing in its critical section, then no other process P j is executing in its critical section We present two algorithms to ensure the mutual exclusion execution of processes in their critical sections
Background image of page 6
18.7 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Apr 11, 2005 DME: Centralized Approach DME: Centralized Approach One of the processes in the system is chosen to coordinate the entry to the critical section A process that wants to enter its critical section sends a request message to the coordinator The coordinator decides which process can enter the critical section next, and its sends that process a reply message When the process receives a reply message from the coordinator, it enters its critical section
Background image of page 7

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

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

Page1 / 54

ch18 - Chapter 18: Distributed Coordination Chapter Adapted...

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

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