In computer science, mutual exclusion refers to the requirement of ensuring that no two concurrent processes are in their critical section at the same time; it is a basic requirement in concurrency control, to prevent race conditions. Here, a critical section refers to a period when the process accesses a shared resource, such as shared memory. The requirement of mutual exclusion was first identified and solved by Edsger W. Dijkstra in his seminal 1965 paper titled Solution of a problem in concurrent programming control, and is credited as the first topic in the study of concurrent algorithms.
A simple example of why mutual exclusion is important in practice can be visualized using a singly linked list (See Figure 1). In such a linked list, the removal of a node is done by changing the "next" pointer of the preceding node to point to the subsequent node (e.g., if node i is being removed then the "next" pointer of node i − 1 will be changed to point to node i + 1). In an execution where such a linked list is being shared between multiple processes, two processes may attempt to remove two different nodes simultaneously, resulting in the following problem: let nodes i and i + 1 be the nodes to be removed; furthermore, let neither of them be the head nor the tail; the next pointer of node i − 1 will be changed to point to node i + 1 and the next pointer of node i will be changed to point to node i + 2. Although both removal operations complete successfully, node i + 1 remains in the list since i − 1 was made to point to i + 1, skipping node i (which was the node that reflected the removal of i + 1 by having its next pointer set to i + 2). This can be seen in Figure 1. This problem (normally 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.
Krayzie:
Mo, Mo, Mo, Mo, Mo, Mo
Mo Thug, Mo Thug, Mo Thug, and we are Mo Thug, Mo Thug, Mo Thug.
Felecia:
It's all good. My lovin's all good.
Felecia:
Lately, you've been stressing me about when I'm a give you some, calling me, jocking me, sweating me, gonna rush me none, 'cuz when the time is right I'm gonna let you know and that's for sure. So wait on me patiently and see what I got in store 'cuz I'm gonna represent to the fullest. I'll be there and I promise you no regrets. Just put your trust in me, and baby, I promise this s**t is legit legit, legit, legit
Felecia:
It's all good. My loving is, my loving is, all good, all good, all good. You know it's all good, all good, all good.
Krayzie:
Yep, yep, yep. It's all G-double O-D, good, good, good. Yep, yep, yep. It's all G-double O-D, good with me, with me, with me.
Felecia:
If I told you once, then I told you twice, you gotta get to know me. There's more to a relationship then jumping in the sheets and if that's all you want then you better go, 'cuz that ain't me. I don't give my love to just anybody, if I'm not correct, then prove me wrong, and just hold on. Gradually, you will see, just how good it'll be. When the time is right, I'll ease your mind with a little bump and grind. Fantasies full of ecstasy: we'll have a real good time.
Felecia:
It's all good. My lovin' is, my lovin' is, all good, all good, all good. You know it's all good, all good, all good.
Krayzie:
Yep, yep, yep. It's all G-double O-D, good, good, good. Yep, yep, yep. It's all G-double O-D, good with me, with me, with me.
Krayzie: Since it's all good, baby we can get it on, hey, you wanna ride? Krayzie Bone. Come and jump in the Benz and tell your friends, you will get with them later. Come and let me take ya. Got a couple things I wanna show ya. I'm really trying to know ya, I'm just curious, is it really all good? You serious?, I'm serious. If it is, then I gotta jump on it, ride it, ghetto cowboy. Surprise, you thought I was quiet, I never was shy, baby. Niggaz just act like that! lay back, but don't let that fool ya, rule ya. Really give that the nigga the bag, 'cuz we won't have time to talk. I've been peepin' for a minute now (Yep, yep, yep), and I know just where I'm ah start. Let me listen to your heartbeat. Boomp, boomp, racing in this situation. Is it gettin' kind of hot in here? No, that's you, Temperature's rising so am I.
Felecia:
It's all good. My lovin' is, my lovin' is, all good, all good, all good. You know it's all good, all good, all good.
Krayzie: