Distributed Systems Assignment
Distributed Systems Assignment
Members:
Discuss the features of the following non-token-based algorithms and compare and contrast their
performance metrics against the indicated metrics of mutual exclusion performance threshold.
1. Lampost
2. Ricost-Agrawala
3. Maekawa
4. Suzuki- Kasami
Maximum throughput
Several processes can use a shared resource concurrently thanks to the non-token-based
MEPT method. If a process is permitted to enter the crucial part or not is decided using a
performance threshold. Once the performance barrier is reached, a process can immediately go
on to the crucial portion. If not, the procedure must wait until the threshold is reached.
Performance Metrics.
Minimum synchronization delay: This is not applicable to MEPT since it does not require
synchronization.
Response Time.
Minimum response time: The response time of MEPT is determined by the performance
threshold. If the threshold is met, a process can enter the critical section immediately,
resulting in a low response time.
Maximum average response time: The average response time of MEPT can be high if the
performance threshold is not met, causing processes to wait before entering the critical
section.
Lampost Algorithm.
Lampost is a non-token-based algorithm that uses a shared variable to control access to the
critical section. A process can enter the critical section only if the shared variable is set to its
process ID. If the shared variable is not set to the process ID, the process must wait until it
becomes available.
Performance Metrics:
Minimum synchronization delay: Lampost has a low synchronization delay since it only
requires access to a shared variable.
Maximum throughput: Lampost can achieve a moderate throughput since only one
process can enter the critical section at a time.
Response Time.
Minimum response time: The response time of Lampost is low if a process has the shared
variable set to its process ID, allowing it to enter the critical section immediately.
Maximum average response time: The average response time of Lampost can be high if
many processes are waiting for the shared variable to become available.
Ricart-Agrawala Algorithm.
Performance Metrics.
Response Time.
Minimum response time: The response time of Ricart-Agrawala can be high since it
requires all processes to agree before a process can enter the critical section.
Maximum average response time: The average response time of Ricart-Agrawala can be
high if many processes are waiting for permission to enter the critical section.
Maekawa Algorithm.
Maximum throughput: Maekawa can achieve a high throughput since it allows multiple
processes to access the critical section simultaneously.
Response Time.
Minimum response time: The response time of Maekawa can be relatively low if a
process receives votes from the required number of processes in the subset and can enter
the critical section immediately.
i. Each process maintains a logical clock that is incremented each time the process
sends a request to enter the critical section.
ii. When a process wants to enter the critical section, it sends a request message to all
other processes, along with its current logical clock value.
iii. When a process receives a request message, it updates its own logical clock to be
greater than or equal to the maximum of its current clock value and the clock value
received in the request message, and then sends a reply message back to the
requesting process with its updated clock value.
iv. A process can enter the critical section once it has received reply messages from all
other processes and its request has the lowest logical clock value.
Performance Metrics.
Response Time.
Minimum response time: The response time of the Suzuki-Kasami algorithm can be low
if a process has a sufficiently different logical clock value from the other processes,
allowing it to enter the critical section immediately.
Maximum average response time: The average response time of the Suzuki-Kasami
algorithm can be high if many processes have similar logical clock values and are waiting
to enter the critical section. However, this can be mitigated by adjusting the logical clock
values to ensure greater differentiation among processes.