24-Distributed_Systems_II_2spp

24-Distributed_Systems_II_2spp - CSE 421/521 - Operating...

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

View Full Document Right Arrow Icon
1 CSE 421/521 - Operating Systems Fall 2011 Tevfik Ko ş ar University at Buffalo November 29 th , 2011 Lecture - XXIV Distributed Systems - II Event Ordering Happened-before relation (denoted by ) If A and B are events in the same process (assuming sequential processes), 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 If two events A and B are not related by the relation, then these events are executed concurrently .
Background image of page 1

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

View Full DocumentRight Arrow Icon
Relative Time for Three Concurrent Processes Which events are concurrent and which ones are ordered? Distributed Mutual Exclusion (DME) • Assumptions The system consists of n processes; 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 2
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 After exiting its critical section, the process sends a release message to the coordinator and proceeds with its execution This scheme requires three messages per critical-section entry: request reply release DME: Fully Distributed Approach When process P i wants to enter its critical section, it generates a new timestamp, TS , and sends the message request ( P i , TS ) to all processes in the system When process P j receives a request message, it may reply immediately or it may defer sending a reply back When process P i receives a reply message from all other processes in the system, it can enter its critical section • After exiting its critical section, the process sends reply messages to all its deferred requests
Background image of page 3

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

View Full DocumentRight Arrow Icon
DME: Fully Distributed Approach (Cont.) The decision whether process P j replies immediately to a request ( P i , TS ) message or defers its reply is based on three factors: If P j is in its critical section, then it defers its reply to
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 13

24-Distributed_Systems_II_2spp - CSE 421/521 - Operating...

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