Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged semaphore
3
votes
1
answer
121
test series os semaphores
Assume 2 processes computer ( ) and science ( ) that are concurrent and that the three semaphore mutex, Q and R initialized to 1 are shared between the two processes. Q is a semaphore on file 1 and R on file 2. Deadlock and no starvation No deadlock but starvation Both deadlock and starvation No deadlock or starvation
Assume 2 processes computer ( ) and science ( ) that are concurrent and that the three semaphore mutex,Q and R initialized to 1 are shared between the two processes. Q is...
Vishal Goyal
1.1k
views
Vishal Goyal
asked
Dec 2, 2016
Operating System
operating-system
test-series
semaphore
+
–
22
votes
1
answer
122
GATE CSE 1990 | Question: 1-vii
Semaphore operations are atomic because they are implemented within the OS _________.
Semaphore operations are atomic because they are implemented within the OS _________.
makhdoom ghaya
7.9k
views
makhdoom ghaya
asked
Nov 18, 2016
Operating System
gate1990
operating-system
semaphore
process-synchronization
fill-in-the-blanks
+
–
2
votes
1
answer
123
difference among Critical Section ,Mutual Exclusion and Semaphore
difference in following: [i] mutual exclusion [ii] critical section [iii] semaphore
difference in following: [i] mutual exclusion [ii] critical section [iii] semaphore
LavTheRawkstar
1.7k
views
LavTheRawkstar
asked
Nov 4, 2016
CO and Architecture
operating-system
process-synchronization
critical-section
deadlock-prevention-avoidance-detection
semaphore
co-and-architecture
+
–
1
votes
2
answers
124
CAlculate the semaphore value
A counting semaphore S is created with initial value as 3. Suppose 5 processes are calling P, what will be the final value of S? A. 8 B. 0 C. -2 D. -1
A counting semaphore S is created with initial value as 3.Suppose 5 processes are calling P, what will be the final value of S?A. 8B. 0C. -2D. -1
sh!va
4.4k
views
sh!va
asked
Nov 2, 2016
Operating System
semaphore
operating-system
+
–
0
votes
0
answers
125
process synchoronozation and semaphores
The Semaphore variable full, empty and mutex are initialized to 0, n and 1 respectively. Process P1 repeatedly adds one item at a time to a buffer of size n, and process P2 repeatedly removes one item at a time from the same buffer using the programs given below. In the ... (c) P(empty), V(full), P(empty), V(full) (d) P(empty), V(full), P(full), V(empty)
The Semaphore variable full, empty and mutex are initialized to 0, n and 1 respectively. Process P1 repeatedly adds one item at a time to a buffer of size n, and process ...
Lone Wolf
384
views
Lone Wolf
asked
Oct 27, 2016
Operating System
semaphore
and
process-synchronization
+
–
2
votes
1
answer
126
Semaphores:
Assume that you have a semaphore associated with each item on a doubly linked list. Using No other synchronization primitive, What is the fewest number of semaphore that you must acquire for any operation (lookup, insert, delete) ?
Assume that you have a semaphore associated with each item on a doubly linked list. Using No other synchronization primitive, What is the fewest number of semaphore that ...
mcjoshi
1.2k
views
mcjoshi
asked
Oct 11, 2016
Operating System
operating-system
semaphore
linked-list
+
–
6
votes
4
answers
127
semaphores
Consider a schedule with 3 processes A,B and C, binary semaphores are S =1 , T=0 , Z=0 initially ; Process A { while(1) { P(S) printf("*"); V(T) } } Process B { P(T) V(Z) } Process C { P(Z) V(S) } What is the maximum number of times * is printed?
Consider a schedule with 3 processes A,B and C, binary semaphores are S =1 , T=0 , Z=0 initially ;Process A { while(1) { P(S) printf("*"); V(T) } } Process B { P(T) V(Z) ...
Akriti sood
1.8k
views
Akriti sood
asked
Sep 26, 2016
Operating System
semaphore
process-synchronization
+
–
1
votes
1
answer
128
Mutual exclusion :
Can Mutual exclusion can be enforced with a general semaphore initial value is greater than 1 ? I think yes. Consider a semaphore $S = 2$, and following code segment for both processes. P(S); P(S); <Critical Section> V(S); V(S);
Can Mutual exclusion can be enforced with a general semaphore initial value is greater than 1 ?I think yes. Consider a semaphore $S = 2$, and following code segment for b...
thor
1.2k
views
thor
asked
Sep 25, 2016
Operating System
operating-system
deadlock-prevention-avoidance-detection
process-synchronization
semaphore
+
–
3
votes
1
answer
129
GATE Overflow | Operating Systems | Test 1 | Question: 29
Semaphores are used to solve the problem of resource allocation process synchronization deadlock process communication
Semaphores are used to solve the problem ofresource allocationprocess synchronizationdeadlockprocess communication
Bikram
377
views
Bikram
asked
Sep 3, 2016
Operating System
go-os-1
operating-system
semaphore
+
–
1
votes
2
answers
130
GATE Overflow | Operating Systems | Test 1 | Question: 15
At a particular time of computation, the value of a counting semaphore is $7$ , then $20$ $P$ operations and 'x' $V$ operations were completed on this semaphore. If the final value of the semaphore is $5$, the value of $x$ should be ____
At a particular time of computation, the value of a counting semaphore is $7$ , then $20$ $P$ operations and 'x' $V$ operations were completed on this semaphore. If the f...
Bikram
297
views
Bikram
asked
Sep 3, 2016
Operating System
go-os-1
operating-system
process-synchronization
semaphore
numerical-answers
+
–
4
votes
2
answers
131
UGC NET CSE | June 2013 | Part 3 | Question: 60
Suppose $\text{S}$ and $\text{Q}$ are two semaphores initialized to $1.\;\text{P1}$ and $\text{P2}$ ... Their execution may sometimes lead to an undesirable situation called Starvation Race condition Multithreading Deadlock
Suppose $\text{S}$ and $\text{Q}$ are two semaphores initialized to $1.\;\text{P1}$ and $\text{P2}$ are two processes which are sharing resources.$\begin{array}{} \textbf...
go_editor
6.1k
views
go_editor
asked
Jul 18, 2016
Operating System
ugcnetcse-june2013-paper3
operating-system
semaphore
+
–
8
votes
3
answers
132
ISRO2016-45
At a particular time of computation the value of a counting semaphore is 7. Then 20 $P$ operations and $x$ $V$ operations were completed on this semaphore. If the new value of semaphore is $5$, $x$ will be 18 22 15 13
At a particular time of computation the value of a counting semaphore is 7. Then 20 $P$ operations and $x$ $V$ operations were completed on this semaphore. If the new val...
Arjun
10.8k
views
Arjun
asked
Jul 6, 2016
Operating System
operating-system
process-synchronization
semaphore
isro2016
+
–
12
votes
1
answer
133
ISRO2007-42, UGCNET-June2010-II: 37
Semaphores synchronize critical resources to prevent deadlock synchronize critical resources to prevent contention are used to do I/O are used for memory management
Semaphoressynchronize critical resources to prevent deadlocksynchronize critical resources to prevent contentionare used to do I/Oare used for memory management
go_editor
6.8k
views
go_editor
asked
Jun 10, 2016
Operating System
isro2007
operating-system
process-synchronization
ugcnetcse-june2010-paper2
semaphore
+
–
51
votes
10
answers
134
GATE CSE 2016 Set 2 | Question: 49
Consider a non-negative counting semaphore $S$. The operation $P(S)$ decrements $S$, and $V(S)$ increments $S$. During an execution, $20$ $P(S)$ operations and $12$ $V(S)$ operations are issued in some order. The largest initial value of $S$ for which at least one $P(S)$ operation will remain blocked is _______
Consider a non-negative counting semaphore $S$. The operation $P(S)$ decrements $S$, and $V(S)$ increments $S$. During an execution, $20$ $P(S)$ operations and $12$ $V(S)...
Akash Kanase
15.9k
views
Akash Kanase
asked
Feb 12, 2016
Operating System
gatecse-2016-set2
operating-system
semaphore
normal
numerical-answers
+
–
5
votes
3
answers
135
Synchronization of two processes using Binary Semaphore_2n_EDITION_HARRIS
Suppose we want to synchronize two concurrent processes P and Q using binary semaphores S, T and U: Process P: Process Q: P(S) W: P(T) X: P(U) Y: Print ‘a’ Print ‘a’; Print ‘b’ Print &lsquo ... above problem? (a) P(S), P(T) (b) P(T), P(U) (c) P(S), P(U) (d) None
Suppose we want to synchronize two concurrent processes P and Q using binary semaphores S, T and U:Process P: Process Q:P(S) ...
Purple
1.8k
views
Purple
asked
Jan 29, 2016
Operating System
operating-system
process-synchronization
semaphore
mutex
+
–
0
votes
4
answers
136
What is the meaning of wake up() operation in the up() binary operation, Definition is mentioned below.
Up(Semaphore S) { if (Suspended list() is empty) S.value=1; else { Select a process from the suspended list and WakeUp() } }
piyushkr
1.6k
views
piyushkr
asked
Jan 21, 2016
Operating System
semaphore
+
–
4
votes
4
answers
137
Can anyone explain the below question in a detailed way?
A Binary semaphore variable mutex is initialized to '1' and the various binary semaphore operations like 9P(), 14V(), 6P(), 8V(), 3P(), 2V() are performed, then what is the present(final) value of the binary semaphore mutex?
A Binary semaphore variable mutex is initialized to '1' and the various binary semaphore operations like 9P(), 14V(), 6P(), 8V(), 3P(), 2V() are performed, then what is t...
piyushkr
3.5k
views
piyushkr
asked
Jan 21, 2016
Operating System
semaphore
+
–
5
votes
3
answers
138
What is the correct implementation of UP operation in a binary semaphore
these are the codes for down and up operations in a binary semaphore. The down operation's code seems to be correct, but I am having some doubt in the UP's code. Suppose a process p1 arrives and executes ... down, it will be forced to sleep again.. Am I missing something, or is the above implementation incorrect ?
these are the codes for down and up operations in a binary semaphore. The down operation's code seems to be correct, but I am having some doubt in the UP's code.Suppose a...
learncp
2.6k
views
learncp
asked
Dec 19, 2015
Operating System
operating-system
semaphore
process-synchronization
+
–
1
votes
2
answers
139
counting semaphore related question
A binary semaphore ensures mutual exclusion. Does a counting semaphore ensure mutual exclusion too? Please justify your answers.
A binary semaphore ensures mutual exclusion. Does a counting semaphore ensure mutual exclusion too?Please justify your answers.
dirac
1.6k
views
dirac
asked
Nov 13, 2015
Operating System
semaphore
process-synchronization
operating-system
+
–
27
votes
3
answers
140
TIFR CSE 2012 | Part B | Question: 10
Consider the blocked-set semaphore where the signaling process awakens any one of the suspended process; i.e., Wait (S): If $S>0$ then $S\leftarrow S - 1$, else suspend the execution of this process. Signal (S): If there are ... exclusion, but allows starvation for any $N\geq 2$ The program achieves mutual exclusion and starvation freedom for any $N\geq 1$
Consider the blocked-set semaphore where the signaling process awakens any one of the suspended process; i.e.,Wait (S): If $S>0$ then $S\leftarrow S - 1$, else suspend th...
makhdoom ghaya
3.6k
views
makhdoom ghaya
asked
Oct 31, 2015
Operating System
tifr2012
operating-system
process-synchronization
semaphore
+
–
2
votes
1
answer
141
How to approach this question on bounded-buffer ?
In this empty must be 0 since producer will first produce only then it will empty
In this empty must be 0 since producer will first produce only then it will empty
radha gogia
609
views
radha gogia
asked
Oct 19, 2015
Operating System
process-synchronization
semaphore
+
–
14
votes
11
answers
142
ISRO2015-30
Semaphores are used to solve the problem of Race Condition Process Synchronization Mutual Exclusion None of the above I and II II and III All of the above None of the above
Semaphores are used to solve the problem ofRace ConditionProcess SynchronizationMutual ExclusionNone of the aboveI and IIII and IIIAll of the aboveNone of the above
ajit
21.6k
views
ajit
asked
Oct 12, 2015
Operating System
semaphore
isro2015
process-synchronization
+
–
2
votes
1
answer
143
Do semaphores always provide mutual exclusion??
Himani Srivastava
1.1k
views
Himani Srivastava
asked
Oct 11, 2015
Operating System
semaphore
+
–
3
votes
1
answer
144
Producer consumer code using semaphore
The code for producer consumer prob​lem using semaphore is producer's code do { * // produce an item in nextproduced wait(empty) ; wait(mutex) ; buffer[in] = nextProduced; in = (in + 1) % BUFFER-SIZE; signal(mutex ... producer does not affect 'out' and consumer does not affect 'in', so we could have used mutex1 and mutex2.
The code for producer consumer prob​lem using semaphore isproducer's code do { * // produce an item in nextproduced wait(empty) ; wait(mutex) ; buffer[in] = nextPro...
admin
1.3k
views
admin
asked
Sep 21, 2015
Operating System
operating-system
process-synchronization
inter-process-communication
semaphore
+
–
2
votes
5
answers
145
what is true about binary semaphore?
what is true about binary semaphore? 1)Binary semaphore has drawback called busy wait or spin lock. 2)Binary semaphore is applicable only for two processes 3)Binary semaphore has no drawback called busy wait or spin lock 4)none of the above
what is true about binary semaphore?1)Binary semaphore has drawback called busy wait or spin lock.2)Binary semaphore is applicable only for two processes3)Binary semaphor...
ajit
3.4k
views
ajit
asked
Sep 12, 2015
Operating System
semaphore
+
–
3
votes
2
answers
146
synchronization
the following five concurrent processes operating on counting semaphore variable (s) which is initialized to 0 P1: wait (s); cs; signal (s); P2: wait (s); cs; signal (s); P3: wait (s); cs; signal (s); P4: signal s); cs; wait (s); P5: signal (s); cs; wait (s); what is the maximum possible value of s? A) 1 B) 2 C) 3 D) 0
the following five concurrent processes operating on counting semaphore variable (s) which is initialized to 0P1: wait (s); cs; signal (s);P2: wait (s); cs; signal (s);P3...
pritika kundu
1.6k
views
pritika kundu
asked
Aug 11, 2015
Operating System
semaphore
process-synchronization
operating-system
+
–
0
votes
3
answers
147
How to implement the given using only 2 semaphores?
Shefali
527
views
Shefali
asked
Jul 27, 2015
Operating System
semaphore
process-synchronization
+
–
1
votes
1
answer
148
Question number 5.24
Question 5.24
Question 5.24
Gaurab Ghosh
548
views
Gaurab Ghosh
asked
Jun 30, 2015
Operating System
semaphore
+
–
1
votes
1
answer
149
To allow only one process in the critical section, value of a binary semaphore is initialized to __?
Vikrant Singh
824
views
Vikrant Singh
asked
Feb 1, 2015
Operating System
operating-system
process-synchronization
semaphore
binary-semaphore
+
–
27
votes
2
answers
150
GATE IT 2006 | Question: 57
The wait and signal operations of a monitor are implemented using semaphores as follows. In the following, $x$ is a condition variable, mutex is a semaphore initialized to $1$, $x$_sem is a semaphore initialized to $0$, $x$_count is the number of processes waiting on semaphore $x$_sem, ... $V(next), P(x\_sem)$ $P(next), V(x\_sem)$ $P(x\_sem), V(x\_sem)$
The wait and signal operations of a monitor are implemented using semaphores as follows. In the following,$x$ is a condition variable,mutex is a semaphore initialized to ...
Ishrat Jahan
6.5k
views
Ishrat Jahan
asked
Nov 1, 2014
Operating System
gateit-2006
operating-system
process-synchronization
semaphore
normal
+
–
Page:
« prev
1
2
3
4
5
6
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register