-
1. An edge from process Pi to Pj in a wait for graph indicates that ____________
- Pi is waiting for Pj to release a resource that Pi needs
- Pj is waiting for Pi to release a resource that Pj needs
- Pi is waiting for Pj to leave the system
- Pj is waiting for Pi to leave the system
Show Answer
Answer : Option ( a ) 2. If the wait for graph contains a cycle ____________
- then a deadlock does not exist
- then a deadlock exists
- then the system is in a safe state
- either deadlock exists or system is in a safe state
Show Answer
Answer : Option ( b )3. If deadlocks occur frequently, the detection algorithm must be invoked ________
- rarely
- frequently
- rarely & frequently
- None of the mentioned
Show Answer
Answer : Option ( b )4. A computer system has 6 tape drives, with ‘n’ processes competing for them. Each process may need 3 tape drives. The maximum value of ‘n’ for which the system is guaranteed to be deadlock free is?
- 2
- 3
- 4
- 1
Show Answer
Answer : Option ( a )5. A system has 3 processes sharing 4 resources. If each process needs a maximum of 2 units then, deadlock ____________
- can never occur
- may occur
- has to occur
- None of the mentioned
Show Answer
Answer : Option ( a )6. Which of the following condition is required for a deadlock to be possible?
- Hold and wait
- No resource can be forcibly removed from a process holding it
- Mutual exclusion
- All of the mentioned
Show Answer
Answer : Option ( d )7. A system is in the safe state if ____________
- the system can allocate resources to each process in some order and still avoid a deadlock
- the system can allocate resources to each process in the order of their request and still avoid a deadlock
- Both A and B
- None of the mentioned
Show Answer
Answer : Option ( a )8. The circular wait condition can be prevented by ____________
- using thread
- using pipes
- defining a linear ordering of resource types
- All of the mentioned
Show Answer
Answer : Option ( c )9. Which one of the following is the deadlock avoidance algorithm?
- Round-robin algorithm
- Ostrich algorithm
- Banker’s algorithm
- Elevator algorithm
Show Answer
Answer : Option ( c )10. What is the drawback of banker’s algorithm?
- In advance processes rarely know how much resource they will need
- The number of processes changes as time progresses
- Resource once available can disappear
- All of the mentioned
Show Answer
Answer : Option ( d )11. Which one of the following is a visual way to determine the deadlock occurrence?
- Starvation graph
- Resource allocation graph
- Inversion graph
- None of the mentioned
Show Answer
Answer : Option ( b )12. To avoid deadlock ____________
- there must be a fixed number of resources to allocate
- resource allocation must be done only once
- all deadlocked processes must be aborted
- inversion technique can be used
Show Answer
Answer : Option ( a )13. The number of resources requested by a process ____________
- must always be less than the total number of resources available in the system
- must always be equal to the total number of resources available in the system
- must not exceed the total number of resources available in the system
- must exceed the total number of resources available in the system
Show Answer
Answer : Option ( c )14. For a deadlock to arise, which of the following conditions must hold simultaneously?
- Mutual exclusion
- No preemption
- Hold and wait
- All of the mentioned
Show Answer
Answer : Option ( d )15. For Mutual exclusion to prevail in the system ____________
- Each resource is either currently assigned to exactly one process or is available
- Process currently holding resources granted earlier can request more resources
- Previously granted resources cannot be forcibly taken away from process
- All of the mentioned
Show Answer
Answer : Option ( a )16. For a Hold and wait condition to prevail ____________
- each resource is either currently assigned to exactly one process or is available
- process currently holding resources granted earlier can request more resources
- previously granted resources cannot be forcibly taken away from process
- All of the mentioned
Show Answer
Answer : Option ( b )17. For a No preemption condition to prevail ____________
- each resource is either currently assigned to exactly one processor is available
- the process currently holding resources granted earlier can request more resources
- previously granted resources cannot be forcibly taken away from the process
- All of the mentioned
Show Answer
Answer : Option ( c )18. Resources which can be taken away from a process without causing any ill effects to the process are called _____________
- preemptable resources
- non-preemptable resources
- sharable resources
- None of the mentioned
Show Answer
Answer : Option ( a )19. Deadlock prevention is a set of methods ____________
- to ensure that all of the necessary conditions do not hold
- to decide if the requested resources for a process have to be given or not
- to recover from a deadlock
- to ensure that at least one of the necessary conditions cannot hold
Show Answer
Answer : Option ( d )20. For non sharable resources like a printer, mutual exclusion ____________
- must not exist
- may exist
- must exist
- None of the mentioned
Show Answer
Answer : Option ( c )21. The disadvantage of a process being allocated all its resources before beginning its execution is ____________
- low CPU utilization
- low resource utilization
- very high resource utilization
- None of the mentioned
Show Answer
Answer : Option ( b )22. To ensure no preemption, if a process is holding some resources and requests another resource that cannot be immediately allocated to it ____________
- then the process waits for the resources be allocated to it
- the process keeps sending requests until the resource is allocated to it
- the process resumes execution without the resource being allocated to it
- then all resources currently being held are preempted
Show Answer
Answer : Option ( d )23. One way to ensure that the circular wait condition never holds is to ____________
- impose a total ordering of all resource types and to determine whether one precedes another in the ordering
- to never let a process acquire resources that are held by other processes
- to let a process wait for only one resource at a time
- All of the mentioned
Show Answer
Answer : Option ( a )24. Each request requires that the system consider the _____________ to decide whether the current request can be satisfied or must wait to avoid a future possible deadlock.
- processes that have previously been in the system
- resources currently allocated to each process
- future requests and releases of each process
- resources currently available
Show Answer
Answer : Option ( d )25. A deadlock avoidance algorithm dynamically examines the __________ to ensure that a circular wait condition can never exist.
- resource allocation state
- system storage state
- operating system
- resources
Show Answer
Answer : Option ( a )26. A state is safe, if ____________
- the system does not crash due to deadlock occurrence
- the system can allocate resources to each process in some order and still avoid a deadlock
- the state keeps the system protected and safe
- All of the mentioned
Show Answer
Answer : Option ( b )27. A system is in a safe state only if there exists a ____________
- safe allocation
- safe resource
- safe sequence
- all of the mentioned
Show Answer
Answer : Option ( c )28. A system has 12 magnetic tape drives and 3 processes : P0, P1, and P2. Process P0 holds 5 tape drives, P1 holds 2 and P2 holds 2 tape drives. Process P0 requires 10 tape drives, P1 requires 4 and P2 requires 9 tape drives. Which of the following sequence is a safe sequence?
- P0, P1, P2
- P1, P2, P0
- P2, P0, P1
- P1, P0, P2
Show Answer
Answer : Option ( d )29. If no cycle exists in the resource allocation graph ____________
- then the system will not be in a safe state
- then the system will be in a safe state
- both A and B
- None of the mentioned
Show Answer
Answer : Option ( b )30. The data structures available in the Banker’s algorithm are ____________
- Available
- Need
- Allocation
- All of the mentioned
Show Answer
Answer : Option ( d )31. A deadlock can be broken by ____________
- abort one or more processes to break the circular wait
- abort all the process in the system
- preempt all resources from all processes
- None of the mentioned
Show Answer
Answer : Option ( a )32. The ways of aborting processes and eliminating deadlocks is ____________
- abort all deadlocked processes
- abort all processes
- abort one process at a time until the deadlock cycle is eliminated
- All of the mentioned
Show Answer
Answer : Option ( c )33. Those processes should be aborted on the occurrence of a deadlock, the termination of which ______
- is more time consuming
- incurs minimum cost
- safety is not hampered
- All of the mentioned
Show Answer
Answer : Option ( b )34. The process to be aborted is chosen on the basis of the following factors?
- Priority of the process
- Process is interactive or batch
- How long the process has computed
- All of the mentioned
Show Answer
Answer : Option ( d )35. Cost factors for process termination include ____________
- number of resources the deadlock process is not holding
- CPU utilization at the time of deadlock
- amount of time a deadlocked process has thus far consumed during its execution
- All of the mentioned
Show Answer
Answer : Option ( c )36. If we preempt a resource from a process, the process cannot continue with its normal execution and it must be ____________
- aborted
- rolled back
- terminated
- queued
Show Answer
Answer : Option ( b )37. To _______ to a safe state, the system needs to keep more information about the states of processes.
- abort the process
- roll back the process
- queue the process
- None of the mentioned
Show Answer
Answer : Option ( b )38. If the resources are always preempted from the same process __________ can occur.
- deadlock
- system crash
- starvation
- system restart
Show Answer
Answer : Option ( c )39. High priority process keep executing and low priority process are blocked is called _________
- deadlock
- system crash
- starvation
- system restart
Show Answer
Answer : Option ( c )40. Starvation can be prevented by ________
- Mutual exclusion
- Hold and Wait
- Pre emption
- Aging
Show Answer
Answer : Option ( d )41. A process said to be in ___________ state if it was waiting for an event that will never occur.
- Safe
- Unsafe
- Starvation
- Deadlock
Show Answer
Answer : Option ( d )42. In one of the deadlock prevention methods, impose a total ordering of all resource types, and require that each process requests resources in an increasing order of enumeration. This violates the _______________ condition of deadlock.
- Mutual exclusion
- Hold and Wait
- Circular Wait
- No Preemption
Show Answer
Answer : Option ( c )43. Resource locking ________.
- allows multiple tasks to simultaneously use resource
- forces only one task to use any resource at any time
- can easily cause a deadlock condition
- is not used for disk drives
Show Answer
Answer : Option ( b )44. Banker's algorithm for resource allocation deals with__________________
- deadlock prevention
- deadlock aviodance
- deadlock recovery
- deadlock detection
Show Answer
Answer : Option ( b )45. Four necessary conditions for deadlock are non pre-emption, circular wait, hold and wait and _________
- mutual exclusion
- race condition
- buffer overflow
- None of above
Show Answer
Answer : Option ( a )46. Which of following is not a condition of Deadlock ?
- Mutual Exclusion
- No Preemption
- Hold and Wait
- Race Condition
Show Answer
Answer : Option ( d )47. Deadlocks can be described by which graph?
- Resource-Allocation Graph
- Complete Graph
- Hamilton Graph
- Super Graph
Show Answer
Answer : Option ( a )48. A system has 'm' number of resources of same type and 3 processes A, B, C. Share these resources A, B, C which have the peak demand of 3, 4 and 6 respectively. Deadlock will not occur if the value of 'm' is __________.
- 15
- 8
- 13
- 9
Show Answer
Answer : Option ( c )49. Which of the following is not the approach to dealing with deadlock?
- Prevention
- Avoidance
- Detection
- Deletion
Show Answer
Answer : Option ( d )50. RAG stands for __________
- resource allocation graph
- resource allocation grant
- re allocation graph
- None of above
Show Answer
Answer : Option ( a )
Deadlock | Operating System
May 05, 2022
0