Your SlideShare is downloading. ×
0
Lamport’s algorithm for mutual exclusion
Lamport’s algorithm for mutual exclusion
Lamport’s algorithm for mutual exclusion
Lamport’s algorithm for mutual exclusion
Lamport’s algorithm for mutual exclusion
Lamport’s algorithm for mutual exclusion
Lamport’s algorithm for mutual exclusion
Lamport’s algorithm for mutual exclusion
Lamport’s algorithm for mutual exclusion
Lamport’s algorithm for mutual exclusion
Lamport’s algorithm for mutual exclusion
Lamport’s algorithm for mutual exclusion
Lamport’s algorithm for mutual exclusion
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Lamport’s algorithm for mutual exclusion

11,862

Published on

The slide deals with the basic working principle of Lamport's algorithm.It explains the details with example

The slide deals with the basic working principle of Lamport's algorithm.It explains the details with example

1 Comment
2 Likes
Statistics
Notes
No Downloads
Views
Total Views
11,862
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
264
Comments
1
Likes
2
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. LAMPORT’S ALGORITHM BY Neelamani Samal
  • 2. What is Lamport’s Algorithm <ul><li>It is a computer algorithm </li></ul><ul><li>Intended to improve the safety in the usage of shared resources </li></ul><ul><li>  Using mutual exclusion. </li></ul>
  • 3. Related Terms <ul><li>Mutual exclusion </li></ul><ul><li>Types of mutual exclusion algorithm </li></ul><ul><li>Critical Section(C.S.) </li></ul><ul><li>Logical Clock </li></ul><ul><li>Causal Ordering Of Messages </li></ul>
  • 4. Algorithm <ul><li>Every site Si keeps a request_queuei, </li></ul><ul><li>contains mutual exclusion requests ordered by their timestamps </li></ul><ul><li>messages to be delivered in the FIFO order between every pair of sites </li></ul>
  • 5. System Models <ul><li>Requesting The C.S. </li></ul><ul><li>Executing The C.S. </li></ul><ul><li>Releasing The C.S. ` </li></ul>
  • 6. Example <ul><li>We have S1,S2,S3 as sites </li></ul><ul><li>S1,S2 request for CS </li></ul><ul><li>S2 Being first </li></ul>
  • 7. <ul><li>(2,1) </li></ul>S1 S2 S3 (1,2) S1,S2 making requesr for entering CS
  • 8. <ul><li>(1,2),(2,1) </li></ul>S1 S2 S3 (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. <ul><li>(2,1) </li></ul>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)
  • 11. Performance Analysis <ul><li>Total No. of REQUEST (N-1) </li></ul><ul><li>Total No. Of REPLY (N-1) </li></ul><ul><li>Total No. Of RELEASE (N-1) </li></ul><ul><li>Total = 3(N-1) </li></ul>
  • 12. 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.
  • 13.  

×