Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged deadlock-prevention-avoidance-detection
0
votes
0
answers
151
UPPCL AE 2018:52
Consider the following implementation as a solution to the critical section problem for two processes $\text{P}_{0}$ and $\text{P}_{1}$ with id $0$ and $1,$ respectively. int flag[2] = {0,0}; int turn = 0; void lock (int id) /* ... exclusion is guaranteed Mutual exclusion is guaranteed if $\text{S1}$ and $\text{S2}$ are interchanged Solution leads to a deadlock None of the above
Consider the following implementation as a solution to the critical section problem for two processes $\text{P}_{0}$ and $\text{P}_{1}$ with id $0$ and $1,$ respectively....
admin
222
views
admin
asked
Jan 5, 2019
Operating System
uppcl2018
operating-system
process-synchronization
deadlock-prevention-avoidance-detection
+
–
0
votes
1
answer
152
UGC NET CSE | December 2018 | Part 2 | Question: 70
Suppose a system has $12$ instances of some resource with $n$ processes competing for that resource. Each process may require $4$ instances of the resources. The maximum value of $n$ for which the system never enters into deadlock is $3$ $4$ $5$ $6$
Suppose a system has $12$ instances of some resource with $n$ processes competing for that resource. Each process may require $4$ instances of the re...
Arjun
2.5k
views
Arjun
asked
Jan 2, 2019
Operating System
ugcnetcse-dec2018-paper2
operating-system
deadlock-prevention-avoidance-detection
+
–
0
votes
0
answers
153
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.5k
views
Raj Singh 1
asked
Jan 1, 2019
Operating System
operating-system
critical-section
deadlock-prevention-avoidance-detection
mutual-exclusion
busy-wait
+
–
1
votes
0
answers
154
Test by Mentors MOCK doubt
Which of the following situations deadlock will occur ? Process requests all the required resources in the beginning Process requests resource only if it has none Process orders resources in increasing order of enumeration Resources are immediately allocated to process holding some resources
Which of the following situations deadlock will occur ? Process requests all the required resources in the beginning Process requests resource only if it has none ...
jatin khachane 1
360
views
jatin khachane 1
asked
Jan 1, 2019
Operating System
operating-system
deadlock-prevention-avoidance-detection
+
–
0
votes
0
answers
155
Synchronization
How Bounded waiting is Satisfied in Option B?
How Bounded waiting is Satisfied in Option B?
ghostman23111
189
views
ghostman23111
asked
Dec 30, 2018
Operating System
deadlock-prevention-avoidance-detection
+
–
1
votes
1
answer
156
GATE Overflow | Mock GATE | Test 1 | Question: 63
A system is having user processes $P_1, P_2, \dots , P_N$ each requiring $Q_N, Q_{N-1}, \dots , Q_1$ number of resource instances of resource $R$. The minimum number of resource instances of $R$ to guarantee that deadlock will not occur is $NQ_N - N+1$ $NQ_1 + N-1$ $(Q_1 + Q_2 + … + Q_N) + N – 1$ $(Q_1 + Q_2 + … + Q_N) + 1 – N$
A system is having user processes $P_1, P_2, \dots , P_N$ each requiring $Q_N, Q_{N-1}, \dots , Q_1$ number of resource instances of resource $R$. The minimum number of r...
Ruturaj Mohanty
742
views
Ruturaj Mohanty
asked
Dec 27, 2018
Operating System
go-mockgate-1
operating-system
deadlock-prevention-avoidance-detection
resource-allocation
+
–
2
votes
1
answer
157
self doubt Deadlock
is there deadlock in the concurrent execution of two thread given below? void laurel() { lock_acquire(mutex); /* do something */ lock_acquire(file1); /* write to file 1 */ lock_acquire(file2); /* write to file 2 */ lock_release(file1); lock_release(mutex); ... (file1); lock_release(mutex); } i'm not getting any deadlock. please comment below if you find any. *Idon't have answer.
is there deadlock in the concurrent execution of two thread given below?void laurel() { lock_acquire(mutex); /* do something */ lock_acquire(file1); ...
aambazinga
1.1k
views
aambazinga
asked
Dec 24, 2018
Operating System
operating-system
deadlock-prevention-avoidance-detection
process-synchronization
+
–
0
votes
1
answer
158
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
437
views
Rackson
asked
Dec 14, 2018
Operating System
process-synchronization
deadlock-prevention-avoidance-detection
critical-section
progress
operating-system
+
–
1
votes
2
answers
159
synchronization
does it guarantee mutual exclusion and deadlock prevention?
does it guarantee mutual exclusion and deadlock prevention?
Rahul_Rathod_
949
views
Rahul_Rathod_
asked
Dec 12, 2018
Operating System
process-synchronization
operating-system
critical-section
process
deadlock-prevention-avoidance-detection
+
–
0
votes
0
answers
160
Test Series Question
What should be the answer?
What should be the answer?
smsubham
489
views
smsubham
asked
Dec 7, 2018
Operating System
operating-system
deadlock-prevention-avoidance-detection
+
–
0
votes
0
answers
161
previous
https://gateoverflow.in/2263/gate1997-6-7 1. They said at least 4 resource are required. First p1 comes takes two system resource, then p2 comes takes 1 system resource, then p3 comes takes 1 system resource. Now P3 needs one more resource so it is ... process keeps track when the other process leaves resource, which part of the os performs this function? is it done by using semaphores?
https://gateoverflow.in/2263/gate1997-6-71. They said at least 4 resource are required.First p1 comes takes two system resource, then p2 comes takes 1 system resource, th...
Swapnil Naik
234
views
Swapnil Naik
asked
Nov 16, 2018
Operating System
operating-system
deadlock-prevention-avoidance-detection
+
–
0
votes
0
answers
162
please solve this Q
kallu singh
255
views
kallu singh
asked
Nov 16, 2018
Operating System
operating-system
resource-allocation
deadlock-prevention-avoidance-detection
+
–
0
votes
0
answers
163
Bankers algorithms
Please help in understanding how to solve bankers algorithms with example as I get confuse how to start solving because sometimes we calculate need of the process ,sometimes available from the given question, sometime instance of resources are given else ... used in question. Please help in understanding the different scenarios to be covered and how to tackle each problem. Thanks
Please help in understanding how to solve bankers algorithms with example as I get confuse how to start solving because sometimes we calculate need of the process ,someti...
Mayankprakash
438
views
Mayankprakash
asked
Nov 9, 2018
Operating System
deadlock-prevention-avoidance-detection
+
–
1
votes
2
answers
164
Deadlock
If the total number of resources available is 6 and each process requires 3 instances of a resource to complete execution. Then what is the number of processes that can exist in this system without causing a deadlock?
If the total number of resources available is 6 and each process requires 3 instances of a resource to complete execution. Then what is the number of processes that can e...
Dhillu Thambi
559
views
Dhillu Thambi
asked
Nov 4, 2018
Operating System
deadlock-prevention-avoidance-detection
operating-system
+
–
0
votes
1
answer
165
safe and unsafe state
if there is no allocation sequence that allows the processes to finish executing, then the system is in an unsafe state. This is not equivalent to the "If the system is in an unsafe state, then there is no allocation sequence that allows the processes to finish executing
if there is no allocation sequence that allows the processes to finish executing, then the system is in an unsafe state.This is not equivalent to the "If the system is i...
Gurdeep Saini
2.1k
views
Gurdeep Saini
asked
Nov 3, 2018
Operating System
deadlock-prevention-avoidance-detection
+
–
0
votes
0
answers
166
Operating Systems
To check that a mutual exclusion algorithm is not free from deadlock,is it necessary to check if the entire processes in the system are in deadlock- If there are 5 processes in the system- P0,P1,P2,P3,P4 and if we have to prove that the ... definitely in deadlock- This means it is not necessary for all processes in the system to be in deadlock to say deadlock has occurred?
To check that a mutual exclusion algorithm is not free from deadlock,is it necessary to check if the entire processes in the system are in deadlock-If there are 5 proces...
skywalker_19
294
views
skywalker_19
asked
Oct 23, 2018
Operating System
deadlock-prevention-avoidance-detection
process-synchronization
operating-system
+
–
0
votes
3
answers
167
self doubt in OS(galvin)
All safe states are deadlock free. But we can go to deadlock with some combination of sequence? So if the question is, from the safe state can we enter deadlock? Ans should be YES. please give your thought
All safe states are deadlock free. But we can go to deadlock with some combination of sequence? So if the question is, from the safe state can we enter deadlock? Ans shou...
Vegeta
927
views
Vegeta
asked
Oct 22, 2018
Operating System
operating-system
deadlock-prevention-avoidance-detection
safe
+
–
0
votes
1
answer
168
Mutual Exclusion vs. Hold and Wait
In the context of a Deadlock, what is the difference between Mutual Exclusion and Hold and Wait ? In case of Hold and Wait, a process holds atleast one resource. Doesn't this correspond to Mutual Exclusion, where atleast one resource is held in a non-shareable mode ??
In the context of a Deadlock, what is the difference between Mutual Exclusion and Hold and Wait ?In case of Hold and Wait, a process holds atleast one resource. Doesn't t...
the_bob
1.0k
views
the_bob
asked
Sep 25, 2018
Operating System
operating-system
deadlock-prevention-avoidance-detection
+
–
0
votes
0
answers
169
Test and Set Lock(TSL)
In case of TSL we are aware of the following instructions: 1. TSL LOCK, Ro 2. CMP Ro, #0 3. JNZ step1 Now, the initial value of LOCK is 0 If process Po comes and executes line 1 and if it gets preempted, then Ro = 0 and LOCK = 1 Now, If process P1 ... able to enter the CS...right? So, in this way, Po and P1 both will get stuck...right? and so is there a chance of deadlock?
In case of TSL we are aware of the following instructions: 1. TSL LOCK, Ro 2. CMP Ro, #0 3. JNZ step1 Now, the initial value of LOCK is 0 If process Po...
garvit_vijai
1.4k
views
garvit_vijai
asked
Sep 20, 2018
Operating System
operating-system
process-synchronization
test-and-set
deadlock-prevention-avoidance-detection
+
–
0
votes
1
answer
170
self doubt
why spinlock requires context switch ?
why spinlock requires context switch ?
vijju532
290
views
vijju532
asked
Aug 28, 2018
Operating System
operating-system
deadlock-prevention-avoidance-detection
+
–
1
votes
2
answers
171
Self-doubt
Process maximum demand currently holds P1 70 45 P2 60 40 P3 60 X P4 40 Y If a system has total of 150 units of resource , identify which of the following values of X and Y the above system will be in safe state? 1. X = 40 , Y = 20 2. X = 50 , Y = 10 3. X = 30 , Y = 20 4. X = 20 , Y = 30
Processmaximum demandcurrently holdsP17045P26040P360XP440YIf a system has total of 150 units of resource , identify which of the following values of X and Y the above sys...
Sid865
1.8k
views
Sid865
asked
Aug 21, 2018
Operating System
operating-system
deadlock-prevention-avoidance-detection
+
–
0
votes
2
answers
172
Self doubt
How to solve the question involving the calculation of safe sequence when the resource allocation graph is given instead of the table. Eg. In the question below..What should be the approach to solve the question??? Plzz explain..
How to solve the question involving the calculation of safe sequence when the resource allocation graph is given instead of the table. Eg. In the question below..What sho...
Sid865
672
views
Sid865
asked
Aug 21, 2018
Operating System
operating-system
deadlock-prevention-avoidance-detection
+
–
1
votes
2
answers
173
Self doubt
Identify the incorrect statement : 1. If there are no cycles in resource allocation graph then there is no deadlock. 2. If there is only one instance per resource type and resource allocation graph has a cycle then there is a deadlock. 3. If there is more than ... for some resource type and resource allocation graph has a cycle , there may or may not be a deadlock. 4. All of these
Identify the incorrect statement :1. If there are no cycles in resource allocation graph then there is no deadlock.2. If there is only one instance per resource type and ...
Sid865
2.3k
views
Sid865
asked
Aug 21, 2018
Operating System
deadlock-prevention-avoidance-detection
operating-system
+
–
0
votes
3
answers
174
MadeEasy Workbook: Operating System - Deadlock Prevention Avoidance Detection
Assume a system with four resource types, C=(6,4,4,2), andthe maximum claim table below. The resource allocator isconsidering allocating resources according to the tablebelow. Is this state safe? Why or why not? MaximumClaim Current ... 2 1 0 1 0 1 0 1 FIND WHETHER STATE IS SAFE OR NOT a-safe b-unsafe c-deadlock
Assume a system with four resource types, C=(6,4,4,2), andthe maximum claim table below. The resource allocator isconsidering allocating resources according to the tableb...
mobashshir
2.9k
views
mobashshir
asked
Aug 15, 2018
Operating System
operating-system
deadlock-prevention-avoidance-detection
made-easy-booklet
+
–
1
votes
1
answer
175
#OS Deadlock Necessary Conditions doubt
As Galvin States we have for necessary conditions to have a deadlock as - 1) M.E 2) Hold and wait 3) No preemption 4) Circular wait. Now, for a deadlock to happen does all four these conditions need to be present/true ... I mean, say, there's no M.E therefore can we straightaway declare there's deadlock without checking for other three conditions?
As Galvin States we have for necessary conditions to have a deadlock as -1) M.E2) Hold and wait 3) No preemption4) Circular wait. Now, for a deadlock to happen does all f...
iarnav
1.1k
views
iarnav
asked
Aug 9, 2018
Operating System
operating-system
usermod
deadlock-prevention-avoidance-detection
+
–
0
votes
0
answers
176
OPERATING SYSTEM GALVIN DEADLOCK
In the deadlock chapter, in resource allocation graph algorithm, it is given that detecting a cycle takes O(n^2) operations... But we can find cycle in O(n+m) operations, using DFS. Why they have not considered this.. or if they have considered, what am I missing. Or is it that they have given worst case time assuming #edges(i.e; m)=n(n-1)/2 which would give O(n^2)?
In the deadlock chapter, in resource allocation graph algorithm, it is given that detecting a cycle takes O(n^2) operations... But we can find cycle in O(n+m) operations,...
aambazinga
256
views
aambazinga
asked
Aug 2, 2018
Operating System
operating-system
deadlock-prevention-avoidance-detection
resource-allocation-graph-algorithm
cycle-detection
+
–
0
votes
0
answers
177
deadlock
If ‘m’ processes share ‘n’ resources of the same type, the maximum need of each process does not exceed ‘n’ and the sum of all their maximum needs is always less than ‘m+n’. In this case: (a) Deadlock can never occur (c) Deadlock has to occur (b) Deadlock may occur (d) None
If ‘m’ processes share ‘n’ resources of the same type, the maximum need of each process doesnot exceed ‘n’ and the sum of all their maximum needs is always le...
prabhat0987
256
views
prabhat0987
asked
Jul 27, 2018
Operating System
deadlock-prevention-avoidance-detection
operating-system
+
–
4
votes
3
answers
178
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.5k
views
Na462
asked
Jul 18, 2018
Operating System
operating-system
critical-section
process-synchronization
deadlock-prevention-avoidance-detection
busy-wait
+
–
0
votes
0
answers
179
Processes
Ans. D I don't know why C cant be the answer because its independent processes but independent processes can access the same resources even they are completely different like say two independent processes working on two different files but still they both have to access the Disk. So there can be the situation of Deadlock. Isn't ? Please Correct Me :/
Ans. DI don't know why C cant be the answer because its independent processes but independent processes can access the same resources even they are completely different l...
Na462
512
views
Na462
asked
Jul 12, 2018
Operating System
operating-system
deadlock-prevention-avoidance-detection
+
–
0
votes
0
answers
180
Deadlock Sequence
Consider two processes P1 and P2, each needed 3 resources 1, 2 and 3 in a database. If each processes ask them in any order, then the number of ways possible in which system is guaranteed to be deadlock free ________. Answer. 120 Please Tell me the Approach :)
Consider two processes P1 and P2, each needed 3 resources 1, 2 and 3 in a database. If each processes ask them in any order, then the number of ways possible in which sy...
Na462
289
views
Na462
asked
Jul 9, 2018
Operating System
operating-system
deadlock-prevention-avoidance-detection
+
–
Page:
« prev
1
2
3
4
5
6
7
8
9
10
11
next »
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register