search
Log In

Recent questions tagged binary-semaphore

0 votes
1 answer
2
a) s1-wait(p) , s2-wait(q) , s3-wait(q) , s4-wait(p) b) s1-wait(p) , s2-wait(q) , s3-wait(p) , s4-wait(q) c) s1-wait(q) , s2-wait(p) , s3-wait(p) , s4-wait(q) d) none of above
asked Dec 12, 2018 in Operating System Rahul_Rathod_ 491 views
1 vote
1 answer
3
Consider a non-negative counting semaphore S. During an execution, 16P (wait) operations, and 4V (signal) operations are issued in some order. The largest initial value of S for which at least three up operations will remain blocked is ___________ Can someone explain me the solution
asked Nov 22, 2018 in Operating System Pavan Shetty 218 views
0 votes
1 answer
4
What is the actual difference between binary semaphore & Mutex????? Are both same thing???? What is the up() code for binary semaphore?????
asked Nov 15, 2018 in Operating System mrinmoyh 149 views
0 votes
0 answers
5
HOW ARE THE CURRENT OPERATORS CREATING DEADLOCK HERE?
asked Sep 27, 2018 in Operating System Avik Chowdhury 59 views
0 votes
0 answers
6
The number of binary semaphores required to implement readers-writers code in busy waiting mode is ------------- answer given as 1. why 1 and why not 2?
asked Sep 21, 2018 in Operating System balaganesh 102 views
0 votes
2 answers
7
struct Semaphore { enum value(0,1); Queue type L; } Down (Semaphore S) { if(S.value==1) { S.value=0; } else { put process(PCB) in S.L; sleep(); } } Up(Semaphore S) { if(S.L is empty) { S.value=1; } else { select a process from S.L; wakeup(); } } I ... down now and goes to sleep. P0 comes out and exeutes the else part of Up and wakes P1 up. Now how will P1 enter the CS, since S.value is still 0?
asked Feb 5, 2017 in Operating System Samujjal Das 243 views
3 votes
2 answers
8
Q : Each process Pi , i = 1 to 9 executes the following code : while (TRUE) { P(mutex); Critical section ; V(mutex); } The process P10 executes the following code : while(TRUE) { V(mutex); critical section ; P(mutex); } Initial value of binary semaphore "mutex" = 1.Then what ... section at any instant of time? a) 2 b) 3 c) 9 d) 10 e) 1 Plz explain in details which one is true out of these options.
asked Oct 16, 2016 in Operating System Habibkhan 622 views
0 votes
2 answers
9
In order to allow only one process to enter its critical section, binary semaphore are initialized to $0$ $1$ $2$ $3$
asked Sep 16, 2016 in Operating System makhdoom ghaya 1.3k views
To see more, click for the full list of questions or popular tags.
...