6elec7mutex - Mutual Exclusion System involving multiple...

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

View Full Document Right Arrow Icon
Mutual Exclusion System involving multiple processes are often most easily programmed using critical regions. When a process has to read or update certain shared data structures, it first enters a critical region to achieve mutual exclusion and ensure that no more than one process can use the shared data structure at the same time. In single-processor system, critical regions are protected using semaphores, monitors, and similar constructs. In a distributed systems, mutual exclusion can be enforced by the following methods: A Centralized Algorithm A Distributed Algorithm A Token Ring Algorithm We will study each of these algorithms and do a comparison among them.
Background image of page 1

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

View Full DocumentRight Arrow Icon
A Centralized Algorithm One process is elected to be the co-ordinator -- For example, the process that bears with the highest network address. When a process wants to enter a critical region, it sends a request message to the co- ordinator stating which critical region it wants to enter. If no other process is currently in that CR, the co-ordinator sends back a reply granting the permission. When the reply arrives, the requesting process enters the CR. If some other process is already inside the CR, the co-ordinator will queue the request and either send a “permission denied” message back or no reply at all. When a process exits the CR, it sends a message to the co-ordinator releasing its exclusive access. The co-ordinator will then takes the first item off the queue of deferred requests and sends that process a grant message. If the process is still blocked, it enters the CR. If an “denied” message has been sent, the process will have to poll for incoming traffic. Either way, upon receiving the grant, it enters the CR. Disadvantages: single point of failure, cannot distinguish a dead co-ordinator from a
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 09/17/2009 for the course IT it771 taught by Professor Jenisha during the Fall '09 term at University of Advancing Technology.

Page1 / 8

6elec7mutex - Mutual Exclusion System involving multiple...

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

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