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.

learn more… | top users | synonyms

8
votes
1answer
185 views

Are there hardware lock implementations without test-and-set or swap?

Locks are usually implemented thru test-and-set and swap machine-level instructions. Are there other implementations that do not use these? Also, can we say that all hardware level solutions to the ...
2
votes
1answer
25 views

Is it possible to solve the critical section problem with an atomic subtract operation?

In my Operating Systems class, our professor asked us to solve the critical section problem with the following atomic operation: ...
2
votes
1answer
48 views

Finding issues in concurrent implementation of carpark overflow control

Firstly, I am revising for my Concurrent Programming exam and have come across the following question from a previous exam paper. I have attempted to answer it, and will try and convey this effort; ...
5
votes
3answers
418 views

Solutions to synchronization problem need to be executed in critical section

I was reading about synchronization problems for cooperating processes and i learned that only hardware solutions like test_and_wait() and ...
13
votes
1answer
4k views

Understanding Peterson’s and Dekker’s algorithms

I am trying to understand the algorithms by Peterson and Dekker which are very similar and display a lot of symmetries. I tried to formulate the algorithms in informal language like follows: ...
3
votes
2answers
110 views

Mutual exclusion for n processes

I want to implement mutual exclusion for $n$ processes. Critical section code: ...
7
votes
2answers
412 views

Does Peterson's 2-process mutual exclusion algorithm account for dying processes?

I think that in Peterson's algorithm for mutual exclusion, if the process first to enter the critical section were to die or be cancelled, the other process would loop forever, waiting to enter the ...