An algorithm for k-mutual exclusion in decentralized systems
Introduction
The distributed k-mutual exclusion problem or, simply the k-mutex problem, is the problem of allowing at most k processes to access their critical sections simultaneously. This might be the case where k identical copies of a resource are made available in the distributed system or that the resource by its nature can be accessed by at most k processes simultaneously.
Consider an Ethernet local area network with many computers, executing various applications, connected to it. A k-mutual exclusion algorithm may be used to allocate bandwidth to the various processes desirous of using the network. The bandwidth may be considered the shared resource and the program segment in which a program sends data over the network is considered the critical section. Another simple example is a distributed database which allows at most k processes to access data from a common section of the data base. Each process requires exclusive access to the shared resource.
Mutual exclusion requires that a process be given exclusive access to a shared resource. The section of code which allows for such exclusive access is called the critical section. In the kmutex problem there may be more than one instance of a resource in the network, or the resource may allow multiple accesses simultaneously. When a process enters it critical section such that there are l ⩽ k processes in their critical sections, there is no interference in the mutual exclusion condition since no two processes will access the same resource simultaneously.
Section snippets
Previous work
Several k-mutual exclusion algorithms have been developed over the past decade and reported in the literature [1], [2], [4], [7], [8], [9], [10], [11], [12], [14], [15], [16], [17], [18], [19], [20], [21], [23], [24], [25]. Quorum-based group mutual exclusion [3], [13], [26] and mutual exclusion for mobile ad hoc networks [6] have been the focus of some recent investigations.
The k-mutual exclusion algorithms may be categorized as permission-based algorithms and token-based algorithms. Raymond
The proposed algorithm
The following is an algorithm for the k-mutual exclusion problem which is an extension of the algorithm in [5].
Correctness proof
Lemma 1 Algorithm KMutex guarantees mutual exclusion. Proof Mutual exclusion obtains when a process has exclusive access to a shared resource. Algorithm KMutex guarantees mutual exclusion, by requiring that, for access to the shared resource, a process must acquire a non-sharable indivisible token. □ Lemma 2 Algorithm KMutex guarantees k mutual exclusion. Proof Given k tokens, which can be used exclusively, provides a guarantee of k mutual exclusion. It is shown that there can be at most k tokens in the systems and hence k
Message complexity
Consider the system under light load, with very few requests for the critical section. Assume that the request for the critical section by one node is satisfied before another node generates a new request. In the best case, the requesting node will be the GRC which can enter the critical section without delay. In this case no messages are generated. In the worst case the requesting node will be a local node in a group which does not posses the token. Two request messages will be sent: one to
Simulation results
The graphs below provide the simulation results of Algorithm KMutex. The graphs of Fig. 2a–d show the number of Messages per Critical Section (Messages/CS) for various load levels (5%, 20%, 50%, and 70%) with k ∈ 0 {1, 2, 4, 8}, respectively. It is noted that in each case, the graph asymptotically approaches a value of 2 messages per critical section entry as the number of nodes gets large. This reflects the theoretically expected value given in Section 5. The worst case performance is observed
Fault tolerance
We now propose a mechanism to make the algorithm KMutex tolerant to node and link failures. We also make provision for the loss of messages in the system. Here, we assume the fail-stop model. We assume that when a node fails, every process at that node fails and that this failure can be detected by the other nodes in the system. The following assumptions are made about the system
- (i)
Message delays are bounded.
- (ii)
Nodes and communication links can fail and that may result in partitioning of the network.
Correctness proof for fault tolerance
Lemma 6 The fault tolerant version of Algorithm KMutex is starvation free provided that the requesting node is not isolated from it Local Group. Proof A node will starve if it cannot be allocated access to the critical section while other nodes are at liberty to do so. This situation occurs when a node has issued a request and is waiting indefinitely to receive the token. If there is a path from a node to the link node, then this node will be granted the token in finite time. Once a request is received at a
Simulation results for fault tolerance
We have conducted simulation of the fault tolerant Algorithm using the following parameters: P(link failure) = 5%, P(node failure) = 5%, P(message loss) = 30%. [Define P(x) = probability of the occurrence of x.] We present below the graphs of the simulation showing the average number of messages required per critical section and the average time for m critical section entry, m ∈ Z+.
Fig. 6a–d show the number of messages per critical section entry for a given number of tokens, at varying load. It can be
An illustrative example
Consider a snapshot of a network of 16 nodes taken at time t and shown in Fig. 10 below. We have assumed that link node (1, 1) has failed while holding the requests of nodes (1, 2) and (1, 3). It had already made a request to the GRC, node (2, 1) before it failed. The link connecting nodes (2, 1) to (2, 3) has failed.
Node (2, 3) has sent its request to node (2, 4) which has forward that request to the link node (2, 1). Node (2, 2) has time out waiting for the token. The request by node (3, 2)
Conclusion
In this paper, we have presented an algorithm for the k-mutex problem. The general outline of the algorithm is presented followed by a formal description. The algorithm is shown to be free from deadlocks and starvation. The complexity analysis is provided. The algorithm is tested extensively in a simulated environment and results are given.
The algorithm KMutex is non-probabilistic and implements mutual exclusion among n nodes in a computer network. The logical structure imposed on the network
References (26)
- et al.
A token based k-resilient mutual exclusion algorithm for distributed systems
Information Processing Letters
(1994) - et al.
Distributed k-mutual exclusion algorithm using k-coterie
Information Processing Letters
(1994) - et al.
k-Arbiter: a safe and general scheme for h-out of-k mutual exclusion
Theoretical Computer Science
(1998) - et al.
Nondominated k-coteries for multiple mutual exclusion
Information Processing Letters
(1994) A distributed algorithm for multiple entries to a critical section
Information Processing Letters
(1989)- et al.
Another distributed algorithm for multiple entries to a critical section
Information Processing Letters
(1992) A simple group mutual l-exclusion algorithm
Information Processing Letters
(2003)- et al.
Analysis of quorum-based protocols for distributed (k + 1)-exclusion
IEEE Transactions on Parallel and Distributed Systems
(1997) - A.A. Aravind, A simple shared memory k-exclusion algorithm for distributed processing, in: Proceedings of the 16th...
- et al.
A quorum-based group mutual exclusion algorithm for distributed system with dynamic group set
IEEE Transaction on Parallel and Distributed Systems
(2007)
An O(√(n) distributed mutual exclusion algorithm using queue migration
Journal of Universal Computer Science
A distributed mutual exclusion algorithm over multi-routing protocol for mobile ad hoc networks
International Journal of Parallel, Emergent and Distributed Systems
Cited by (11)
Adaptive teleoperation using intelligent dynamic voting
2015, IFAC-PapersOnLineMutual inclusion in asynchronous message-passing distributed systems
2015, Journal of Parallel and Distributed ComputingRedefining voting to enable simultaneous multioperator robot navigation
2015, IFAC-PapersOnLineToken-based approach in distributed mutual exclusion algorithms: a review and direction to future research
2021, Journal of SupercomputingThe design and classification of cheating attacks on power marketing schemes in resource constrained smart micro-grids
2018, Advances in Information Security