Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Search results for 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
359
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
791
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
679
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
985
views
atulcse
asked
Jan 19, 2022
Operating System
operating-system
process-synchronization
made-easy-test-series
concurrency
critical-section
+
–
1
votes
2
answers
5
synchronization
does it guarantee mutual exclusion and deadlock prevention?
does it guarantee mutual exclusion and deadlock prevention?
Rahul_Rathod_
913
views
Rahul_Rathod_
asked
Dec 12, 2018
Operating System
process-synchronization
operating-system
critical-section
process
deadlock-prevention-avoidance-detection
+
–
6
votes
4
answers
6
ISRO2017-68
A critical region is a piece of code which only one process executes at a time is a region prone to deadlock is a piece of code which only a finite number of processes execute is found only in windows NT operating system
A critical regionis a piece of code which only one process executes at a timeis a region prone to deadlockis a piece of code which only a finite number of processes execu...
sh!va
5.5k
views
sh!va
asked
May 7, 2017
Operating System
isro2017
operating-system
critical-section
process-synchronization
+
–
11
votes
1
answer
7
Difference between Dekkers and Peterson solutions to Critical Section Problem
Dekkers Algorithm flag[0]=true; while(flag[1]==true) { if(turn!=0) { flag[0]=false; while(turn!=0); flag[0]=true; } } // CS turn=1; flag[0]=false; Peterson Algorithm flag[0]=true; turn=1; ... [1]==true&&turn==1); // CS flag[0]=false Account on the Mutual Exclusion Bound Waiting Deadlock and Starvation Progress
Dekkers Algorithmflag[0]=true; while(flag ==true) { if(turn!=0) { flag[0]=false; while(turn!=0); flag[0]=true; } } // CS turn=1; flag[0]=false;Peterson Algorithm flag[0]=...
pC
11.8k
views
pC
asked
Oct 6, 2016
Operating System
operating-system
process-synchronization
critical-section
+
–
0
votes
1
answer
8
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
663
views
talha hashim
asked
Oct 18, 2018
Operating System
critical-section
operating-system
+
–
1
votes
2
answers
9
Process Synchronization
Consider Three binary Semaphore Q = R = 1 , S = 0; Process P1:- P(Q); P(R); /* CRITICAL SECTION */ V(Q); V(R); Process P2:- P(R); P(Q); /* CRITICAL SECTION */ V(Q); V(R); Process P3:- P(S); /* CRITICAL SECTION * ... AMOUNT OF TIME then process P2 is also trying to enter into critical section, 1. then Bounded Wait is satisfied or not. 2. then Starvation is satisfied or not.
Consider Three binary Semaphore Q = R = 1 , S = 0; Process P1:- P(Q); P(R); /* CRITICAL SECTION */ V(Q); V(R);Process P2:- P(R); P(Q); /* CRITICAL SECTION */ V(Q); V(R);P...
Shubhanshu
2.5k
views
Shubhanshu
asked
Sep 9, 2017
Operating System
process-synchronization
operating-system
critical-section
deadlock-prevention-avoidance-detection
+
–
4
votes
3
answers
10
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
+
–
1
votes
1
answer
11
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.0k
views
Raj Singh 1
asked
Jan 1, 2019
Operating System
critical-section
mutual-exclusion
operating-system
+
–
1
votes
1
answer
12
Critical Section
There are two threads which try to solve critical section problem using Test-And-Set instruction. Does the above code prevent deadlock? please provide reason to your answer
There are two threads which try to solve critical section problem using Test-And-Set instruction.Does the above code prevent deadlock? please provide reason to your answe...
Tuhin Dutta
981
views
Tuhin Dutta
asked
Oct 8, 2017
Operating System
operating-system
process-synchronization
critical-section
deadlock-prevention-avoidance-detection
test-and-set-instruction
+
–
2
votes
2
answers
13
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
720
views
Kalpataru Bose
asked
Nov 27, 2017
Operating System
process-synchronization
operating-system
critical-section
+
–
0
votes
0
answers
14
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
+
–
0
votes
0
answers
15
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
686
views
OneZero
asked
Jan 15, 2019
Operating System
operating-system
ace-test-series
critical-section
+
–
0
votes
0
answers
16
Process Synchronization
Does Progress implies freedom from Deadlock?
Does Progress implies freedom from Deadlock?
Nirmal Gaur
552
views
Nirmal Gaur
asked
Dec 19, 2018
Operating System
process-synchronization
critical-section
operating-system
+
–
0
votes
1
answer
17
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
421
views
Rackson
asked
Dec 14, 2018
Operating System
process-synchronization
deadlock-prevention-avoidance-detection
critical-section
progress
operating-system
+
–
0
votes
0
answers
18
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
240
views
Swapnil Naik
asked
Nov 14, 2018
Operating System
operating-system
critical-section
+
–
1
votes
1
answer
19
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
+
–
1
votes
1
answer
20
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
+
–
Page:
1
2
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register