WorksheetsOS Quiz
Total questions: 25
Worksheet time: 17mins
Deadlocks can be described by which graph?
Resource Allocation Graph
Hamilton Graph
Directed Graph
Complete Graph
Which is deadlock avoidance algorithm
fcfs algorithm
bankers algorithm
preemptive algorithm
round robin algorithm
Which is not a necessary condition in Deadlock
mutual exclusion
hold and wait
circular wait
progress
If p1 requesting for r1,r1 allocated to p2,p2 reqesting for r2,r2 is allocated to p1 such condition is called as______ in Deadlock Prevention
mutual exclusion
hold and wait
circular wait
bounding condition
Banker's algorithm for resource allocation deals with?
Deadlock prevention
Deadlock Recovery
Deadlock Avoidance
Circular Wait
If there is a direct arc from Process node to resource node we call that edge in RAG graph to be as
assigned edge
claimed edge
request edge
none of them
If there is a direct arc from resource node to Process node than we call that edge in RAG graph to be as
assigned edge
claimed edge
request edge
none of them
What is the maximum number of processes that may enter simultaneously inside the critical section to avoid race condition?
1
2
3
4
A system is in a ______ state if there exists a set of transactions such that every transaction in the set is waiting for another transaction in the set.
Idle
waiting
deadlock
ready
. What are the ways of dealing with deadlock ?
deadlock prevention
deadlock detection
deadlock recovery
all the above
. A deadlock exists in the system if and only if the wait-for graph contains a ___________.
cycle
direction
by - direction
rotation
A system contains three programs and each requires three tape units for its operation. The minimum number of tape units which the system must have such that deadlocks never arise is
6
7
8
9
Consider a system having m resources of the same type. These resources are shared by 3 processes A, B, C which have peak time demands of 3, 4, 6 respectively. The minimum value of m that ensures deadlock will never occur is
11
12
13
14
Which of the following is not a necessary condition for deadlock?
Mutual Exclusion
Reentrancy
Hold and wait
No pre-emption
In which of the following four necessary conditions for deadlock processes claim exclusive control of the resources they require?
no preemption
mutual exclusion
circular wait
hold and wait
A total of 9 units of a resource type available, and given the safe state shown below, which of the following sequence will be a safe state?
Process Used Max
A 2 7
B 1 6
C 2 5
D 1 4
(P4, P1, P3, P2)
(P4, P2, P1, P3)
(P4, P2, P3, P1)
(P3, P1, P2, P4)
Consider a system with 3 processes that share 4 instances of the same resource type. Each process can request a maximum of K instances. Resource instances can be requested and released only one at a time. The largest value of K that will always avoid deadlock is _______ .
1
2
3
4
Which of the following is NOT a valid deadlock prevention scheme?
Release all resources before requesting a new resource
Number the resources uniquely and never request a lower numbered resource than the last one requested
Never request a resource after releasing any resource
Request and all required resources be allocated before execution.
What is the name of the technique in which the operating system of a computer executes several programs concurrently by switching back and forth between them?
Partitioning
Multi-tasking
Windowing
Paging
On a system using non-preemptive scheduling, processes with expected run times of 5, 18, 9 and 12 are in the ready queue. In what order should they be run to minimize wait time?
5, 12, 9, 18
5, 9, 12, 18
12, 18, 9, 5
9, 12, 18, 5
Which of the following conditions does not hold good for a solution to a critical section problem ?
No assumptions may be made about speeds or the number of CPUs.
No two processes may be simultaneously inside their critical sections.
Processes running outside its critical section may block other processes.
Processes do not wait forever to enter its critical section.
Consider a system with 3 processes that share 4 instances of the same resource type. Each process can request a maximum of K instances. Resource instances can be requested and released only one at a time. The largest value of K that will always avoid deadlock is _______ .
1
2
3
4
Which of the following is NOT a valid deadlock prevention scheme?
Release all resources before requesting a new resource
Number the resources uniquely and never request a lower numbered resource than the last one requested
Never request a resource after releasing any resource
Request and all required resources be allocated before execution.
For Single Instance of resource type which algorithm will be used for deadlock avoidance.
Resource Allocation Graph
Bankers Algorithm
Petersons Algorithm
None of theses
What is not a Scheme for Deadlock Handling
Deadlock Avoidance
Deadlock Detection
Deadlock Protection
Recovery from Deadlock
