Chapter9 - Chapter 9 Distributed Mutual Exclusion...

Info iconThis preview shows pages 1–6. 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

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: Chapter 9: Distributed Mutual Exclusion Algorithms Ajay Kshemkalyani and Mukesh Singhal Distributed Computing: Principles, Algorithms, and Systems Cambridge University Press A. Kshemkalyani and M. Singhal (Distributed Computing) Distributed Mutual Exclusion Algorithms CUP 2008 1 / 93 Distributed Computing: Principles, Algorithms, and Systems Introduction Mutual exclusion: Concurrent access of processes to a shared resource or data is executed in mutually exclusive manner. Only one process is allowed to execute the critical section (CS) at any given time. In a distributed system, shared variables (semaphores) or a local kernel cannot be used to implement mutual exclusion. Message passing is the sole means for implementing distributed mutual exclusion. A. Kshemkalyani and M. Singhal (Distributed Computing) Distributed Mutual Exclusion Algorithms 2 / 93 Distributed Computing: Principles, Algorithms, and Systems Introduction Distributed mutual exclusion algorithms must deal with unpredictable message delays and incomplete knowledge of the system state. Three basic approaches for distributed mutual exclusion: 1 Token based approach 2 Non-token based approach 3 Quorum based approach Token-based approach: ◮ A unique token is shared among the sites. ◮ A site is allowed to enter its CS if it possesses the token. ◮ Mutual exclusion is ensured because the token is unique. A. Kshemkalyani and M. Singhal (Distributed Computing) Distributed Mutual Exclusion Algorithms 3 / 93 Distributed Computing: Principles, Algorithms, and Systems Introduction Non-token based approach: ◮ Two or more successive rounds of messages are exchanged among the sites to determine which site will enter the CS next. Quorum based approach: ◮ Each site requests permission to execute the CS from a subset of sites (called a quorum). ◮ Any two quorums contain a common site. ◮ This common site is responsible to make sure that only one request executes the CS at any time. A. Kshemkalyani and M. Singhal (Distributed Computing) Distributed Mutual Exclusion Algorithms 4 / 93 Distributed Computing: Principles, Algorithms, and Systems Preliminaries System Model The system consists of N sites, S 1 , S 2 , ..., S N . We assume that a single process is running on each site. The process at site S i is denoted by p i . A site can be in one of the following three states: requesting the CS, executing the CS, or neither requesting nor executing the CS (i.e., idle). In the ‘requesting the CS’ state, the site is blocked and can not make further requests for the CS. In the ‘idle’ state, the site is executing outside the CS. In token-based algorithms, a site can also be in a state where a site holding the token is executing outside the CS (called the idle token state)....
View Full Document

Page1 / 93

Chapter9 - Chapter 9 Distributed Mutual Exclusion...

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

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