MOOC MCQ QUESTIONS WITH ANSWERS 1. A system has 6 identical resources and N processes competing for them. Each process can request atmost 2 resources. Which one of the following values of N could lead to a deadlock? a) 1 b) 2 c) 3 d) 4 Answer: d 2. Consider a system having m resources of the same type. These resources are shared by 3 processes A, B and C, which have peak demands of 3, 4 and 6 respectively. For what value of m deadlock will not occur? a) 7 b) 9 c) 10 d) 13 Answer: d 3. A computer system has 6 tape drives, with n process completing 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 Answer: a 4. Which of the following is NOT true of deadlock prevention and deadlock avoidance schemes? a) In deadlock prevention, the request for resources is always granted if the resulting state is safe b) In deadlock avoidance, the request for resources is always grant...
INTRODUCTION In a multiprogramming environment, several processes may compete for a finite number of resources. A process requests resources; if the resources are not available at that time, the process enters a waiting state. Sometimes, a waiting process is never again able to change state, because the resources it has requested are held by other waiting processes. This situation is called a deadlock. Deadlock is a critical concept in the field of operating systems, particularly in the context of concurrent and multi-threaded environments. It occurs when two or more processes (or threads) are unable to proceed because each is waiting for the other to release a resource or complete a task, resulting in a standstill where none of the processes can make progress. To understand deadlock better, let's look at the four necessary conditions for dead...