Mutual exclusion means that processes must always execute critical sections in time intervals that do not overlap. The mutual exclusion requirement is one of the most basic in an operating system; without it the OS cannot share resources safely.
Questions tagged [mutual-exclusion]
261 questions
1
vote
2 answers
MS-Access Junction Table Inserts/Deletions Between Two Mutually Exclusive Lists (2 Listboxes)
With this kind of design, I would like to create a functionality with which to add and delete records from the junction table.
The case is from when editing an employee and selecting what exams they can take. In the left list box would be the exams…

Nitrodist
- 1,585
- 5
- 24
- 34
1
vote
0 answers
Peterson's solution: why does it not work in non preemptive scheduling sometimes?
Why doesn't Peterson’s solution to the mutual-exclusion problem work when process scheduling is non-pre-emptive sometimes?
Can someone please help me understand in the context of peterson's solution?
Thank you for your time and help!
Peterson's…

user5527252
- 73
- 1
- 7
1
vote
0 answers
Cross-window synchronization (critical sections) in the browser
I'm trying to achieve the following in a web page:
Users can open multiple tabs/windows of the page.
Every few seconds, I need exactly one of those tabs/windows to execute a specific section of code (critical region).
I don't care which one of the…

Markus A.
- 12,349
- 8
- 52
- 116
1
vote
0 answers
Why write while(!false) instead of simply writing while(true)?
I'm a web developer and often times I come across situations where I can answer this question myself.
I'm preparing for an exam and learning about Lock Variables used as solution for Synchronization Mechanisms in Operating Systems
This is the code…

Siddharth Thevaril
- 3,722
- 3
- 35
- 71
1
vote
1 answer
Filter algorithm for mutual exclusion: Weak fairness
I was referring to this filter algorithm notes:
http://cs.nyu.edu/wies/teaching/ppc-14/material/lecture02.pdf
It says, It provides weak fairness and some thread can be taken overtaken arbitary number of times. (slide 98)
I am not able to understand…

Majnu
- 210
- 2
- 10
1
vote
1 answer
Hbase Atomic read and delete a row
We are using a hbase table as a big queue. Many clients can insert into it, and many clients want to read data from it. Problem is mutual exclusion. At span that a client read data until delete it another client can read it too! But we want to make…

vakarami
- 576
- 9
- 22
1
vote
1 answer
How to avoid starvation?
I'm trying to fix my code, I've solved the deadlock an the mutual exclusion problem, but I don't know how I can avoid the starvation, because in promela (PML) there aren't the monitor.
Can someone help me? Thanks in advance
bool forchetta0 =…

macco
- 21
- 1
- 11
1
vote
2 answers
Mutual Exclusion with Multiple Producers and One Consumer
I have an interesting problem that I need to solve on some production code. We are currently developing a web service that will be called from many different applications and will essentially be used to send emails. Whenever a new email is sent we…

Dillon Drobena
- 761
- 1
- 8
- 26
1
vote
1 answer
Is there a way to generate some set of rows exactly once on demand in Postgres?
The basic problem is that we are managing a significant amount of generated rows, and it is mission critical that this data is generated exactly once and only if necessary. Suppose you have a data relation:
CREATE TABLE sometable (
id SERIAL,
…

gdoug
- 715
- 1
- 5
- 16
1
vote
1 answer
Java - Deadlock using SWAP function to solve mutual exclusion
I would like to solve mutual exclusion using the Swap function but the program suffer from deadlock and I don't know why. It seems the problem occur when a thread exec two consecutive times.
The swap lock logic:
Every thread make use of a local…

MadDogTannen
- 25
- 7
1
vote
0 answers
Running at the same time 2 algorithms that designed to solve the mutual-exclusion
Question I saw on site that explains the issue of mutual-exclusion (http://www.faculty.idc.ac.il/gadi/PPTs/Chapter2-Mutex-BasicTopics.pptx - page 8). Unfortunately there is no answer. Also, the original question is only about C but I didn't…

stackoverflow
- 11
- 3
1
vote
1 answer
The behavior of method/global variables inside a critical section using Mutex Class
I am reading a book about C#, I know what a critical section is used for, however this example was on the book and it confuses me:
public bool BankTransferWithMutex(int amount)
{
bool result = false;
MyMutex.WaitOne();
if (Balance >=…

DavidN
- 111
- 1
- 9
1
vote
2 answers
Explain why this algorithm does not guarantee mutual exclusion
Consider the following ‘busy waiting’ attempt for a mutual exclusion algorithm.
Explain why this does not guarantee mutual exclusion. I can't figure out why it doesn't, to me it looks like it should can anyone explain why it doesn't?
/*Process0…

SSI
- 181
- 1
- 2
- 8
1
vote
1 answer
How futex works in this case?
I have a sample code of futex.
But i couldnt understand the code flow....
#include
#include
#include
#include
#include
#define NUM 50
int futex_addr;
int futex_wait(void* addr, int…

Prashanth Cm
- 151
- 2
- 4
- 8
1
vote
2 answers
What is the difference about Mutual Exclusion, between Monitor and Semaphore
I'm confused about Operating System's Synchronization part. I do not understand Mutual Exclusion issue with using at Monitor and Semaphore. Is that difference from each other?
Clearly; Does have Mutual Exclusion any difference with using at Monitor…

TeachMeJava
- 640
- 1
- 13
- 35