Skip to main content

Questions tagged [mutual-exclusion]

Questions about the concurrency-control requirement of ensuring that no two processes are simultaneously in a critical section (a period when the process is accessing a shared resource). Failing to achieve mutual exclusion leads to the problem of data races.

1 vote
0 answers
28 views

Regarding the following question: Let A be an arbitrary correct deadlock-free mutual exclusion algorithm such that its exit code is not wait-free, the number of steps in the exit code of A depends on ...
algorithm-cracker's user avatar
1 vote
0 answers
73 views

I was studying the dining philosopher problem (See problem description) and its solution using semaphores, and I came across this : ...
Girik Garg's user avatar
0 votes
1 answer
354 views

I was going through the book Operating Systems by Galvin. First they explain Semaphores acting like a mutex. While talking about semaphores as mutex, they mention that the wait operation of semaphores ...
Himanshuman's user avatar
0 votes
2 answers
335 views

Sorry if this is a stupid question. But it really intrigued me. Same resources at different algorithms are telling different ways to test these stuffs. Here's an algorithm and how I'd test for its 3 ...
zeeshanseikh's user avatar
2 votes
1 answer
195 views

For what example would Maekawa's algorithm allow out of timestamp order access to the critical section. It is mentioned that ordering is not satisfied in Maekawa's algorithm. But in what scenario ...
sd22gg44's user avatar
2 votes
0 answers
44 views

I was reading distributed algorithms (by Nancy lynch) and there is a part that I would kindly like to get a simpler explanation for. I know the book mentioned no algorithm can solve mutual exclusion ...
user206904's user avatar
3 votes
1 answer
163 views

Good day everyone, I'm currently trying to carry out the PetersonNP (a.k.a. FilterLock) correctness proof (mutual exclusion). I've found several proof sketches on concurrency books but I'm interested ...
Chaos's user avatar
  • 672
1 vote
1 answer
2k views

Cheers, so my textbook explains these parts very poorly, so I would gladly take any advice! I am confused between the test-and-set instructions, which per my book is a very common CPU instruction set, ...
average_discrete_math_enjoyer's user avatar
1 vote
0 answers
155 views

For Dekker's algorithm given below (from Wikipedia), why is it that we wait for the turn to change, instead of waiting for p1 to set it's flag to false? It seems to me that it would be safer (or more ...
Chien's user avatar
  • 11
1 vote
0 answers
170 views

I am trying to understand the difference between weakly fair and strongly fair scheduling. For example, what scheduling policy would ensure that a process delayed at its first await statement will ...
HotWheels's user avatar
  • 113
0 votes
1 answer
325 views

In my textbook, Operating Systems: Internals and Design Principles (9th Edition) by William Stallings in chapter 5, it explains how semaphores work: The fundamental principle is this: Two or more ...
Darien Springer's user avatar
1 vote
0 answers
52 views

I came across following problem: A certain computation generates two arrays a and b such that ...
RajS's user avatar
  • 1,757
5 votes
1 answer
1k views

Lamport's distributed mutual exclusion algorithm (also described here) solves mutual exclusion problem for $N$ processes with $3(N-1)$ messages per request ("take and release lock" cycle). It ...
yeputons's user avatar
  • 256
3 votes
1 answer
1k views

int count=0; void *thfunc() { int ctr=0; for(ctr=0;ctr<100;ctr++) count++; } If *thfunc() is executed by two threads concurrently in a uniprocessor ...
Abhilash Mishra's user avatar

15 30 50 per page