TokenRing Distributed Mutual Exclusion Distributed Systems 2g1509 - PowerPoint PPT Presentation

1 / 5
About This Presentation
Title:

TokenRing Distributed Mutual Exclusion Distributed Systems 2g1509

Description:

... token (special message) is regularly passed around on the ring ... Distributed ME Token-Ring [3/4] Each process. Upon receipt of the token message a process: ... – PowerPoint PPT presentation

Number of Views:302
Avg rating:3.0/5.0
Slides: 6
Provided by: ali1159
Category:

less

Transcript and Presenter's Notes

Title: TokenRing Distributed Mutual Exclusion Distributed Systems 2g1509


1
Token-Ring Distributed Mutual Exclusion
Distributed Systems 2g1509
  • Ali Ghodsi aligh_at_imit.kth.se

2
Distributed ME Token-Ring 1/4
  • Idea
  • Form a logical ring of processes
  • Let a logical token (special message) is
    regularly passed around on the ring
  • Initially p1 has the token
  • A process is only allowed to enter the critical
    section iff it has the token

3
Distributed ME Token-Ring 2/4
  • Bootstrapping
  • Assign numbers 1..n to each process
  • Form a logical ring of n processes
  • Process i is connected to its successor process
    i1, where 1 i n-1
  • Process n is connected to its successor process
    1
  • Process 1 starts by sending a token message to
    process 2

4
Distributed ME Token-Ring 3/4
  • Each process
  • Upon receipt of the token message a process
  • enters the critical section if needed and after
    it exists the critical section, it sends the
    token message to its successor
  • if it does not need to enter the critical section
    it simply passes the token to its successor

5
Distributed ME Token-Ring 4/4
  • Advantages
  • Simple
  • Decentralized (not bottlenecks)
  • No starvation
  • Disadvantages
  • Lost token/duplicate tokens!
  • Not fair (not serving FIFO)
  • Many messages sent, even if no process wants to
    enter the critical section
Write a Comment
User Comments (0)
About PowerShow.com