retagged by
1,678 views

1 Answer

Best answer
9 votes
9 votes

critical section anything...file,code,memory,register,colddrink,food which is "shared" by two processes..

mutual exclusion...if a process is inside the critical section.....other process shouldnt enter inside...like u r in a washroom..till that time no one should enter..

semaphore...a "variable"...a protected variable on which read modify etc happens automatically in kernal mode....like before entering washroom u have kept a bodygaurd ouside who will prevent others from entering..and when u comes out...it is removed...P and V are the operations to do so...

selected by

Related questions

0 votes
0 votes
2 answers
2
shivajikobardan asked Jul 22, 2023
726 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 algorith...
1 votes
1 votes
1 answer
3
thor asked Sep 25, 2016
1,200 views
Can Mutual exclusion can be enforced with a general semaphore initial value is greater than 1 ?I think yes. Consider a semaphore $S = 2$, and following code segment for b...