Deadlock | Operating System

CoderIndeed
0
  1. 1. An edge from process Pi to Pj in a wait for graph indicates that ____________

    1. Pi is waiting for Pj to release a resource that Pi needs
    2. Pj is waiting for Pi to release a resource that Pj needs
    3. Pi is waiting for Pj to leave the system
    4. Pj is waiting for Pi to leave the system
    Show Answer
    Answer :     Option ( a )
  2. 2. If the wait for graph contains a cycle ____________

    1. then a deadlock does not exist
    2. then a deadlock exists
    3. then the system is in a safe state
    4. either deadlock exists or system is in a safe state
    Show Answer
    Answer :     Option ( b )
  3. 3. If deadlocks occur frequently, the detection algorithm must be invoked ________

    1. rarely
    2. frequently
    3. rarely & frequently
    4. None of the mentioned
    Show Answer
    Answer :     Option ( b )
  4. 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?

    1. 2
    2. 3
    3. 4
    4. 1
    Show Answer
    Answer :     Option ( a )
  5. 5. A system has 3 processes sharing 4 resources. If each process needs a maximum of 2 units then, deadlock ____________

    1. can never occur
    2. may occur
    3. has to occur
    4. None of the mentioned
    Show Answer
    Answer :     Option ( a )
  6. 6. Which of the following condition is required for a deadlock to be possible?

    1. Hold and wait
    2. No resource can be forcibly removed from a process holding it
    3. Mutual exclusion
    4. All of the mentioned
    Show Answer
    Answer :     Option ( d )
  7. 7. A system is in the safe state if ____________

    1. the system can allocate resources to each process in some order and still avoid a deadlock
    2. the system can allocate resources to each process in the order of their request and still avoid a deadlock
    3. Both A and B
    4. None of the mentioned
    Show Answer
    Answer :     Option ( a )
  8. 8. The circular wait condition can be prevented by ____________

    1. using thread
    2. using pipes
    3. defining a linear ordering of resource types
    4. All of the mentioned
    Show Answer
    Answer :     Option ( c )
  9. 9. Which one of the following is the deadlock avoidance algorithm?

    1. Round-robin algorithm
    2. Ostrich algorithm
    3. Banker’s algorithm
    4. Elevator algorithm
    Show Answer
    Answer :     Option ( c )
  10. 10. What is the drawback of banker’s algorithm?

    1. In advance processes rarely know how much resource they will need
    2. The number of processes changes as time progresses
    3. Resource once available can disappear
    4. All of the mentioned
    Show Answer
    Answer :     Option ( d )
  11. 11. Which one of the following is a visual way to determine the deadlock occurrence?

    1. Starvation graph
    2. Resource allocation graph
    3. Inversion graph
    4. None of the mentioned
    Show Answer
    Answer :     Option ( b )
  12. 12. To avoid deadlock ____________

    1. there must be a fixed number of resources to allocate
    2. resource allocation must be done only once
    3. all deadlocked processes must be aborted
    4. inversion technique can be used
    Show Answer
    Answer :     Option ( a )
  13. 13. The number of resources requested by a process ____________

    1. must always be less than the total number of resources available in the system
    2. must always be equal to the total number of resources available in the system
    3. must not exceed the total number of resources available in the system
    4. must exceed the total number of resources available in the system
    Show Answer
    Answer :     Option ( c )
  14. 14. For a deadlock to arise, which of the following conditions must hold simultaneously?

    1. Mutual exclusion
    2. No preemption
    3. Hold and wait
    4. All of the mentioned
    Show Answer
    Answer :     Option ( d )
  15. 15. For Mutual exclusion to prevail in the system ____________

    1. Each resource is either currently assigned to exactly one process or is available
    2. Process currently holding resources granted earlier can request more resources
    3. Previously granted resources cannot be forcibly taken away from process
    4. All of the mentioned
    Show Answer
    Answer :     Option ( a )
  16. 16. For a Hold and wait condition to prevail ____________

    1. each resource is either currently assigned to exactly one process or is available
    2. process currently holding resources granted earlier can request more resources
    3. previously granted resources cannot be forcibly taken away from process
    4. All of the mentioned
    Show Answer
    Answer :     Option ( b )
  17. 17. For a No preemption condition to prevail ____________

    1. each resource is either currently assigned to exactly one processor is available
    2. the process currently holding resources granted earlier can request more resources
    3. previously granted resources cannot be forcibly taken away from the process
    4. All of the mentioned
    Show Answer
    Answer :     Option ( c )
  18. 18. Resources which can be taken away from a process without causing any ill effects to the process are called _____________

    1. preemptable resources
    2. non-preemptable resources
    3. sharable resources
    4. None of the mentioned
    Show Answer
    Answer :     Option ( a )
  19. 19. Deadlock prevention is a set of methods ____________

    1. to ensure that all of the necessary conditions do not hold
    2. to decide if the requested resources for a process have to be given or not
    3. to recover from a deadlock
    4. to ensure that at least one of the necessary conditions cannot hold
    Show Answer
    Answer :     Option ( d )
  20. 20. For non sharable resources like a printer, mutual exclusion ____________

    1. must not exist
    2. may exist
    3. must exist
    4. None of the mentioned
    Show Answer
    Answer :     Option ( c )
  21. 21. The disadvantage of a process being allocated all its resources before beginning its execution is ____________

    1. low CPU utilization
    2. low resource utilization
    3. very high resource utilization
    4. None of the mentioned
    Show Answer
    Answer :     Option ( b )
  22. 22. To ensure no preemption, if a process is holding some resources and requests another resource that cannot be immediately allocated to it ____________

    1. then the process waits for the resources be allocated to it
    2. the process keeps sending requests until the resource is allocated to it
    3. the process resumes execution without the resource being allocated to it
    4. then all resources currently being held are preempted
    Show Answer
    Answer :     Option ( d )
  23. 23. One way to ensure that the circular wait condition never holds is to ____________

    1. impose a total ordering of all resource types and to determine whether one precedes another in the ordering
    2. to never let a process acquire resources that are held by other processes
    3. to let a process wait for only one resource at a time
    4. All of the mentioned
    Show Answer
    Answer :     Option ( a )
  24. 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.

    1. processes that have previously been in the system
    2. resources currently allocated to each process
    3. future requests and releases of each process
    4. resources currently available
    Show Answer
    Answer :     Option ( d )
  25. 25. A deadlock avoidance algorithm dynamically examines the __________ to ensure that a circular wait condition can never exist.

    1. resource allocation state
    2. system storage state
    3. operating system
    4. resources
    Show Answer
    Answer :     Option ( a )
  26. 26. A state is safe, if ____________

    1. the system does not crash due to deadlock occurrence
    2. the system can allocate resources to each process in some order and still avoid a deadlock
    3. the state keeps the system protected and safe
    4. All of the mentioned
    Show Answer
    Answer :     Option ( b )
  27. 27. A system is in a safe state only if there exists a ____________

    1. safe allocation
    2. safe resource
    3. safe sequence
    4. all of the mentioned
    Show Answer
    Answer :     Option ( c )
  28. 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?

    1. P0, P1, P2
    2. P1, P2, P0
    3. P2, P0, P1
    4. P1, P0, P2
    Show Answer
    Answer :     Option ( d )
  29. 29. If no cycle exists in the resource allocation graph ____________

    1. then the system will not be in a safe state
    2. then the system will be in a safe state
    3. both A and B
    4. None of the mentioned
    Show Answer
    Answer :     Option ( b )
  30. 30. The data structures available in the Banker’s algorithm are ____________

    1. Available
    2. Need
    3. Allocation
    4. All of the mentioned
    Show Answer
    Answer :     Option ( d )
  31. 31. A deadlock can be broken by ____________

    1. abort one or more processes to break the circular wait
    2. abort all the process in the system
    3. preempt all resources from all processes
    4. None of the mentioned
    Show Answer
    Answer :     Option ( a )
  32. 32. The ways of aborting processes and eliminating deadlocks is ____________

    1. abort all deadlocked processes
    2. abort all processes
    3. abort one process at a time until the deadlock cycle is eliminated
    4. All of the mentioned
    Show Answer
    Answer :     Option ( c )
  33. 33. Those processes should be aborted on the occurrence of a deadlock, the termination of which ______

    1. is more time consuming
    2. incurs minimum cost
    3. safety is not hampered
    4. All of the mentioned
    Show Answer
    Answer :     Option ( b )
  34. 34. The process to be aborted is chosen on the basis of the following factors?

    1. Priority of the process
    2. Process is interactive or batch
    3. How long the process has computed
    4. All of the mentioned
    Show Answer
    Answer :     Option ( d )
  35. 35. Cost factors for process termination include ____________

    1. number of resources the deadlock process is not holding
    2. CPU utilization at the time of deadlock
    3. amount of time a deadlocked process has thus far consumed during its execution
    4. All of the mentioned
    Show Answer
    Answer :     Option ( c )
  36. 36. If we preempt a resource from a process, the process cannot continue with its normal execution and it must be ____________

    1. aborted
    2. rolled back
    3. terminated
    4. queued
    Show Answer
    Answer :     Option ( b )
  37. 37. To _______ to a safe state, the system needs to keep more information about the states of processes.

    1. abort the process
    2. roll back the process
    3. queue the process
    4. None of the mentioned
    Show Answer
    Answer :     Option ( b )
  38. 38. If the resources are always preempted from the same process __________ can occur.

    1. deadlock
    2. system crash
    3. starvation
    4. system restart
    Show Answer
    Answer :     Option ( c )
  39. 39. High priority process keep executing and low priority process are blocked is called _________

    1. deadlock
    2. system crash
    3. starvation
    4. system restart
    Show Answer
    Answer :     Option ( c )
  40. 40. Starvation can be prevented by ________

    1. Mutual exclusion
    2. Hold and Wait
    3. Pre emption
    4. Aging
    Show Answer
    Answer :     Option ( d )
  41. 41. A process said to be in ___________ state if it was waiting for an event that will never occur.

    1. Safe
    2. Unsafe
    3. Starvation
    4. Deadlock
    Show Answer
    Answer :     Option ( d )
  42. 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.

    1. Mutual exclusion
    2. Hold and Wait
    3. Circular Wait
    4. No Preemption
    Show Answer
    Answer :     Option ( c )
  43. 43. Resource locking ________.

    1. allows multiple tasks to simultaneously use resource
    2. forces only one task to use any resource at any time
    3. can easily cause a deadlock condition
    4. is not used for disk drives
    Show Answer
    Answer :     Option ( b )
  44. 44. Banker's algorithm for resource allocation deals with__________________

    1. deadlock prevention
    2. deadlock aviodance
    3. deadlock recovery
    4. deadlock detection
    Show Answer
    Answer :     Option ( b )
  45. 45. Four necessary conditions for deadlock are non pre-emption, circular wait, hold and wait and _________

    1. mutual exclusion
    2. race condition
    3. buffer overflow
    4. None of above
    Show Answer
    Answer :     Option ( a )
  46. 46. Which of following is not a condition of Deadlock ?

    1. Mutual Exclusion
    2. No Preemption
    3. Hold and Wait
    4. Race Condition
    Show Answer
    Answer :     Option ( d )
  47. 47. Deadlocks can be described by which graph?

    1. Resource-Allocation Graph
    2. Complete Graph
    3. Hamilton Graph
    4. Super Graph
    Show Answer
    Answer :     Option ( a )
  48. 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 __________.

    1. 15
    2. 8
    3. 13
    4. 9
    Show Answer
    Answer :     Option ( c )
  49. 49. Which of the following is not the approach to dealing with deadlock?

    1. Prevention
    2. Avoidance
    3. Detection
    4. Deletion
    Show Answer
    Answer :     Option ( d )
  50. 50. RAG stands for __________

    1. resource allocation graph
    2. resource allocation grant
    3. re allocation graph
    4. None of above
    Show Answer
    Answer :     Option ( a )
Tags

Post a Comment

0Comments

Post a Comment (0)

#buttons=(Accept !) #days=(20)

Our website uses cookies to enhance your experience. Check Now
Accept !