Login
Register
@
Dark Mode
Profile
Edit my Profile
Messages
My favorites
Register
Activity
Q&A
Questions
Unanswered
Tags
Subjects
Users
Ask
Previous Years
Blogs
New Blog
Exams
Dark Mode
Recent questions tagged semaphore
6
votes
2
answers
91
ISRO-DEC2017-70
A counting semaphore was initialized t o $7$. Then $\text{20 P (wait)}$ operations and$\text{x V (signal)}$ operations were completed on this semaphore. If the final value of semaphore is $5$, then the value $x$ will be $0$ $13$ $18$ $5$
gatecse
asked
in
Operating System
Dec 17, 2017
by
gatecse
3.2k
views
isrodec2017
semaphore
0
votes
1
answer
92
Problem regarding mutual exclusion
Process P1 Process P2 P(S1) P(S1) P(S2) P(S2) Critical Section Critical Section V(S2) V(S1) V(S1) V(S2) In one of the Gateoverflow tests, this question was given and it was told that in the above case mutual exclusion is not ... section. As far as the order of unlocking, I dont see a problem there. Can someone please explain why mutual exclusion is not guaranteed?
humblefool
asked
in
Operating System
Dec 13, 2017
by
humblefool
899
views
operating-system
deadlock-prevention-avoidance-detection
process-synchronization
semaphore
critical-section
1
vote
0
answers
93
Bounded Wait
Process Pi repeat flag[i] = true; while ( flag[j] ) do no-op; < critical - section > flag[i] = false; < remainder - section > until false; Note : "i" refer0s to current process and "j" refers to another process. How Bounded Wait is satisfied here?
Shubhanshu
asked
in
Operating System
Dec 7, 2017
by
Shubhanshu
1.9k
views
operating-system
process-synchronization
deadlock-prevention-avoidance-detection
semaphore
bounded-waiting
1
vote
2
answers
94
Starvation (Binary Semaphore )
Given Processes P1: Wait(Sx); Wait(Sy); Do something;Signal(Sx); Signal(Sy); and Process P2: Wait(Sx); Wait(Sy); Do something;Signal(Sy); Signal(Sx); . Will it ever lead to starvation ?
sumit chakraborty
asked
in
Operating System
Nov 26, 2017
by
sumit chakraborty
960
views
semaphore
operating-system
starvation
2
votes
2
answers
95
Semaphores { Ace }
Pseudocode: Int x = 0 , y =20; Semaphores SX=1 , SY= 1; Parbegin Begin P(SX) , P(SY) ; X=X+1; V(SY), V(SX); End Begin P(SY) , P(SX) ; X=Y+2; V(SX), V(SY); End Parend Question: Final Values of X? I am getting 1, 22 and deadlock. How come answer is 22, 23 and deadlock possible??
vishwa ratna
asked
in
Operating System
Nov 8, 2017
by
vishwa ratna
663
views
operating-system
semaphore
process-synchronization
1
vote
1
answer
96
Ace Test Series: Operating System - Semaphore
It says as follows: Pseudocode Integer X = 0 , Y = 23 ; Semaphore mx = 1 , my = Null ; Codebegin Begin P(mx); x= x+1; V(my); End Begin P(my); x= y+1; V(mx); End Question: Possible final values of X?? I tried to find the values and i concluded that 1 and 24 could be the final values but solution says only 24 :( Any idea??
vishwa ratna
asked
in
Operating System
Nov 8, 2017
by
vishwa ratna
951
views
semaphore
operating-system
process-synchronization
ace-test-series
1
vote
2
answers
97
semaphores
Parshu gate
asked
in
Operating System
Nov 6, 2017
by
Parshu gate
832
views
process-synchronization
semaphore
operating-system
4
votes
2
answers
98
Semaphore
mutex a = 1,b = 0; For P(0): while(1) { P(a); print(1); v(b); } For P(1): while(1) { P(b); print(0); v(a); } Now obviously the output printed is 10101010..... But my doubt is if they ask a regular expression for this question, then what would it be? $(10)*$ or $1 + (10)*$ So my question is will the semaphores always wakeup the process? Can I get a single $"1"$ ?
Neelay Upadhyaya
asked
in
Operating System
Oct 31, 2017
by
Neelay Upadhyaya
1.8k
views
semaphore
operating-system
0
votes
3
answers
99
Process Synchronisation ( binary semaphores)
Consider the below program as two concurrent processes: Semaphore x:= 0; P1: repeat forever P2: repeat forever 1.V(x); 4. P(x); 2.Compute; 5.Compute; 3.P(x); 6.V(x); Consider the following statements about process P1 & P2: (1) ... chance to run , and it wil starve (THIS IS WHAT I THOUGHT THE ANSWER SHOULD BE , PLEASE COMMENT, IF I AM WRONG ANYWHERE)
NIKU
asked
in
Operating System
Oct 28, 2017
by
NIKU
1.0k
views
process-synchronization
operating-system
semaphore
inter-process-communication
process-scheduling
0
votes
1
answer
100
Process Synchronisation
11. Consider the following program: Const int n= 10 int Count= 0 Void A( ) { int i; for(i= 1 to n) Count= Count + 1; } Main ( ) { Par begin A( ); A( ); A( ); A( ); Par end } What is the minimum and maximum possible value of count after the ... 40 (b) 2, 40 (c) 3, 40 (d) 4, 40 NOTE: I am not able to understand what does "par begin" and "par end" indicates
NIKU
asked
in
Operating System
Oct 28, 2017
by
NIKU
587
views
process-synchronization
operating-system
semaphore
inter-process-communication
1
vote
1
answer
101
Proces Synchronisation
Consider the following algorithm as a solution to the Critical Section problem. The process shares two variables: var flag: array [0 .1] of Boolean; turn= 0 ..1; Initially flag [0]= flag [1]= false; turn= 0 (or) 1; the structure of process Pi is like repeat flag[i ... flag [i]= true & turn= j; (d) flag [i]= false & turn= i; Solution: Option (a) (need the explanation)
NIKU
asked
in
Operating System
Oct 26, 2017
by
NIKU
1.2k
views
operating-system
interview
process-synchronization
process-scheduling
semaphore
3
votes
4
answers
102
Process Synchronisation
Consider the below Algorithm: P0: Process= 0 P1: Process= 1 other= 1-Process other= 1-Process while (flag!= Process); while (flag!= Process); Enter CS Enter CS flag= other. flag= other. (a) The ... guarantees Mutual Exclusion (b) The algorithm is busy waiting solution (c) The algorithm does not guarantee progress (d) The algorithm guarantee Bounded waiting
NIKU
asked
in
Operating System
Oct 26, 2017
by
NIKU
1.6k
views
operating-system
process-synchronization
process-scheduling
semaphore
2
votes
2
answers
103
Process Synchronisation Of Operating System
Consider the below Algorithm where flag and lock are global variables: P0: P1: while (flag= =1 && lock= = 0); while (flag= = 0 && lock= = 1); Enter CS Enter CS lock= 0 flag= 0 flag= 1 lock= 1 (a) The above algorithm is deadlock free (b) The above algorithm guarantees Mutual Exclusion (c) Both (a) & (b) (d) None of the above
NIKU
asked
in
Operating System
Oct 26, 2017
by
NIKU
1.5k
views
operating-system
process-scheduling
process-synchronization
semaphore
0
votes
1
answer
104
Semaphores
s = 0 initially A : down(s) B : down(s) CS CS up(s) up(s) C : down(s) D : up(s) CS CS up(s) down(s) E : up(s) F : up(s) CS CS down(s) down(s) What is the maximum value of s? Doubt : I think max value of s should be 1 as P and V are atomic operations. Also nowhere the value of s is stored in memory here. But the answer given is 3. What concept am I missing?
just_bhavana
asked
in
Operating System
Sep 27, 2017
by
just_bhavana
293
views
operating-system
semaphore
1
vote
1
answer
105
UGC NET CSE | December 2009 | Part 2 | Question: 38
A semaphore count of negative n means (s = – n) that the queue contains ________ waiting processes. (A) n + 1 (B) n (C) n – 1 (D) 0
rishu_darkshadow
asked
in
Operating System
Sep 17, 2017
by
rishu_darkshadow
1.1k
views
ugcnetcse-dec2009-paper2
operating-system
semaphore
3
votes
1
answer
106
Counting Semaphores
2. Assume that ‘C’ is a Counting Semaphore initialized to value ‘10’. Consider the following program segment: P(C); V(C); P(C); P(C); P(C); V(C); V(C) V(C); V(C); V(C); P(C); V(C); V(C); P(C) What is the value of C? a) 8 b)10 c)12 d)14
ashutoshaay26
asked
in
Operating System
Sep 3, 2017
by
ashutoshaay26
4.8k
views
semaphore
process-synchronization
operating-system
0
votes
1
answer
107
Operation System -> Process Synchronisation -> Counting Semaphores
Struct Semaphore { int value; Queue type L; } Down (Semaphore S) { S.value = S.value -1; if(S.value<0) { put process in L; sleep(); } else return; } Up(Semaphore S) { S.value = S. ... I'm wrong somewhere, please correct me. I referred Tanenbaum and Galvin but didn't find any such explanation for Counting Semaphores)
rakeshgsharma
asked
in
Operating System
Aug 23, 2017
by
rakeshgsharma
684
views
operating-system
process-synchronization
process-scheduling
semaphore
3
votes
1
answer
108
Producer Consumer Problem
Consider the producer-consumer problem solution using semaphore. Which of the following condition below synchronization mechanism satisfies. Mutual Exclusion Bounded Waiting Progress Architecural Neutral mutex buffer_mutex; // similar to "semaphore buffer_mutex = ... buffer_mutex); item = removeItemFromBuffer(); up(buffer_mutex); up(emptyCount); consumeItem(item); } }
Durgesh Singh
asked
in
Operating System
Jul 22, 2017
by
Durgesh Singh
2.6k
views
operating-system
process-synchronization
inter-process-communication
semaphore
1
vote
1
answer
109
Counting Semaphore
If value of counting semaphore value is 7, and then 20 P operations and 'x' V operations are performed. Now value of semaphore is 5. What is x?? iam getting ans as 18. please correct me if Iam wrong.
AnilGoudar
asked
in
Operating System
May 12, 2017
by
AnilGoudar
1.2k
views
operating-system
semaphore
5
votes
2
answers
110
ISRO2017-71
At a particular time the value of counting semaphore is 10. It will become 7 after: 3 V operations 3 P operations 5 V operations and 2 P operations 2 V operations and 5 P operations
sh!va
asked
in
Operating System
May 7, 2017
by
sh!va
13.5k
views
isro2017
operating-system
semaphore
3
votes
3
answers
111
Finding initial values of counting semaphore
Below are four concurrent processes and three counting semaphores. What must be the initial values of the three semaphores, so that output “TGE” is obtained?
GateAspirant999
asked
in
Operating System
Feb 14, 2017
by
GateAspirant999
2.5k
views
operating-system
semaphore
process-synchronization
2
votes
1
answer
112
Test by Bikram | Mock GATE | Test 3 | Question: 48
The following five concurrent processes operate on counting semaphore variable $\left ( S \right )$, which is initialized to $0$. P1 : wait$\left ( s \right )$ ; $cs$ ; signal$\left ( s \right )$ ; P2 : wait$\left ( s \right )$ ; $cs$ ; ... signal$\left ( s \right )$ ; $cs$ ; wait $\left ( s \right )$; The maximum possible value of $S$ is ______.
Bikram
asked
in
GATE
Feb 9, 2017
by
Bikram
422
views
tbb-mockgate-3
numerical-answers
operating-system
process-synchronization
semaphore
0
votes
0
answers
113
Semaphore
Let S be the binary semaphore variable S = 0 initially. Assume that no blocked processes exist in the system. The following signal (V), wait (P) operations are performed. The number of blocked processes at the end are _________. 4 P, 6 V, 9 P, 13 V, 14 P
srestha
asked
in
Operating System
Feb 5, 2017
by
srestha
1.7k
views
semaphore
operating-system
0
votes
2
answers
114
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?
Samujjal Das
asked
in
Operating System
Feb 5, 2017
by
Samujjal Das
4.0k
views
binary-semaphore
semaphore
operating-system
1
vote
1
answer
115
MadeEasy Subject Test: Operating System - Semaphores
vaishali jhalani
asked
in
Operating System
Jan 30, 2017
by
vaishali jhalani
575
views
operating-system
made-easy-test-series
semaphore
1
vote
1
answer
116
Semaphore bounded wait
Does semaphore solution fulfill the condition of bounded wait for more than 2 processes I know we can implement the waiting list in such a way that makes it satisfy bounded wait but what is the standard?
Pankaj Joshi
asked
in
Operating System
Jan 12, 2017
by
Pankaj Joshi
1.5k
views
operating-system
semaphore
process-synchronization
0
votes
2
answers
117
OS Semaphore
sanyam53
asked
in
Operating System
Jan 10, 2017
by
sanyam53
1.0k
views
operating-system
semaphore
test-series
0
votes
1
answer
118
Correct order of semaphores
vaishali jhalani
asked
in
Operating System
Jan 7, 2017
by
vaishali jhalani
1.1k
views
semaphore
operating-system
0
votes
1
answer
119
SemaPhore
monty
asked
in
Operating System
Jan 6, 2017
by
monty
943
views
operating-system
process-synchronization
semaphore
0
votes
1
answer
120
[Strong/Weak Semaphore] Operating system Chapter -5 William Stallings 7th Edition
How the processes are removed from the Semaphore suspended queue?Is it implementation dependent or is it FIFO always?If not FIFO then how starvation will be handled.I got this doubt while reading following ... Priority based/SJf..etc ,then it will neither be strong semaphore nor weak semaphore?# Please clarify
rahul sharma 5
asked
in
Operating System
Dec 4, 2016
by
rahul sharma 5
3.3k
views
operating-system
process-synchronization
algorithms
semaphore
Page:
« prev
1
2
3
4
5
6
next »
Subscribe to GATE CSE 2024 Test Series
Subscribe to GO Classes for GATE CSE 2024
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
Recent Posts
Post GATE 2024 Guidance [Counseling tips and resources]
GATE CSE 2024 Result Responses
[Project Contest] Pytorch backend support for MLCommons Cpp Inference implementation
Participating in MLCommons Inference v4.0 submission (deadline is February 23 12pm IST)
IIITH PGEE 2024 Test Series by GO Classes
Subjects
All categories
General Aptitude
(3.5k)
Engineering Mathematics
(10.4k)
Digital Logic
(3.6k)
Programming and DS
(6.2k)
Algorithms
(4.8k)
Theory of Computation
(6.9k)
Compiler Design
(2.5k)
Operating System
(5.2k)
Databases
(4.8k)
CO and Architecture
(4.0k)
Computer Networks
(4.9k)
Artificial Intelligence
(79)
Machine Learning
(48)
Data Mining and Warehousing
(25)
Non GATE
(1.4k)
Others
(2.7k)
Admissions
(684)
Exam Queries
(1.6k)
Tier 1 Placement Questions
(17)
Job Queries
(80)
Projects
(11)
Unknown Category
(870)
64.3k
questions
77.9k
answers
244k
comments
80.0k
users
Recent questions tagged semaphore
Recent Blog Comments
category ?
Hi @Arjun sir, I have obtained a score of 591 in ...
download here
Can you please tell about IIT-H mtech CSE self...
Please add your admission queries here:...