Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged critical-section
0
votes
1
answer
1
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
361
views
N3314nch41
asked
Sep 10, 2023
Operating System
process-synchronization
operating-system
semaphore
critical-section
self-doubt
+
–
0
votes
2
answers
2
What's the standard technique to test if the algorithm satisfies mutual exclusion, progress and bounded waiting or not?
Sorry if this is a stupid question. But it really intrigued me. Same resources at different algorithms are telling different ways to test these stuffs.Here's an algorith...
shivajikobardan
819
views
shivajikobardan
asked
Jul 22, 2023
Operating System
operating-system
deadlock-prevention-avoidance-detection
process-synchronization
critical-section
mutual-exclusion
+
–
0
votes
2
answers
3
process synchronization
Which of the following statements is false? a) Disjoint processes need not use critical section b) Programs with critical sections can never be use simultaneously by more than one process c) A process wanting to enter the critical section currently ... to terminate d) Two different critical sections may be executed concurrently if they do not use the same shared variables
Which of the following statements is false?a) Disjoint processes need not use critical sectionb) Programs with critical sections can never be use simultaneously by more t...
practicalmetal
691
views
practicalmetal
asked
Apr 17, 2023
Operating System
process-synchronization
critical-section
+
–
4
votes
0
answers
4
made east test series - synchronization - OS
Consider the following proposed solution to Dining Philosopher's problem to avoid deadlock. The binary semaphore lock is initialized to 1. Which of the following is correct? Removing (i) and (ii) will not affect the code. It will work fine. Removing (iii) ... fine. All (i), (ii), (iii) and (iv) are necessary. Removal of any of them will affect the code.
Consider the following proposed solution to Dining Philosopher’s problem to avoid deadlock. The binary semaphore lock is initialized to 1.Which of the following is corr...
atulcse
1.0k
views
atulcse
asked
Jan 19, 2022
Operating System
operating-system
process-synchronization
made-easy-test-series
concurrency
critical-section
+
–
0
votes
0
answers
5
Ace test series: Operating System - Critical Data Minimum Value
Consider the following program segments for two different processes (P1, P2) executing concurrently and where a and b are not shared variables, but x starts at zero and is a shared variable Processor #1 Processor #2 for (a = 1; ... + 1; If P1 and P2 execute only once and concurrently, then the final minimum possible value of x is ____
Consider the following program segments for two different processes (P1, P2) executing concurrently and where a and b are not shared variables, but x starts at zero and i...
OneZero
696
views
OneZero
asked
Jan 15, 2019
Operating System
operating-system
ace-test-series
critical-section
+
–
0
votes
0
answers
6
Relating process termination and deadlock with progress requirement of the solution to the critical section problem
Many problems on gateoverflow asks whether the given code satisfies progress requirement of the solution for the critical section problem. Most of these code contain mult...
Raj Singh 1
1.4k
views
Raj Singh 1
asked
Jan 1, 2019
Operating System
operating-system
critical-section
deadlock-prevention-avoidance-detection
mutual-exclusion
busy-wait
+
–
1
votes
1
answer
7
Deciding if mutual exclusion and progress is satisfied
Consider the following Process Pi while(1) { while(turn != i); //critical section turn = j; //remainder section } Process Pj while(1) { while(turn != j); //critical section turn = I; //remainder ... & progress are not satisfied Only mutual exclusion is satisfied Only progress is satisfied Both mutual exclusion and progress are satisfied
Consider the followingProcess Piwhile(1){ while(turn != i); //critical section turn = j; //remainder section}Process Pjwhile(1){ while(turn != j); //critical ...
Raj Singh 1
2.1k
views
Raj Singh 1
asked
Jan 1, 2019
Operating System
critical-section
mutual-exclusion
operating-system
+
–
0
votes
0
answers
8
Process Synchronization
Does Progress implies freedom from Deadlock?
Does Progress implies freedom from Deadlock?
Nirmal Gaur
556
views
Nirmal Gaur
asked
Dec 19, 2018
Operating System
process-synchronization
critical-section
operating-system
+
–
0
votes
1
answer
9
Deadlock condition in synchronization
Please describe the Deadlock Condition in synchronization and when will be synchronization possible and condition ..?
Please describe the Deadlock Condition in synchronization and when will be synchronization possible and condition ..?
Rackson
422
views
Rackson
asked
Dec 14, 2018
Operating System
process-synchronization
deadlock-prevention-avoidance-detection
critical-section
progress
operating-system
+
–
1
votes
2
answers
10
synchronization
does it guarantee mutual exclusion and deadlock prevention?
does it guarantee mutual exclusion and deadlock prevention?
Rahul_Rathod_
927
views
Rahul_Rathod_
asked
Dec 12, 2018
Operating System
process-synchronization
operating-system
critical-section
process
deadlock-prevention-avoidance-detection
+
–
0
votes
0
answers
11
previous
https://gateoverflow.in/1319/gate2009-33 In this question progress is present or not? According to me making x=0 is exit part and not the reminder part. Hence I think progress is there. Am I correct? Definition : If no process is ... in their remainder sections can participate in deciding which will enter its critical section next, and this selection cannot be postponed indefinitely.
https://gateoverflow.in/1319/gate2009-33In this question progress is present or not?According to me making x=0 is exit part and not the reminder part. Hence I think progr...
Swapnil Naik
247
views
Swapnil Naik
asked
Nov 14, 2018
Operating System
operating-system
critical-section
+
–
0
votes
1
answer
12
Made Easy Test Series:OS
Consider the following solution for critical section problem with 'n' processes P0,P1,P2,......P(n-1).For all i,number[i] is an integer array initialized to zero, and for all j,choosing[j] is a binary array initialized to false. CODE FOR Pi : Repeat ... . b)S1 and S2 only. c)S2 and S3 only. d)S1 , S2 and S3 (please anyone elaborate this solution.thanks in advance)
Consider the following solution for critical section problem with 'n' processes P0,P1,P2,......P(n-1).For all i,number[i] is an integer array initialized to zero, and for...
talha hashim
669
views
talha hashim
asked
Oct 18, 2018
Operating System
critical-section
operating-system
+
–
4
votes
3
answers
13
Critical Section
Consider the following code to solve the critical section problem for two processes P0 and P1. Initially flag [i] contain false for i = 0 and 1. Assume i refers to the current process Pi and j refers the other process Pj. If two processes ... following satisfy the above solution? A. Mutual exclusion and progress B. Mutual exclusion and bounded wait C. Progress D. None of these
Consider the following code to solve the critical section problem for two processes P0 and P1. Initially flag [i] contain false for i = 0 and 1.Assume i refers to the cur...
Na462
4.4k
views
Na462
asked
Jul 18, 2018
Operating System
operating-system
critical-section
process-synchronization
deadlock-prevention-avoidance-detection
busy-wait
+
–
0
votes
0
answers
14
My doubt on critical section
Is context switch allowed when a process is in the cirtical section? (Not preemption) If yes then how it deals with data inconsistency?
Is context switch allowed when a process is in the cirtical section? (Not preemption)If yes then how it deals with data inconsistency?
Akash Kumar Roy
288
views
Akash Kumar Roy
asked
Mar 31, 2018
Operating System
operating-system
critical-section
+
–
2
votes
1
answer
15
My doubt
Can a process be preempted while it is in a critical section? If yes, then how does the critical section or synchronisation mechanism concept provide solution for 'Data inconsistency'? If no, then how the gate2013 problem on critical section ... ?v=jDUJsCFNI0E In video explanation instead of preemption sir has used context switch. How preemption is different from context switch?
Can a process be preempted while it is in a critical section?If yes, then how does the critical section or synchronisation mechanism concept provide solution for 'Data in...
Akash Kumar Roy
1.6k
views
Akash Kumar Roy
asked
Mar 30, 2018
Operating System
operating-system
process-synchronization
critical-section
mutex
+
–
1
votes
1
answer
16
made easy tests
Q1. Consider the methods used by process P1 and P2 for accessing their critical sections whenever needed, as given below. The initial values of shared Boolean variables, S1 and S2 are random assigned. For the program to guarantee mutual exclusion, the predicate P and ... My doubt is what is the case in which option D will not satisfy mutual exclusion? I am confused between B and D.
Q1. Consider the methods used by process P1 and P2 for accessing their critical sections whenever needed, as given below. The initial values of shared Boolean variables, ...
mahakp
1.9k
views
mahakp
asked
Jan 5, 2018
Operating System
critical-section
+
–
3
votes
0
answers
17
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
+
–
0
votes
1
answer
18
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
0
answers
19
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
831
views
Chhotu
asked
Dec 4, 2017
Operating System
process-synchronization
deadlock-prevention-avoidance-detection
critical-section
progress
+
–
2
votes
2
answers
20
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
832
views
Kalpataru Bose
asked
Nov 27, 2017
Operating System
process-synchronization
operating-system
critical-section
+
–
2
votes
2
answers
21
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
22
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
+
–
0
votes
1
answer
23
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
+
–
3
votes
0
answers
24
critical sections conceptual
Consider the following two-process synchronization solution. Process 0 --------- Entry: loop while (turn == 1); (critical section) Exit: turn = 1; Process 1 ---------- Entry: loop while (turn == 0); (critical ... (B) This solution violates mutual exclusion requirement. (C) This solution violates progress requirement. (D) This solution violates bounded wait requirement.
Consider the following two-process synchronization solution.Process 0 - Entry: loop while (turn == 1); (critical section) Exit: turn = 1;Process 1 Entry: loop while...
Parshu gate
712
views
Parshu gate
asked
Nov 13, 2017
Operating System
operating-system
critical-section
+
–
2
votes
0
answers
25
Self Doubt on software and hardware solution to critical section problem
Please verify whether the given table in the picture is correct or not?
Please verify whether the given table in the picture is correct or not?
Tuhin Dutta
963
views
Tuhin Dutta
asked
Nov 13, 2017
Operating System
operating-system
critical-section
deadlock-prevention-avoidance-detection
busy-wait
indefinite-postponent
mutual-exclusion
+
–
1
votes
1
answer
26
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
+
–
Page:
1
2
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register