Global Information Lookup Global Information

Mutual exclusion information


Two nodes, i and i + 1, being removed simultaneously results in node i + 1 not being removed.

In computer science, mutual exclusion is a property of concurrency control, which is instituted for the purpose of preventing race conditions. It is the requirement that one thread of execution never enters a critical section while a concurrent thread of execution is already accessing said critical section, which refers to an interval of time during which a thread of execution accesses a shared resource or shared memory.

The shared resource is a data object, which two or more concurrent threads are trying to modify (where two concurrent read operations are permitted but, no two concurrent write operations or one read and one write are permitted, since it leads to data inconsistency). Mutual exclusion algorithms ensure that if a process is already performing write operation on a data object [critical section] no other process/thread is allowed to access/modify the same object until the first process has finished writing upon the data object [critical section] and released the object for other processes to read and write upon.

The requirement of mutual exclusion was first identified and solved by Edsger W. Dijkstra in his seminal 1965 paper "Solution of a problem in concurrent programming control",[1][2] which is credited as the first topic in the study of concurrent algorithms.[3]

A simple example of why mutual exclusion is important in practice can be visualized using a singly linked list of four items, where the second and third are to be removed. The removal of a node that sits between two other nodes is performed by changing the next pointer of the previous node to point to the next node (in other words, if node i is being removed, then the next pointer of node i – 1 is changed to point to node i + 1, thereby removing from the linked list any reference to node i). When such a linked list is being shared between multiple threads of execution, two threads of execution may attempt to remove two different nodes simultaneously, one thread of execution changing the next pointer of node i – 1 to point to node i + 1, while another thread of execution changes the next pointer of node i to point to node i + 2. Although both removal operations complete successfully, the desired state of the linked list is not achieved: node i + 1 remains in the list, because the next pointer of node i – 1 points to node i + 1.

This problem (called a race condition) can be avoided by using the requirement of mutual exclusion to ensure that simultaneous updates to the same part of the list cannot occur.

The term mutual exclusion is also used in reference to the simultaneous writing of a memory address by one thread while the aforementioned memory address is being manipulated or read by one or more other threads.

  1. ^ Dijkstra, E. W. (1965). "Solution of a problem in concurrent programming control". Communications of the ACM. 8 (9): 569. doi:10.1145/365559.365617. S2CID 19357737.
  2. ^ Taubenfeld, "The Black-White Bakery Algorithm". In Proc. Distributed Computing, 18th international conference, DISC 2004. Vol 18, 56–70, 2004
  3. ^ "PODC Influential Paper Award: 2002", ACM Symposium on Principles of Distributed Computing, retrieved 24 August 2009

and 17 Related for: Mutual exclusion information

Request time (Page generated in 1.0202 seconds.)

Mutual exclusion

Last Update:

In computer science, mutual exclusion is a property of concurrency control, which is instituted for the purpose of preventing race conditions. It is the...

Word Count : 2336

Automatic mutual exclusion

Last Update:

Automatic mutual exclusion is a parallel computing programming paradigm in which threads are divided into atomic chunks, and the atomic execution of the...

Word Count : 70

Serializing tokens

Last Update:

single entity that may also be holding the same token. Tokens and mutual exclusion (mutex) mechanisms are locks. Unlike mutexes, tokens do not exclude...

Word Count : 431

Rule of mutual exclusion

Last Update:

The rule of mutual exclusion in molecular spectroscopy relates the observation of molecular vibrations to molecular symmetry. It states that no normal...

Word Count : 295

Thread safety

Last Update:

and are used in situations where shared state cannot be avoided: Mutual exclusion Access to shared data is serialized using mechanisms that ensure only...

Word Count : 1167

Parallel computing

Last Update:

known as a race condition. The programmer must use a lock to provide mutual exclusion. A lock is a programming language construct that allows one thread...

Word Count : 8496

Deadlock

Last Update:

all of the following conditions occur simultaneously in a system: Mutual exclusion: At least one resource must be held in a non-shareable mode (we are...

Word Count : 2532

Collectively exhaustive events

Last Update:

of a set of mutually exclusive events. In such a set no more than one event can occur at a given time. (In some forms of mutual exclusion only one event...

Word Count : 698

Critical section

Last Update:

piece of a program that requires mutual exclusion of access. As shown in the figure, in the case of mutual exclusion (mutex), one thread blocks a critical...

Word Count : 1628

Race condition

Last Update:

circuits or multithreaded or distributed software programs. Using mutual exclusion can prevent race conditions in distributed software systems. A typical...

Word Count : 4368

Glossary of operating systems terms

Last Update:

execution. A lock is designed to enforce a mutual exclusion concurrency control policy. mutual exclusion: Mutual exclusion is to allow only one process at a time...

Word Count : 764

Ashok Agrawala

Last Update:

algorithm for mutual exclusion on a distributed system. This algorithm is an extension and optimization of Lamport's Distributed Mutual Exclusion Algorithm...

Word Count : 833

Distributed algorithm

Last Update:

election, consensus, distributed search, spanning tree generation, mutual exclusion, and resource allocation. Distributed algorithms are a sub-type of...

Word Count : 630

Operation reduction for low power

Last Update:

likely the value of C is 2. Therefore, as C and C are independent and mutually exclusive we can modify the code to be if (c == 2) { A = A << 1 } else...

Word Count : 769

Dining philosophers problem

Last Update:

other fork to be available: it is a deadlock. Resource starvation, mutual exclusion and livelock are other types of sequence and access problems. Dijkstra's...

Word Count : 2586

Business rules engine

Last Update:

code. Rule engines typically support rules, facts, priority (score), mutual exclusion, preconditions, and other functions. Rule engine software is commonly...

Word Count : 1515

Molecular vibration

Last Update:

provide useful structural information such as in the case of the rule of mutual exclusion for centrosymmetric molecules. Vibrational excitation can occur in...

Word Count : 2706

PDF Search Engine © AllGlobal.net