java code lamport s mutual exclusion algorithm
#1

[Q.1] It is assumed that in Lamport’s Distributed Algorithm that all sites have equal priority and
therefore each site broadcasts its request to access critical section to all other sites. In this
question you have to improvise Lamport’s Distributed Mutual Exclusion Algorithm by prioritizing
the sites. Each site is assigned a unique integer number ‘n’ (>=1 and <=K where K is the
number of sites in the system) which duly represents the priority as well as the ID of the
process. The priority of site decreases with the increase in the value of ‘n’ [i.e. priority value ‘1’
means highest, ‘2’ means second highest and so on]. The algorithm designed by you should
fulfill the following requirements:
a. When there are simultaneous requests for the critical section, for multiple sites, then the
higher priority sites should be given preference over the lower priority sites subject to the
condition that lower priority sites should not starve for the critical section.
b. Any site can enter the critical section only after making a request for critical section.
c. The algorithm should be deadlock free.
Design the algorithm to satisfy above requirements. Before writing the algorithm, you have to
mention which data structure you are going to use and what is the role of each. Your algorithm
should have the following four sections:
1) Initialization
2) Requesting Critical Section
3) Executing Critical Section
4) Releasing Critical Section
Reply
#2

java code lamport s mutual exclusion algorithm

DAJ is an interactive, visual aid for studying distributed algorithms. Interactive, because you must explicitly specify every step of the interleaved execution sequence. Visual, because the state of the nodes is continuously displayed. Study aid, because they solve one of the most difficult problems encountered by students of these algorithms by automatically doing the necessary book-keeping. The program can create a log file of commands so that you can automatically replay scenarios until you understand them. Fourteen algorithms are current implemented, and you can implement other algorithms with only an elementary knowledge of Java. Visualizations are included for the virtual global structures contructed by some of the algorithms.

Lamport's bakery algorithm is a computer algorithm devised by computer scientist Leslie Lamport, which is intended to improve the safety in the usage of shared resources among multiple threads by means of mutual exclusion.

In computer science, it is common for multiple threads to simultaneously access the same resources. Data corruption can occur if two or more threads try to write into the same memory location, or if one thread reads a memory location before another has finished writing into it. Lamport's bakery algorithm is one of many mutual exclusion algorithms designed to prevent concurrent threads entering critical sections of code concurrently to eliminate the risk of data corruption.

Algorithms implemented

Byzantine generals algorithm for consensus (byzantine failures).
Byzantine generals algorithm for consensus (crash failures).
Byzantine generals algorithm for consensus by Berman and Garay (Algorithm 5.2 of Attiya and Welch).
EIGStop algorithm for consensus (Section 6.2.3 of Lynch).
Ricart-Agrawala algorithm for mutual exclusion.
Suzuki-Kasami algorithm for mutual exclusion.
Neilsen-Mizuno algorithm for mutual exclusion.
Lamport algorithm for mutual exclusion.
Maekawa algorithm for mutual exclusion.
Carvalho-Roucairol algorithm for mutual exclusion.
Dijkstra-Scholten algorithm for detecting termination.
Chandy-Lamport algorithm for global snapshots.
Huang algorithm for termination detection.
Mattern algorithm for termination detection.
Reply

Important Note..!

If you are not satisfied with above reply ,..Please

ASK HERE

So that we will collect data for you and will made reply to the request....OR try below "QUICK REPLY" box to add a reply to this page
Popular Searches: hardware support mutual exclusion, lamport algorithm java code, mutual information code source matlab, lamport s algo code, java code to implement lamport s law, ppt dual link failure resiliency through backup path mutual exclusion, lamport java,

[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Possibly Related Threads...
Thread Author Replies Views Last Post
  simple java rmi chat application source code 2 19,840 20-07-2018, 12:08 PM
Last Post: Guest
  free download source code for online movie ticket booking in java 2 19,284 15-08-2017, 03:21 PM
Last Post: Morshed
  source code for rsa encryption and decryption in java 2 8,226 29-05-2017, 04:21 PM
Last Post: Meghna Jadhav
  image encryption and decryption using rsa algorithm in matlab 2 8,120 29-05-2017, 04:17 PM
Last Post: Priyanka Bidikar
  source code for task scheduling using genetic algorithm using java 2 8,738 11-04-2017, 08:31 PM
Last Post: Guest
  vhdl code for radix 2 modified booth algorithm 4 1,045 04-04-2017, 10:24 AM
Last Post: Garlapati nikitha
  secure chat using RSA algorithm karthik1218 2 2,607 14-10-2016, 02:48 PM
Last Post: info togel
  f5 algorithm steganography matlab code 2 892 04-10-2016, 03:00 AM
Last Post: [email protected]
  color image segmentation using jseg algorithm in matlab code 2 890 29-09-2016, 12:07 PM
Last Post: Guest
  source code for suspicious email detection in java Parvesh.2595 2 1,071 23-08-2016, 04:05 PM
Last Post: seminar report asees

Forum Jump: