A deadlock eventually cripples system throughput and will cause the CPU utilization to

Terms in this set (55)

7. A system has 12 magnetic tape drives and 3 processes : P0, P1, and P2. Process P0 requires 10 tape drives, P1 requires 4 and P2 requires 9 tape drives.

Process
P0
P1
P2

Maximum needs (process-wise: P0 through P2 top to bottom)
10
4
9

Currently allocated (process-wise)
5
2
2
Which of the following sequence is a safe sequence?
a) P0, P1, P2
b) P1, P2, P0
c) P2, P0, P1
d) P1, P0, P2

Other sets by this creator

This set of Operating System Multiple Choice Questions & Answers (MCQs) focuses on “Deadlock Detection”.

1. The wait-for graph is a deadlock detection algorithm that is applicable when ____________
a) all resources have a single instance
b) all resources have multiple instances
c) all resources have a single 7 multiple instances
d) all of the mentioned
View Answer

Answer: a
Explanation: None.

2. An edge from process Pi to Pj in a wait for graph indicates that ____________
a) Pi is waiting for Pj to release a resource that Pi needs
b) Pj is waiting for Pi to release a resource that Pj needs
c) Pi is waiting for Pj to leave the system
d) Pj is waiting for Pi to leave the system
View Answer

Answer: a
Explanation: None.

3. If the wait for graph contains a cycle ____________
a) then a deadlock does not exist
b) then a deadlock exists
c) then the system is in a safe state
d) either deadlock exists or system is in a safe state
View Answer

Answer: b
Explanation: None.

4. If deadlocks occur frequently, the detection algorithm must be invoked ________
a) rarely
b) frequently
c) rarely & frequently
d) none of the mentioned
View Answer

Answer: b
Explanation: None.

5. What is the disadvantage of invoking the detection algorithm for every request?
a) overhead of the detection algorithm due to consumption of memory
b) excessive time consumed in the request to be allocated memory
c) considerable overhead in computation time
d) all of the mentioned
View Answer

Answer: c
Explanation: None.

6. A deadlock eventually cripples system throughput and will cause the CPU utilization to ______
a) increase
b) drop
c) stay still
d) none of the mentioned
View Answer

Answer: b
Explanation: None.

7. Every time a request for allocation cannot be granted immediately, the detection algorithm is invoked. This will help identify ____________
a) the set of processes that have been deadlocked
b) the set of processes in the deadlock queue
c) the specific process that caused the deadlock
d) all of the mentioned
View Answer

Answer: a
Explanation: None.

8. 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?
a) 2
b) 3
c) 4
d) 1
View Answer

Answer: a
Explanation: None.

9. A system has 3 processes sharing 4 resources. If each process needs a maximum of 2 units then, deadlock ____________
a) can never occur
b) may occur
c) has to occur
d) none of the mentioned
View Answer

Answer: a
Explanation: None.

10. ‘m’ processes share ‘n’ resources of the same type. The maximum need of each process doesn’t exceed ‘n’ and the sum of all their maximum needs is always less than m+n. In this setup, deadlock ____________
a) can never occur
b) may occur
c) has to occur
d) none of the mentioned
View Answer

Answer: a
Explanation: None.

Sanfoundry Global Education & Learning Series – Operating System.

Next Steps:

  • Get Free Certificate of Merit in Operating System
  • Participate in Operating System Certification Contest
  • Become a Top Ranker in Operating System
  • Take Operating System Tests
  • Chapterwise Practice Tests: Chapter 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
  • Chapterwise Mock Tests: Chapter 1, 2, 3, 4, 5, 6, 7, 8, 9, 10

A deadlock eventually cripples system throughput and will cause the CPU utilization to

Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & technical discussions at Telegram SanfoundryClasses.

What is a deadlock Mcq?

A deadlock is a situation in which two computer programs sharing the same resource are effectively preventing each other from accessing the resource, resulting in both programs ceasing to function.

Which of the following methods is used to detect the deadlock in case of a resource with single instance?

If resource categories have only single instances of their resources, then deadlock states can be detected by cycles in the resource-allocation graphs.

Which of the following is used for deadlock detection?

The OS can detect the deadlocks with the help of Resource allocation graph. In single instanced resource types, if a cycle is being formed in the system then there will definitely be a deadlock.

In which of the following method a deadlock detection algorithm must be invoked to determine whether any processes are still deadlocked?

Recovery Question 1 Detailed Solution Abort one process at a time until the deadlock cycle is eliminated: This method incurs considerable overhead, since after each process is aborted, a deadlock-detection algorithm must be invoked to determine whether any processes are still deadlocked.