The Gateway to Computer Science Excellence
+2 votes
1.1k views

difference in following: [i] mutual exclusion [ii] critical section [iii] semaphore

in CO and Architecture by Active (3.8k points)
retagged by | 1.1k views

1 Answer

+9 votes
Best answer

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...

by Boss (19.8k points)
selected by
0
When examples bare taken from our daily life and become a model or prototype in complex topic , that topic become easy to understand and no one can forget.

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,737 questions
57,315 answers
198,359 comments
105,085 users