KEMBAR78
Lamport’s algorithm for mutual exclusion | PPT
LAMPORT’S  ALGORITHM BY Neelamani Samal
What is Lamport’s Algorithm It is a computer algorithm Intended to improve the safety in the usage of shared resources   Using  mutual exclusion.
Related Terms Mutual exclusion Types of mutual exclusion algorithm Critical Section(C.S.) Logical Clock Causal Ordering Of Messages
Algorithm Every site  Si keeps a  request_queuei,  contains mutual exclusion requests ordered by their timestamps  messages to be delivered in the FIFO order between every pair of sites
System Models Requesting The C.S. Executing The C.S. Releasing The  C.S. `
Example We have S1,S2,S3 as sites S1,S2 request for CS S2 Being first
(2,1) S1 S2 S3 (1,2) S1,S2 making requesr for entering CS
(1,2),(2,1) S1 S2 S3 (1,2) (2,1) Site S2  enters CS (1,2) (1,2),(2,1) (1,2),(2,1) S2 enters CS
S1 S2 S3 (1,2) (2,1) Site S2 exitsCS and release message (1,2) (1,2),(2,1) (1,2),(2,1) (1,2),(2,1) S2 exits CS
(2,1) S1 S2 S3 (1,2) (2,1) Site S1 entersCS (1,2) (1,2),(2,1) (1,2),(2,1) (1,2),(2,1) S1enters CS (2,1)
Performance Analysis Total No. of REQUEST  (N-1) Total No. Of REPLY  (N-1) Total No. Of RELEASE  (N-1) Total  =  3(N-1)
Conclusion Though it does not explain the Modern scenario of distributed systems but , it gave the basic of developing the  present way of handling distributed resources.
 

Lamport’s algorithm for mutual exclusion

  • 1.
    LAMPORT’S ALGORITHMBY Neelamani Samal
  • 2.
    What is Lamport’sAlgorithm It is a computer algorithm Intended to improve the safety in the usage of shared resources   Using mutual exclusion.
  • 3.
    Related Terms Mutualexclusion Types of mutual exclusion algorithm Critical Section(C.S.) Logical Clock Causal Ordering Of Messages
  • 4.
    Algorithm Every site Si keeps a request_queuei, contains mutual exclusion requests ordered by their timestamps messages to be delivered in the FIFO order between every pair of sites
  • 5.
    System Models RequestingThe C.S. Executing The C.S. Releasing The C.S. `
  • 6.
    Example We haveS1,S2,S3 as sites S1,S2 request for CS S2 Being first
  • 7.
    (2,1) S1 S2S3 (1,2) S1,S2 making requesr for entering CS
  • 8.
    (1,2),(2,1) S1 S2S3 (1,2) (2,1) Site S2 enters CS (1,2) (1,2),(2,1) (1,2),(2,1) S2 enters CS
  • 9.
    S1 S2 S3(1,2) (2,1) Site S2 exitsCS and release message (1,2) (1,2),(2,1) (1,2),(2,1) (1,2),(2,1) S2 exits CS
  • 10.
    (2,1) S1 S2S3 (1,2) (2,1) Site S1 entersCS (1,2) (1,2),(2,1) (1,2),(2,1) (1,2),(2,1) S1enters CS (2,1)
  • 11.
    Performance Analysis TotalNo. of REQUEST (N-1) Total No. Of REPLY (N-1) Total No. Of RELEASE (N-1) Total = 3(N-1)
  • 12.
    Conclusion Though itdoes not explain the Modern scenario of distributed systems but , it gave the basic of developing the present way of handling distributed resources.
  • 13.