Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Process Synchronization
Recent questions tagged process-synchronization
6
votes
4
answers
361
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
+
–
4
votes
1
answer
362
MadeEasy Test Series: Operating System - Process Synchronization
thor
958
views
thor
asked
Sep 25, 2016
Operating System
made-easy-test-series
operating-system
process-synchronization
+
–
1
votes
1
answer
363
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
+
–
6
votes
1
answer
364
Synchronization | Self-Doubt
1. Does starvation freedom imply bounded- waiting ? 2. Does bounded- waiting imply starvation freedom ? Explain with example.
1. Does starvation freedom imply bounded- waiting ?2. Does bounded- waiting imply starvation freedom ?Explain with example.
vijaycs
2.1k
views
vijaycs
asked
Sep 19, 2016
Operating System
process-synchronization
deadlock-prevention-avoidance-detection
+
–
0
votes
2
answers
365
GATE Overflow | Operating Systems | Test 1 | Question: 19
The E_CS() and L_CS() functions to implement critical section of a process are realized using Test-and-Set instruction as stated below: void E_CS(X) { while(Test-and-Set(X); } void L_CS(X) { X=0; } In above code snippet, X is a ... into CS in FIFO order more than 1 process can enter into CS at same time i only i and ii ii and iii iv only
The E_CS() and L_CS() functions to implement critical section of a process are realized using Test-and-Set instruction as stated below:void E_CS(X) { while(Test-and-Set(X...
Bikram
493
views
Bikram
asked
Sep 3, 2016
Operating System
go-os-1
operating-system
process-synchronization
+
–
1
votes
2
answers
366
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
295
views
Bikram
asked
Sep 3, 2016
Operating System
go-os-1
operating-system
process-synchronization
semaphore
numerical-answers
+
–
6
votes
5
answers
367
GATE Overflow | Operating Systems | Test 1 | Question: 9
Each process $P_i$, where $i= 1$ to $9$ is coded as follows repeat P (mutex) {critical section } V (mutex) forever The code for $P_{10}$ is identical except that it uses $V$ (mutex) instead of $P$ (mutex) and vice ... number of processes that can be inside the critical section at any moment if initial value of the semaphore is 1? 1 2 3 none
Each process $P_i$, where $i= 1$ to $9$ is coded as follows repeat P (mutex) {critical section } V (mutex) foreverThe code for $P_{10}$ is identical except that it uses ...
Bikram
897
views
Bikram
asked
Sep 3, 2016
Operating System
go-os-1
operating-system
process-synchronization
mutex
+
–
1
votes
1
answer
368
GATE Overflow | Operating Systems | Test 1 | Question: 5
Two concurrent processes P1 and P2 want to use 2 resources J1 and J2 in a Mutually Exclusive way. Assume that initially J1 and J2 are both free. The programs executed by these two processes are as below : ... deadlock would not occur Mutual Exclusion is guaranteed, deadlock might occur Mutual Exclusion is not guaranteed, deadlock might occur
Two concurrent processes P1 and P2 want to use 2 resources J1 and J2 in a Mutually Exclusive way. Assume that initially J1 and J2 are both free. The programs executed by ...
Bikram
560
views
Bikram
asked
Sep 3, 2016
Operating System
go-os-1
operating-system
process-synchronization
+
–
4
votes
0
answers
369
GATE Overflow | Operating Systems | Test 1 | Question: 2
Consider Peterson's algorithm for Mutual Exclusion between two concurrent processes $w$ and $f$. The program executed by the processeses are shown below: Process w Process f repeat flag[w]=true; turn=f; while(P) do no-operation; Enter critical ... and turn = w flag[f]=true and turn=f flag[w]=true and turn=f flag[w]=true and turn=w
Consider Peterson's algorithm for Mutual Exclusion between two concurrent processes $w$ and $f$. The program executed by the processeses are shown below:Process wProcess ...
Bikram
491
views
Bikram
asked
Sep 3, 2016
Operating System
go-os-1
operating-system
process-synchronization
peterson-algorithm
+
–
1
votes
1
answer
370
Is bounded waiting and progress ensured in this code using exchange instruction?
Consider the atomic exchange instruction defined as follows: void exchange (int *a, int *b) { int temp; temp = *b; *b = *a; *a = temp; } Now consider the solution to critical section problem based on ... ..., P(n)); 20 } Does the above code meets bounded waiting and progress requirements of critical section problem?
Consider the atomic exchange instruction defined as follows:void exchange (int *a, int *b) { int temp; temp = *b; *b = *a; *a = temp; }Now consider the soluti...
GateAspirant999
583
views
GateAspirant999
asked
Jul 21, 2016
Operating System
deadlock-prevention-avoidance-detection
process-synchronization
+
–
8
votes
3
answers
371
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
+
–
6
votes
1
answer
372
ISRO2011-77
In a system using single processor, a new process arrives at the rate of six processes per minute and each such process requires seven seconds of service time. What is the CPU utilization? 70% 30% 60% 64%
In a system using single processor, a new process arrives at the rate of six processes per minute and each such process requires seven seconds of service time. What is th...
go_editor
5.6k
views
go_editor
asked
Jun 24, 2016
Operating System
isro2011
operating-system
process-synchronization
+
–
12
votes
6
answers
373
ISRO2011-10
Below is the precedence graph for a set of tasks to be executed on a parallel processing system $S$. What is the efficiency of this precedence graph on $S$ if each of the tasks $T_1, \dots, T_8$ takes the same time and the system $S$ has five processors? $25\%$ $40\%$ $50\%$ $90\%$
Below is the precedence graph for a set of tasks to be executed on a parallel processing system $S$.What is the efficiency of this precedence graph on $S$ if each of the ...
go_editor
6.9k
views
go_editor
asked
Jun 21, 2016
Operating System
isro2011
operating-system
process-synchronization
+
–
12
votes
1
answer
374
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.7k
views
go_editor
asked
Jun 10, 2016
Operating System
isro2007
operating-system
process-synchronization
ugcnetcse-june2010-paper2
semaphore
+
–
15
votes
2
answers
375
ISI2011-PCB-CS-5c
One of your classmates has suggested the following modified version of a standard scheme for solving the $2$-process critical section problem (CSP). shared char want[2] = {0,0}; shared int turn = 0; 1. P_i() 2. { while (1) { 3. turn = j; ... instructions executed by two processes $P_0$ and $P_1$. Modify the above scheme so that it becomes a correct solution to the $2$-process CSP.
One of your classmates has suggested the following modified version of a standard scheme for solving the $2$-process critical section problem (CSP).shared char want = {0...
go_editor
1.2k
views
go_editor
asked
Jun 3, 2016
Operating System
isi2011-pcb-cs
descriptive
operating-system
process-synchronization
normal
+
–
1
votes
1
answer
376
ISI2012-PCB-CS-1b
Two processes $P_1$ and $P_2$ have a common shared variable count. While $P_1$ increments it, $P_2$ decrements it. Given that $R_0$ is a register, the corresponding assembly language codes are: $P_1$ count++ $P_2$ count-- MOV $count$ $R_0$ ... $P_1$ and $P_2$ are executed simultaneously.
Two processes $P_1$ and $P_2$ have a common shared variable count. While $P_1$ increments it, $P_2$ decrements it. Given that $R_0$ is a register, the corresponding assem...
go_editor
588
views
go_editor
asked
Jun 2, 2016
Operating System
descriptive
isi2012-pcb-cs
operating-system
process-synchronization
+
–
10
votes
3
answers
377
ISI2013-PCB-CS-5a
Suppose that an operating system provides two functions, $block()$ which puts the calling process on the blocked queue, and $wakeup(P)$ which moves process $P$ to the runnable queue if it is currently on the blocked queue (otherwise, its behaviour is unpredictable). Consider ... the initialisation of the semaphore(s), and the calls to $wait()$ and $signal()$ made by $A$ and $B$.
Suppose that an operating system provides two functions, $block()$ which puts the calling process on the blocked queue, and $wakeup(P)$ which moves process $P$ to the run...
go_editor
1.1k
views
go_editor
asked
Jun 1, 2016
Operating System
descriptive
isi2013-pcb-cs
operating-system
process-synchronization
+
–
3
votes
2
answers
378
True False on TSL(Test Set Lock)
Which of the following is true/false Explain it. 1) TSL solution method is deadlock free. 2)TSL solution method is starvation free. 3)TSL solution method process enter into fcfs order.
Which of the following is true/false Explain it.1) TSL solution method is deadlock free.2)TSL solution method is starvation free.3)TSL solution method process enter into...
Nils
2.5k
views
Nils
asked
May 25, 2016
Operating System
operating-system
process-synchronization
test-and-set
+
–
16
votes
2
answers
379
CMI2012-A-10
Consider the following functions $f$ and $g$. f(){ x = x-50; y = y+50; } g( ) { a = a+x; a = a+y; } Suppose we start with initial values of $100$ for $x, 200$ for $y$, and $0$ for $a$, and then execute $f$ and $g$ in parallel - that ... either execute one statement from $f$ or one statement from $g$. Which of the following is not a possible final value of $a$? $300$ $250$ $350$ $200$
Consider the following functions $f$ and $g$. f(){ x = x-50; y = y+50; }g( ) { a = a+x; a = a+y; }Suppose we start with initial values of $100$ for $x, 200$ for $y$, and ...
go_editor
1.3k
views
go_editor
asked
May 22, 2016
Operating System
cmi2012
operating-system
process-synchronization
+
–
55
votes
7
answers
380
GATE CSE 2003 | Question: 81
Suppose we want to synchronize two concurrent processes $P$ and $Q$ using binary semaphores $S$ and $T$. The code for the processes $P$ and $Q$ ... $1$ $V(S)$ at $W, V(T)$ at $X, P(S)$ at $Y, P(T)$ at $Z, S$ and $T$ initially $1$
Suppose we want to synchronize two concurrent processes $P$ and $Q$ using binary semaphores $S$ and $T$. The code for the processes $P$ and $Q$ is shown below.$$\begin{ar...
go_editor
15.0k
views
go_editor
asked
Apr 24, 2016
Operating System
gatecse-2003
operating-system
process-synchronization
normal
+
–
42
votes
4
answers
381
GATE CSE 2006 | Question: 79
Barrier is a synchronization construct where a set of processes synchronizes globally i.e., each process in the set arrives at the barrier and waits for all others to arrive and then all processes leave the barrier. Let the number of processes ... at the beginning of the barrier and re-enabled at the end. The variable process_left is made private instead of shared
Barrier is a synchronization construct where a set of processes synchronizes globally i.e., each process in the set arrives at the barrier and waits for all others to arr...
go_editor
8.4k
views
go_editor
asked
Apr 24, 2016
Operating System
gatecse-2006
operating-system
process-synchronization
normal
+
–
8
votes
2
answers
382
GATE CSE 1991 | Question: 11,b
Consider the following scheme for implementing a critical section in a situation with three processes $P_i, P_j$ and $P_k$. Pi; repeat flag[i] := true; while flag [j] or flag[k] do case turn of j: if flag [j] then begin flag ... in which a waiting process can never enter the critical section? If so, explain and suggest modifications to the code to solve this problem
Consider the following scheme for implementing a critical section in a situation with three processes $P_i, P_j$ and $P_k$.Pi;repeat flag[i] := true; while flag [j] or fl...
go_editor
2.1k
views
go_editor
asked
Apr 18, 2016
Operating System
gate1991
process-synchronization
normal
operating-system
descriptive
+
–
2
votes
2
answers
383
MadeEasy Test Series: Operating System - Process Synchronization
Description of Peterson's Algorithm & also for which problem it is used to solve (1) deadlock (2) mutual exclusion (3) Thrashing (4) Paging.
Description of Peterson's Algorithm & also for which problem it is used to solve(1) deadlock(2) mutual exclusion(3) Thrashing(4) Paging.
Jitendra Verma
3.1k
views
Jitendra Verma
asked
Mar 11, 2016
Operating System
made-easy-test-series
operating-system
process-synchronization
+
–
112
votes
7
answers
384
GATE CSE 2016 Set 1 | Question: 50
Consider the following proposed solution for the critical section problem. There are $n$ processes : $P_0....P_{n-1}$. In the code, function $\text{pmax}$ ... in the critical section at any time The bounded wait condition is satisfied The progress condition is satisfied It cannot cause a deadlock
Consider the following proposed solution for the critical section problem. There are $n$ processes : $P_0....P_{n-1}$. In the code, function $\text{pmax}$ returns an inte...
Sandeep Singh
47.5k
views
Sandeep Singh
asked
Feb 12, 2016
Operating System
gatecse-2016-set1
operating-system
process-synchronization
difficult
ambiguous
+
–
42
votes
8
answers
385
GATE CSE 2016 Set 2 | Question: 48
Consider the following two-process synchronization solution. ... synchronization solution. This solution violates mutual exclusion requirement. This solution violates progress requirement. This solution violates bounded wait requirement.
Consider the following two-process synchronization solution.$$\begin{array}{l|l}\hline \text{PROCESS 0 } & \text{Process 1 }\\ \\ \text{Entry: loop while (turn == 1);...
Akash Kanase
15.1k
views
Akash Kanase
asked
Feb 12, 2016
Operating System
gatecse-2016-set2
operating-system
process-synchronization
normal
+
–
9
votes
2
answers
386
Does Deadlock imply no Bounded waiting Or no Progress or BOTH of These?
Does Deadlock imply no Bounded waiting Or no Progress or BOTH of These?Also provide explanation in support
Does Deadlock imply no Bounded waiting Or no Progress or BOTH of These?Also provide explanation in support
Anurag_s
6.8k
views
Anurag_s
asked
Jan 30, 2016
Operating System
deadlock-prevention-avoidance-detection
process-synchronization
+
–
5
votes
3
answers
387
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
+
–
3
votes
3
answers
388
Progress guaranteed/Mutual Exclusion/Deadlock or not?
var occupied var blocked Enter Region: { If (occupied) { then blocked= blocked +1 sleep ( ); } else occupied= 1; } Exit Region: { occupied= 0 If (blocked) { then wakeup (process); blocked= blocked – 1; } } True/False (1) Mutual Exclusion is guaranteed? (2) Deadlock free Algorithm? (3) Progress is guaranteed?
var occupiedvar blockedEnter Region:{If (occupied) {then blocked= blocked +1sleep ( );}else occupied= 1;}Exit Region:{occupied= 0If (blocked) {then wakeup (process);block...
Purple
2.3k
views
Purple
asked
Jan 29, 2016
Operating System
operating-system
process-synchronization
deadlock-prevention-avoidance-detection
+
–
1
votes
3
answers
389
Deadlock vs. Mutual Xclusion
S1. All synchronisation mechanisms that Do not Prevent Deadlock, guarantee mutual exclusion. S2. All synchronisation mechanisms that guarantee mutual exclusion and prevent deadlock will prevent starvation. a) s1 is only correct statement b) s2 is only correct statement c) both are correct d) none of these
S1. All synchronisation mechanisms that Do not Prevent Deadlock, guarantee mutual exclusion.S2. All synchronisation mechanisms that guarantee mutual exclusion and prevent...
Aspi R Osa
518
views
Aspi R Osa
asked
Jan 21, 2016
Operating System
process-synchronization
+
–
0
votes
2
answers
390
synchronisation
The above synchronisation procedure satisfies 1. Mutual exclusion is guranteed 2.Progress is not guranteed 3.Bounded wait is not guranteed 4Deadlock may occur I am getting all of the above. Is it correct?
The above synchronisation procedure satisfies 1. Mutual exclusion is guranteed2.Progress is not guranteed3.Bounded wait is not guranteed4Deadlock may occur I am getting a...
chat28
699
views
chat28
asked
Jan 15, 2016
Operating System
operating-system
process-synchronization
+
–
Page:
« prev
1
...
8
9
10
11
12
13
14
15
16
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register