Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged semaphore
4
votes
1
answer
1
GO Classes Test Series 2024 | Mock GATE | Test 13 | Question: 49
We want to use semaphores to implement a shared critical section (CS) among three threads $\mathrm{T} 1$, $\mathrm{T} 2$, and $\mathrm{T} 3$ ... What is the minimum number of binary semaphores we need in order to enforce this ordering?
We want to use semaphores to implement a shared critical section (CS) among three threads $\mathrm{T} 1$, $\mathrm{T} 2$, and $\mathrm{T} 3$.We want to enforce the execut...
GO Classes
402
views
GO Classes
asked
Jan 28
Operating System
goclasses2024-mockgate-13
goclasses
numerical-answers
operating-system
process-synchronization
semaphore
2-marks
+
–
0
votes
1
answer
2
Semaphores
Can a counting semaphore acquire a negative value? S = 2; 15 P operations done, should the semaphore be 0 or -13
Can a counting semaphore acquire a negative value?S = 2;15 P operations done, should the semaphore be 0 or -13
Mrityudoot
178
views
Mrityudoot
asked
Jan 27
Operating System
semaphore
operating-system
process-synchronization
+
–
4
votes
2
answers
3
GO Classes Test Series 2024 | Mock GATE | Test 11 | Question: 19
Consider three concurrently executing threads in the same process using two semaphores $\text{s}1$ and $\text{s2}.$ Assume $\text{s1}$ has been initialized to $1$, while $\text{s2}$ has been initialized to $0.$ ... ); /* thread C */ P(s1); x = x+3; V(s2); V(s1); $6$ $12$ $18$ $36$
Consider three concurrently executing threads in the same process using two semaphores $\text{s}1$ and $\text{s2}.$ Assume $\text{s1}$ has been initialized to $1$, while ...
GO Classes
527
views
GO Classes
asked
Jan 13
Operating System
goclasses2024-mockgate-11
goclasses
operating-system
semaphore
threads
multiple-selects
1-mark
+
–
0
votes
0
answers
4
Operating system binary semaphores
Find initial values of binary semaphores X and Y. P and V operation for counting semaphore b is defined as: P(b): b--; wait if b<0; V(b): b++; wakeup any waiting process in b if b<=0; Pa (wait) and Va (signal) are implemented as: P(b): Pa(Y); b--; if(b<0) { Va(Y); Pa(X); } else Va(Y); V(b): Pa(Y); b++; if(b<=0) { Va(Y); Va(X); }
Find initial values of binary semaphores X and Y. P and V operation for counting semaphore b is defined as:P(b): b ; wait if b<0;V(b): b++; wakeup any waiting process in ...
jasper
350
views
jasper
asked
Oct 21, 2023
Others
operating-system
semaphore
binary-tree
+
–
0
votes
1
answer
5
process synchronization
How to approach synchronization (specifically semaphore) question, there size are really intimidating and i’m unable to decode the code written? What to do??
How to approach synchronization (specifically semaphore) question, there size are really intimidating and i’m unable to decode the code written? What to do??
N3314nch41
341
views
N3314nch41
asked
Sep 10, 2023
Operating System
process-synchronization
operating-system
semaphore
critical-section
self-doubt
+
–
0
votes
1
answer
6
NPTEL : Synchronisation (semaphore)
In a certain application, the initial value of a counting semaphore s is 10. The following operations were completed on the semaphore in the given order 5P, 20P, 2V, 18P, 5V, 10P, 1V. The new value of counting semaphore is _____________ ?
In a certain application, the initial value of a counting semaphore s is 10. The following operations were completed on the semaphore in the given order 5P, 20P, 2V, 18P,...
roopkathaaa
1.2k
views
roopkathaaa
asked
Aug 25, 2023
Operating System
operating-system
semaphore
+
–
0
votes
1
answer
7
OS handout
Let m[0]…m[4] be mutexes (binary semaphores) and P[0] …. P[4] be processes. Suppose each process P[i] executes the following: P(i) { while(1) { P(m[i]); P(m[(i+1)%4]; <CS> V(m[i]); V(m[(i+1)%4]; } } What is the maximum no. Of processes that can be in<CS> .......
Let m[0]…m[4] be mutexes (binary semaphores) and P[0] …. P[4] be processes.Suppose each process P[i] executes the following:P(i){ while(1) { P(m[i]); ...
Aniket1710
411
views
Aniket1710
asked
Jul 20, 2023
Operating System
semaphore
+
–
17
votes
2
answers
8
GATE CSE 2023 | Question: 28
Consider the two functions $\textsf{incr}$ and $\textsf{decr}$ shown below. incr(){ decr(){ wait(s); wait(s); X = X+1; X = X-1; signal(s); signal(s); } } There are $5$ threads each invoking $\textsf{incr}$ once, and $3$ threads each ... of the following choices corresponds to the minimum possible values of $\text{V1, V2},$ respectively? $15,7$ $7,7$ $12,7$ $12,8$
Consider the two functions $\textsf{incr}$ and $\textsf{decr}$ shown below. incr(){ decr(){ wait(s); wait(s); X = X+1; X = X-1; signal(s); signal(s); } }There are $5$ thr...
admin
11.8k
views
admin
asked
Feb 15, 2023
Operating System
gatecse-2023
operating-system
semaphore
2-marks
+
–
0
votes
0
answers
9
OS Self doubt (Semaphore)
At the end of chapter 2, we studied a solution to the readers and writers problem, given below:- In this solution, as long as one reader is having the resource any new reader can get access to the resource. Thus, the writer will ... expressing interest the writer will also have to wait for all the existing resource-occupyingreader(s) to be done and release the resource.
At the end of chapter 2, we studied a solution to the readers and writers problem, given below:-In this solution, as long as one reader is having the resource any new rea...
legacy
303
views
legacy
asked
Nov 27, 2022
Operating System
self-doubt
semaphore
+
–
0
votes
1
answer
10
Process Synchronisation
What is the significance of infinite loop that is written in every example of process synchronisation? What would happen if there wasn't any infinite loop?
What is the significance of infinite loop that is written in every example of process synchronisation? What would happen if there wasn't any infinite loop?
ajayraho
876
views
ajayraho
asked
Oct 23, 2022
Operating System
operating-system
process-synchronization
semaphore
process-scheduling
inter-process-communication
+
–
0
votes
1
answer
11
Ace Test Series
Neelu Lalchandani
547
views
Neelu Lalchandani
asked
Aug 19, 2022
Operating System
ace-test-series
operating-system
semaphore
mutex
+
–
Page:
1
2
3
4
5
6
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register