Open In App

Performance Metrics For Mutual Exclusion Algorithm

Improve
Improve
Like Article
Like
Save
Share
Report

Mutual exclusion is a program object that refers to the requirement of satisfying that no two concurrent processes are in a critical section at the same time. It is presented to intercept the race condition. If a current process is accessing the critical section then it prevents entering another concurrent process there. So, in a single word, just one process is permitted to execute the critical section at a given example of time.

Requirement of Mutual Exclusion

  1. No deadlock – Sites should not wait for infinite time for any kind of pending message that will not arrive.
  2. No Starvation – There should be a threshold that one site cannot execute a critical section repeatedly while another is waiting without executing the critical section.
  3. Fault Tolerance – It should automatically detect its own failure to continue functioning with next to no interruption.

There are three fundamental approaches for executing distributed mutual exclusion:

  1. Token-based methodology – In the token-based methodology, an exceptional token (otherwise called the PRIVILEGE message) is shared among the sites. A site is allowed to enter its critical section assuming it has the token and it proceeds to hold the token until the execution of the critical section is finished. Mutual exclusion is guaranteed because the token is unique. The algorithms in view of this approach basically differ in the manner a site sends out the quest for the token.
  2. Non-token-based methodology – In the non-token-based methodology, at least two progressive rounds of messages are exchanged among the sites to figure out which site will enter the critical section next. A site enters the critical section when a declaration, characterized by its local factors, becomes valid.
  3. Quorum-based methodology – In the quorum-based methodology, each site demands consent to execute the critical section from a subset of sites (called a quorum). The quorums are shaped so that when two sites simultaneously demand to enter the critical section, one site gets both the request and which is capable to ensure that just one request executes the critical section at a given time.

Performance Metrics for Mutual Exclusion

The criteria of performance of mutual exclusion in a distributed system are measured in the following methods:

1. Response time  

The interval of time when a request waits for the end of its critical section execution after its solicitation messages have been conveyed.

Response Time

Response Time

2. Synchronization Delay 

The time required for the next process to enter the critical section after a process leaves the critical section is known as Synchronization delay.

Synchronization Delay

Synchronization Delay

3. Message complexity 

The number of messages needed to execute each critical section by the process.

4. Throughput 

Throughput is the amount at which the system executes requests for the critical section.

Throughput = 1/(Synchronization delay + Avg Critical Section execution time)

5. Low and High Load Performance 

The amount of request that arrives for critical section execution denotes the load. If more than 1 request is present for the critical section then it is known as Low Load. If there is always a pending request then it is known as High Load. In heavy load conditions, after a request is executed, a site promptly starts activities to execute its next demand of Critical Section. A site is only occasionally in the inactive state in heavy load conditions. For some mutual exclusion algorithms, the performance metrics can be registered effectively under low and heavy loads through simple mathematical reasoning.

How Does Metric Affect the Performance of Mutual Exclusion?

For the most part, mutual exclusion algorithms have best and worst cases for the performance metrics. In the best case, winning circumstances are to such an extent that a performance metric achieves the best conceivable worth. For example, in most mutual exclusion algorithms the best worth of the reaction time is a round-trip message delay in addition to the critical section execution time, 2T + E. Frequently for mutual exclusion algorithms, the best and worst scenarios agree with low and high loads, individually.

For example, the best and worst of the reaction time are accomplished when the load is, separately, low and high; in a few mutual exclusion algorithms, the best and the worse message traffic is produced at low and heavy load conditions, separately.


Last Updated : 25 Feb, 2022
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads