The Gateway to Computer Science Excellence
+2 votes

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 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 before entering washroom u have kept a bodygaurd ouside who will prevent others from entering..and when u comes is removed...P and V are the operations to do so...

by Boss (19.8k points)
selected by
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
105,085 users