Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged binary-semaphore
0
votes
1
answer
1
GATE CSE 2023 | Memory Based Question: 19
incr() { wait(s) x = x+1 signal(s) } decr() { wait(s) x = x-1 signal(s) } Shared integer variable $\mathrm{x}$ initialized with $10.$ There are five threads which are calling incr() and there are three threads which are calling decr() ... $s=2$ minimum possible value of $\mathrm{x}$ is $\mathrm{V}_2$ $15,8$ $12,8$ $15,7$ $12,7$
incr(){ wait(s) x = x+1 signal(s) } decr() { wait(s) x = x–1 signal(s) }Shared integer variable $\mathrm{x}$ initialized w...
GO Classes
1.5k
views
GO Classes
asked
Feb 5, 2023
Operating System
memorybased-gatecse2023
goclasses
operating-system
process-synchronization
binary-semaphore
+
–
2
votes
1
answer
2
Binary Semaphore
Say there is a Binary semaphore R, initialized to 0. Say process X and Y are working on R. At T1 :- X has performed P(R); X gets blocked and gets added in Process Queue. At T2 :-Y has performed V(R); Will Process X get unblocked and removed from ready queue? Which process will run after Y has performed V(R)? Process Y or Process X?
Say there is a Binary semaphore R, initialized to 0. Say process X and Y are working on R.At T1 :- X has performed P(R); X gets blocked and gets added in Process Queue.At...
subhashchaganti
503
views
subhashchaganti
asked
Sep 21, 2022
Operating System
operating-system
binary-semaphore
queue
+
–
1
votes
3
answers
3
Applied Gate Full Length Test
Let S be the binary semaphore variable initialized to zero. If no blocked processes exist in the system then consider the execution of the following signal (V), wait (P) operation. The number of blocked processes at the end are _________. 4 P, 6 V, 9 P, 13 V, 14 P
Let S be the binary semaphore variable initialized to zero. If no blocked processes exist in the system then consider the execution of the following signal (V), wait (P) ...
Sagar475
447
views
Sagar475
asked
Jan 18, 2022
Operating System
operating-system
binary-semaphore
+
–
2
votes
1
answer
4
NPTEL Assignment Question
Suppose we want to synchronize two concurrent processes P and Q
Suppose we want to synchronize two concurrent processes P and Q
rsansiya111
516
views
rsansiya111
asked
Dec 8, 2021
Operating System
nptel-quiz
operating-system
process-synchronization
binary-semaphore
+
–
3
votes
1
answer
5
Applied Test Series
Let S be a binary semaphore variable. Let S = 0 initially. Assume that no blocked processes exist in the system. The following signal (V), wait (P) operations are performed. 5 P, 7 V, 10 P, 13 V, 17 P The number of blocked processes at the end are _________.
Let S be a binary semaphore variable. Let S = 0 initially. Assume that no blocked processes exist in the system. The following signal (V), wait (P) operations are perform...
LRU
565
views
LRU
asked
Oct 17, 2021
Operating System
test-series
operating-system
process-synchronization
binary-semaphore
+
–
3
votes
4
answers
6
Ace Test Series: Operating System - Reader Writer Problem
Na462
1.9k
views
Na462
asked
Jan 21, 2019
Operating System
operating-system
process-synchronization
semaphore
binary-semaphore
ace-test-series
+
–
1
votes
1
answer
7
semaphore
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
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...
Rahul_Rathod_
1.5k
views
Rahul_Rathod_
asked
Dec 12, 2018
Operating System
binary-semaphore
process-synchronization
operating-system
semaphore
+
–
2
votes
1
answer
8
Simple Doubt in counting semaphore
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
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 o...
Pavan Shetty
863
views
Pavan Shetty
asked
Nov 22, 2018
Operating System
semaphore
binary-semaphore
+
–
0
votes
1
answer
9
self doubt
What is the actual difference between binary semaphore & Mutex????? Are both same thing???? What is the up() code for binary semaphore?????
What is the actual difference between binary semaphore & Mutex????? Are both same thing????What is the up() code for binary semaphore?????
mrinmoyh
624
views
mrinmoyh
asked
Nov 15, 2018
Operating System
operating-system
mutex
binary-semaphore
+
–
0
votes
0
answers
10
MADE EASY TEST SERIES
HOW ARE THE CURRENT OPERATORS CREATING DEADLOCK HERE?
HOW ARE THE CURRENT OPERATORS CREATING DEADLOCK HERE?
Avik Chowdhury
307
views
Avik Chowdhury
asked
Sep 27, 2018
Operating System
binary-semaphore
+
–
0
votes
0
answers
11
Binary-semaphones
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?
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?
balaganesh
446
views
balaganesh
asked
Sep 21, 2018
Operating System
operating-system
binary-semaphore
+
–
0
votes
2
answers
12
Self Doubt (Semaphores)
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; ... 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?
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...
Samujjal Das
4.0k
views
Samujjal Das
asked
Feb 5, 2017
Operating System
binary-semaphore
semaphore
operating-system
+
–
3
votes
2
answers
13
Self Doubt
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" = ... 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.
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 foll...
Habibkhan
2.8k
views
Habibkhan
asked
Oct 16, 2016
Operating System
operating-system
process-synchronization
binary-semaphore
+
–
1
votes
2
answers
14
UGC NET CSE | June 2010 | Part 2 | Question: 39
In order to allow only one process to enter its critical section, binary semaphore are initialized to $0$ $1$ $2$ $3$
In order to allow only one process to enter its critical section, binary semaphore are initialized to$0$$1$ $2$$3$
makhdoom ghaya
3.2k
views
makhdoom ghaya
asked
Sep 16, 2016
Operating System
ugcnetcse-june2010-paper2
operating-system
binary-semaphore
+
–
1
votes
1
answer
15
To allow only one process in the critical section, value of a binary semaphore is initialized to __?
Vikrant Singh
774
views
Vikrant Singh
asked
Feb 1, 2015
Operating System
operating-system
process-synchronization
semaphore
binary-semaphore
+
–
To see more, click for the
full list of questions
or
popular tags
.
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register