The Gateway to Computer Science Excellence
0 votes

In order to allow only one process to enter its critical section, binary semaphore are initialized to

  1. $0$
  2. $1$ 
  3. $2$
  4. $3$
in Operating System by Boss (30.8k points)
recategorized by | 742 views

2 Answers

0 votes
Best answer
In order to allow only one process to enter its critical section,generaly  we will take semaphore value as 1 as when it will enter in critical section it will down the semaphore value to zero so that no other process is able to down ,further the value of semaphore .

 (b) option ans.
by Boss (20.1k points)
selected by
0 votes
i think ans should be 1 .
when a process want to enter critical section it decrements value by 1 .
Now value becomes to zero. if another process try to enter critical section it goes to waiting queue.
 2 & 3 can not be possible value for binary semaphore it can contain only 0 & 1 possible value
by (413 points)
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,292 answers
104,909 users