Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Process Synchronization
Recent questions tagged process-synchronization
1
votes
1
answer
241
MadeEasy Test Series: Operating System - Process Synchronization
Consider two processes P1 and P2 accessing shared variable x' and y' protected by two binary semaphores Sx and Sy respectively both initialized to 1. wait' and signal' denote the usual semaphore operators, where ... to do these operations again. Also both these process executing two simple statement which will take constant time.
Consider two processes P1 and P2 accessing shared variable ‘x’ and ‘y’ protected by two binary semaphores Sx and Sy respectively both initialized to 1. ‘wait’...
Hemant Parihar
1.5k
views
Hemant Parihar
asked
Jan 18, 2018
Operating System
operating-system
process-synchronization
made-easy-test-series
+
–
1
votes
0
answers
242
Ace Test series: Operating System - Process Synchronization
I understand the Question Correctly. i know Mutual Exclusion ,But Can Anyone explain What is MUTUAL INCLUSION, ??
I understand the Question Correctly. i know Mutual Exclusion ,But Can Anyone explain What is MUTUAL INCLUSION, ??
Harsh Mehta
937
views
Harsh Mehta
asked
Jan 13, 2018
Operating System
operating-system
system
ace-test-series
mutual-exclusion
deadlock-prevention-avoidance-detection
process-synchronization
+
–
1
votes
1
answer
243
self doubt
Process P0:- Process P1 while(1) while(1) { { int[0]=True; int[1]=True; while(int[1]==True); while(int[0]=True); //CS// //CS// int[0]=False; int[1]=False; } } Initially, int[0]=int[1]=false; Will this algorithm satisfy progress and why?
Process P0:- Process P1while(1) ...
charul
330
views
charul
asked
Jan 4, 2018
Operating System
operating-system
process-synchronization
+
–
1
votes
1
answer
244
Deadlock progress
Deadlock --> no progress Does progress ---> no deadlock...?
Deadlock no progressDoes progress - no deadlock...?
gari
574
views
gari
asked
Jan 3, 2018
Operating System
operating-system
process-synchronization
+
–
3
votes
0
answers
245
OS critical section
Let 'n' processes competing to enter their critical sections and mutex be a global binary semaphore initialized to 1. The process is coded as follows: Signal(mutex); C.S; wait(mutex); Which of the following statements are TRUE? s1: This ... decision is not postponed indefinitely and there is no competition to enter as well. can we take this as progress? Please answer.
Let 'n' processes competing to enter their critical sections and mutex be a global binary semaphore initialized to 1. The process is coded as follows:Signal(mutex); C...
junk_mayavi
655
views
junk_mayavi
asked
Jan 2, 2018
Operating System
process-synchronization
operating-system
critical-section
+
–
1
votes
0
answers
246
Ace Test series: Operating System - Process Synchronization
When multiple processes in a typical IPC environment concurrent tries to update the value of a shared variable, it may result in I) Inconsistency in the value of a variable. II) Data loss III) Deadlock
When multiple processes in a typical IPC environment concurrent tries to update the value of a shared variable, it may result inI) Inconsistency in the value of a variabl...
Abhishek Kumar Singh
713
views
Abhishek Kumar Singh
asked
Dec 31, 2017
Operating System
ace-test-series
operating-system
process-synchronization
+
–
0
votes
0
answers
247
Process Synchronisation
Consider the following program: Const int n= 20 int Count= 0 Void GATE( ) { int i; for(i= 1 to n) Count= Count + 1; } Main ( ) { Par begin GATE( ); GATE( ); GATE( ); Par end } What is the minimum and maximum possible value of count after the completion of the program?
Consider the following program:Const int n= 20int Count= 0Void GATE( ){int i; for(i= 1 to n)Count= Count + 1;}Main ( ){Par beginGATE( );GATE( );GATE( );Par end}What is th...
ankitgupta.1729
697
views
ankitgupta.1729
asked
Dec 14, 2017
Operating System
operating-system
process-synchronization
+
–
0
votes
1
answer
248
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?
Process P1Process P2P(S1)P(S1)P(S2)P(S2)Critical SectionCritical SectionV(S2)V(S1)V(S1)V(S2)In one of the Gateoverflow tests, this question was given and it was told that...
humblefool
912
views
humblefool
asked
Dec 13, 2017
Operating System
operating-system
deadlock-prevention-avoidance-detection
process-synchronization
semaphore
critical-section
+
–
1
votes
1
answer
249
Synchronization mechanism doubt
I read that one of the disadvantage of busy waiting solution to synchronization is that PRIORITY INVERSION can occur in it. My doubt is, does the priority inversion problem only occur in busy waiting solution or it can occur in without busy waiting solution too. Please explain. Thanks.
I read that one of the disadvantage of busy waiting solution to synchronization is that PRIORITY INVERSION can occur in it.My doubt is, does the priority inversion proble...
Mahendra Singh Kanya
845
views
Mahendra Singh Kanya
asked
Dec 11, 2017
Operating System
process-synchronization
operating-system
+
–
1
votes
0
answers
250
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?
Process Pi repeatflag[i] = true; while ( flag[j] ) do no-op; < critical - section flag[i] = false; < remainder - section until false; Note : "i" refer0s to current proc...
Shubhanshu
2.0k
views
Shubhanshu
asked
Dec 7, 2017
Operating System
operating-system
process-synchronization
deadlock-prevention-avoidance-detection
semaphore
bounded-waiting
+
–
1
votes
0
answers
251
Deadlock implies No Progress (in process synchronization) ?
Hi Guys, Deadlock implies no progress. This statement is mentioned at many places. But i just want to verify my reasoning with respect to Progress definition Progress If no process is executing in its critical section and some ... of Deadlock. If my reasoning is not complete or incorrect then please notify. It will be a great help.
Hi Guys,Deadlock implies no progress. This statement is mentioned at many places. But i just want to verify my reasoning with respect to Progress definition ProgressIf no...
Chhotu
832
views
Chhotu
asked
Dec 4, 2017
Operating System
process-synchronization
deadlock-prevention-avoidance-detection
critical-section
progress
+
–
2
votes
2
answers
252
Process Synchronization
If there are n processes executing concurrently using binary semaphore S , (n-1) processes have the code do{ wait(S); <c.s> signal(s); <r.s> }while(1); the code for the n-th process i.e Pn is given by do{ signal(S); <c.s> signal(S); < ... (1); What is the max no. of processes that can be there in the critical section simultaneously? A. 2 B . 3 C. n-1 D. n
If there are n processes executing concurrently using binary semaphore S , (n-1) processes have the code do{ wait(S); <c.s signal(s); <r.s }while(1);the code for the n-th...
Kalpataru Bose
833
views
Kalpataru Bose
asked
Nov 27, 2017
Operating System
process-synchronization
operating-system
critical-section
+
–
2
votes
2
answers
253
Process Synchronization
If there are n processes executing concurrently using binary semaphore S , (n-1) processes have the code do{ wait(S); <c.s> signal(s); <r.s>}while(1); the code for the n-th process i.e Pn is given by do{ signal(S); <c.s> wait(S); <r. ... ; a) What is the max no. of processes that can be there in the critical section simultaneosly ? A. 2 B . 3 C. n-1 D. n
If there are n processes executing concurrently using binary semaphore S , (n-1) processes have the codedo{ wait(S);<c.s>signal(s);<r.s>...
Kalpataru Bose
730
views
Kalpataru Bose
asked
Nov 27, 2017
Operating System
process-synchronization
operating-system
critical-section
+
–
1
votes
1
answer
254
critical section
Consider the following code to access critical section do{ flag[j] = 1; turn = x; while(y); // Critical Section flag[z]=0; // Remainder Section } while(1); The values of x, y and z in the above code for which Mutual exclusion is guaranteed for two process i and j x=j; y=flag[j] ... =flag[i]&&turn=i; z=j x=j; y=flag[i]&&turn=i; z=j x=j; y=flag[j]&&turn=j; z=j
Consider the following code to access critical sectiondo{flag[j] = 1;turn = x;while(y);// Critical Sectionflag[z]=0;// Remainder Section} while(1);The values of x, y and ...
Parshu gate
3.1k
views
Parshu gate
asked
Nov 27, 2017
Operating System
operating-system
critical-section
process-synchronization
+
–
2
votes
2
answers
255
Synchronisation OS
Should we consider bounded waiting if there is already a deadlock? I mean to say "If there is deadlock then surely not bounded waiting" is this statement true alway ? Some solutions follow this rule some solutions not. Thanks in advance :)
Should we consider bounded waiting if there is already a deadlock?I mean to say "If there is deadlock then surely not bounded waiting" is this statement true alway ?Some...
Ashwin Kulkarni
392
views
Ashwin Kulkarni
asked
Nov 26, 2017
Operating System
operating-system
process-synchronization
+
–
1
votes
1
answer
256
Process Synchronization
If deadlock is possible ,how Bounded waiting is ensured? Progress is ensured. Right? If one process doesn't want to enter,it will not block other. Please explain me If I'm wrong.
If deadlock is possible ,how Bounded waiting is ensured? Progress is ensured. Right? If one process doesn't want to enter,it will not block other. Please explain me If I...
atul_21
387
views
atul_21
asked
Nov 22, 2017
Operating System
process-synchronization
+
–
1
votes
0
answers
257
operating system
nikkey123
393
views
nikkey123
asked
Nov 22, 2017
Operating System
operating-system
process-synchronization
+
–
0
votes
0
answers
258
Synchronization
atul_21
315
views
atul_21
asked
Nov 21, 2017
Operating System
process-synchronization
+
–
0
votes
1
answer
259
Process Synchronization
In a given synchronization construct, if there is no deadlock and no strict alternation between two process then is it always true that a process will starve ?
In a given synchronization construct, if there is no deadlock and no strict alternation between two process then is it always true that a process will starve ?
rishi71662data4
613
views
rishi71662data4
asked
Nov 16, 2017
Operating System
process-synchronization
operating-system
critical-section
+
–
0
votes
1
answer
260
OS-question
if c has value =0 initially ....i am getting MAX=2 and minimum =-2..is it correct??
if c has value =0 initially ....i am getting MAX=2 and minimum =-2..is it correct??
SHUBHAM SHASTRI
1.0k
views
SHUBHAM SHASTRI
asked
Nov 16, 2017
Operating System
process-synchronization
+
–
1
votes
1
answer
261
Process Synchronization
which of the following is true? it guarantees mutual exclusion. it is busy waiting solution. it does not guarantees progress. it guarantee bounded waiting. entry_section(int process) { int other = 1-process while (flag!=process); CS } exit_section(int process) { flag = other }
which of the following is true?it guarantees mutual exclusion.it is busy waiting solution.it does not guarantees progress.it guarantee bounded waiting.entry_section(int p...
hacker16
869
views
hacker16
asked
Nov 9, 2017
Operating System
critical-section
process-synchronization
operating-system
+
–
3
votes
0
answers
262
Turn Variable
Turn is shared variable but the values are not shared. Explain?
Turn is shared variable but the values are not shared.Explain?
hacker16
488
views
hacker16
asked
Nov 9, 2017
Operating System
turn-variable
operating-system
process-synchronization
+
–
1
votes
3
answers
263
Bounded Waiting
how this solution does not satisfy bounded waiting? // initially turn = 0 while (turn != 0); turn = 1 CS turn = 0
how this solution does not satisfy bounded waiting?// initially turn = 0 while (turn != 0); turn = 1 CS turn = 0
hacker16
1.1k
views
hacker16
asked
Nov 9, 2017
Operating System
bounded-waiting
operating-system
process-synchronization
turn-variable
+
–
2
votes
1
answer
264
Bounded Waiting
Bounded waiting does not allow: Starvation Busy Waiting A process to wait indefinitely for CS All of Above Ans - d) Explain Option 1 and 2 ?
Bounded waiting does not allow:StarvationBusy WaitingA process to wait indefinitely for CSAll of AboveAns - d)Explain Option 1 and 2 ?
hacker16
5.3k
views
hacker16
asked
Nov 9, 2017
Operating System
bounded-waiting
operating-system
process-synchronization
+
–
2
votes
2
answers
265
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??
Pseudocode:Int x = 0 , y =20;Semaphores SX=1 , SY= 1;ParbeginBegin P(SX) , P(SY) ; X=X+1; V(SY), V(SX); ...
vishwa ratna
678
views
vishwa ratna
asked
Nov 8, 2017
Operating System
operating-system
semaphore
process-synchronization
+
–
1
votes
1
answer
266
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??
It says as follows:PseudocodeInteger X = 0 , Y = 23 ;Semaphore mx = 1 , my = Null ;Codebegin Begin P(mx); x= x+1; V(my); End...
vishwa ratna
987
views
vishwa ratna
asked
Nov 8, 2017
Operating System
semaphore
operating-system
process-synchronization
ace-test-series
+
–
1
votes
2
answers
267
semaphores
Parshu gate
847
views
Parshu gate
asked
Nov 6, 2017
Operating System
process-synchronization
semaphore
operating-system
+
–
2
votes
1
answer
268
Deadlock
There are 5 processes and 10 instances of a Resource. If each process needs ‘P’ instances which is the minimum value of ‘P’ for the deadlock to occur? (a) 1 (b) 2 (c) 3 (d) 4
There are 5 processes and 10 instances of a Resource. If each process needs ‘P’ instances which is the minimum value of ‘P’ for the deadlock to occur?(a) 1 ...
NIKU
3.3k
views
NIKU
asked
Oct 29, 2017
Operating System
deadlock-prevention-avoidance-detection
operating-system
process-synchronization
circular-wait
+
–
0
votes
3
answers
269
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)
Consider the below program as two concurrent processes:Semaphore x:= 0;P1: repeat forever P2: repeat forever1.V(x); ...
NIKU
1.0k
views
NIKU
asked
Oct 28, 2017
Operating System
process-synchronization
operating-system
semaphore
inter-process-communication
process-scheduling
+
–
0
votes
1
answer
270
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
11. Consider the following program:Const int n= 10int Count= 0Void A( ){ int i;for(i= 1 to n)Count= Count + 1;}Main ( ){Par beginA( );A( );A( );A( );Par end}What is the m...
NIKU
609
views
NIKU
asked
Oct 28, 2017
Operating System
process-synchronization
operating-system
semaphore
inter-process-communication
+
–
Page:
« prev
1
...
4
5
6
7
8
9
10
11
12
13
14
...
16
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register