Lec 06 MutualExclusion PDF
Lec 06 MutualExclusion PDF
Pallab Dasgupta
Dept. of Computer Sc. & Engg.,
Indian Institute of Technology Kharagpur
• Requirements:
– at most one process in critical section (safety)
– if more than one requesting process, someone enters
(liveness)
– a requesting process enters within a finite time (no
starvation)
– requests are granted in order (fairness)
• Token based
– ex. Suzuki-Kasami
• Main Idea:
– node j need not send a REPLY to node i if j has a request
with timestamp lower than the request of i (since i cannot
enter before j anyway in this case)
• Main idea
– Once i has received a REPLY from j, it does not need
to send a REQUEST to j again unless it sends a
REPLY to j (in response to a REQUEST from j)
• Requirements:
– for all i, j: Ri ∩ Rj ≠ Φ
– for all i: i Є Ri
– for all i: |Ri| = K, for some K
– any node i is contained in exactly D Request Sets, for some D
• Synchronization delay =
– 2*(max message transmission time)
• Issues:
• No. of messages:
– 0 if node holds the token already, n otherwise
• Synchronization delay:
– 0 (node has the token) or max. message delay (token is
elsewhere)
• No starvation