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.

14 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4
votes
0answers
285 views

Classic Problems on Process Synchronization

I have been studying Process Synchronization and inter-process communication in Operating Systems Engineering and have come across multiple problems like "Sleeping Barbers", "Producer Consumers", "...
4
votes
0answers
67 views

Deadlock free process calculi

So when programming with locks as a synchronization primitives you can ensure no deadlock by ensuring that an ordering exists on the locks and that all acquires of the locks happen in that order (...
4
votes
0answers
155 views

Mutex implementation on top of a preemptive scheduler that does not guarantee liveness

I'm implementing some synchronization primitives in the standard library of an operating system. Specifically, I want to implement mutexes and condition variables. This is on top of a microkernel with ...
4
votes
0answers
98 views

Concurrent Programming Bar Problem

I have been posed a question by my lecturer and I'm trying to figure the right way to go about it. They want me to ensure mutual exclusion for n processes. The code provided is as follows: ...
3
votes
0answers
323 views

Lamport's Bakery algorithm with other > relation

i'm reading an old exam and one question was: Which property of the Bakery algorithm is violated with the following change? ...
2
votes
0answers
111 views

Starvation algorithm in operating system

Is there an algorithm for mutual exclusion with shared flag variables, as the Peterson's one, that doesn't prevent the starvation ?
2
votes
0answers
722 views

Proof of Manna-Pnueli algorithm for mutual exclusion being incorrect

Suppose we have the Manna-Pnueli algorithm for mutual exclusion: I was trying to find a sequence that violates mutual exclusion and I came up with this: ...
1
vote
0answers
22 views

Comparing wait-signal alternatives for synchronizing two piece of programs

I came across following problem: A certain computation generates two arrays a and b such that ...
1
vote
0answers
52 views

Do we really need a mutex in this case?

Wikipedia's solution for multi Producer-Consumer problem uses both mutexes and semaphores. ...
1
vote
0answers
43 views

Lamport's distributed mutual exclusion: wait-chain order clock

Regarding Lamport's mutual exclusion... Where messages are exchanged in the following sequence between nodes S, G1, and G2. G1 and G2 are the members of the group. (for this, lets just assume that ...
1
vote
0answers
37 views
1
vote
0answers
109 views

Is Dekker's algorithm not k-bounded for any finite k?

Consider this version of the algorithm, for only 2 processes, 0 and 1: ...
1
vote
0answers
221 views

What are the practical use of weak semaphores?

Weak semaphores are often defined as if a process (or thread), say p1, performs a V operation and some other process is waiting on that semaphore, then the first process (i.e. p1) is not ...
0
votes
0answers
86 views

a problem with Suzuki-Kasami mutex algorithm

I have some sort of a misunderstanding regarding the Suzuki-Kasami distributed mutex algorithm. I am writing my question here because I failed on gaining access to the original paper. I will call ...