Show
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 Maximum needs (process-wise: P0 through P2 top to bottom) Currently allocated (process-wise) Other sets by this creatorThis 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 ____________ Answer: a 2. An edge from process Pi to Pj in a wait for graph indicates that ____________ Answer: a 3. If the wait for graph contains a cycle ____________ Answer: b 4. If deadlocks occur
frequently, the detection algorithm must be invoked ________ Answer: b 5. What is the disadvantage of invoking the detection algorithm for every request? Answer: c 6. A deadlock eventually cripples system throughput and will cause the CPU utilization to ______ Answer: b 7. Every time a request for allocation cannot be granted immediately, the detection algorithm is invoked. This will help identify ____________ Answer: a 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? Answer: a 9. A system has 3 processes sharing 4 resources. If each process needs a maximum of 2 units then, deadlock ____________ Answer: a 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 ____________ Answer: a Sanfoundry Global Education & Learning Series – Operating System. Next Steps:
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.
|