Broadcast a mestamped request to all 2 upon receiving

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: (clock) with ini\al value of zero –  The counter is incremented by and assigned to each event, as its \mestamp. –  A send(message) event carries its \mestamp –  For a receive(message) event the counter is updated by Max(receiver.counter, message.\mestamp) + 1 Distributed Mutex: Coordina\on •  Five algorithms discussed •  None of the algorithms is perfect… Distributed Mutex: Coordina\on •  Safety - At most one process may execute in CS at any \me. –  No deadlock too. •  Liveness – Every request for a CS is eventually granted –  This is called progress. •  Fairness – Requests are granted in FIFO order and bounded wait Centralized Lock Server •  A central coordinator –  Grants permission to enter CS & –  keeps a queue of requests to enter the CS. •  Ensures only one thread at a \me can access the CS. Centralized Lock Server • To enter cri\cal sec\on: – send REQUEST to central server –wait for permission from server • To leave: – send RELEASE to central server • Server: – Has an internal queue of all REQUESTs it’s received but to which it hasn’t yet sent OK – Delays sending OK back to process un\l process is at head of queue Centralized Lock Server •  •  •  •  The lock server implementa\on in YFS Safety, liveness and order are guaranteed It takes 3 messages per entry/exit opera\on. Client delay: one round trip \me –  request + grant •  The coordinator becomes performance bo•leneck and single point of failure –  This is bad Token Ring Approach •  Processes are organized in a logical ring –  p(i) has a communica\on channel to p(i+1)mod N •  Opera\ons: –  Only the process holding the token can enter the CS. –  To exit the CS, the process sends the token onto its neighbor. If a process does not require to enter the CS when it receives the token, it forwards the token to the next neighbor. Token Ring Approach •  Safety & liveness are guaranteed, but ordering is not. •  Client delay –  0 to N message transmissions. A shared priority queue •  Each process i locally maintains Q(i) , part of a shared priority queue •  To run cri\cal sec\on, must have replies from all other processes AND be at the front of Q(i) •  When you...
View Full Document

This document was uploaded on 02/20/2014.

Ask a homework question - tutors are online