A deadlock situation may arise iff the following necessary condition holds: • circular hold and wait: There must exist a set of waiting processes {p 1, p 2, . , p iff the A set of processes are deadlocked if each process is waiting for an event that only another process can cause. In this section of Operating System CPU Scheduling MCQs.it contain Operating System Process Management - Deadlocks MCQs (Multiple Choice Questions Answers).All the MCQs (Multiple Choice Question Answers) requires in detail reading of Operating System subject as the hardness level of MCQs have been kept to advance level. or A process is deadlocked if it is waiting for an event which is never going to happen. ResourceDeadlocks: most common deadlocks, P 1 has R 1 and requests R 2, P 2 has R 2 and requests R 3, P 3 has R 3 and requests R 4, P 4 has R 4 and requests R 1 Preemptableresource: can be taken from the process without damage. Deadlock: A set of processes is deadlocked if each process in the set is waiting for an event that only another process in the set can cause. Operating systems do not typically provide deadlock-prevention facilities, and it remains the responsibility of programmers to ensure that they design deadlock free-programs. A set of processes is deadlocked if each process in the set is waiting for an event that only another process in the set can cause. Mutual exclusion: exclusive use of resources 2. A set of two or more processes are deadlocked if they are blocked (i.e., in the waiting state) each holding a resource and waiting to acquire a resource held by another process in the set. . Defining Deadlocks A set of processes is deadlocked if each process is waiting for an event that can only be caused by another process in the set Necessary conditions for deadlock: 1. Definition: A set of processes is in a deadlock state if every process in the set is waiting for an event (release) that can only be caused by some other process in the same set. . Deadlock not only occurs in OS. Deadlock - Occurs when resources needed by one process are held by some other waiting process. Deadlock . Kansas state legislature in the early 20 th century passed the following legislation: "When two trains approach each other at a crossing, both shall come to a full stop and neither shall start up again until the other has gone. Hold and wait: process can request resource while holding another resource 3. 178. A set of processes is deadlock if-A. Because all the processes are waiting, none of them will ever cause any of the events that could wake up any of the other members of the set, and all the processes continue to wait forever. each process is blocked and will remain so forever B. each process is terminated C.all processes are trying to kill each other D. none of the mentioned A deadlock is created by concurrent users and in this instance process will be blocked. Example 5.1 Process-1 requests the printer, gets it Process-2 requests the tape unit, gets it Process-1 and Process-1 requests the tape unit, waits Process-2 are Process-2 requests the printer, waits deadlocked! D. none of the mentioned A deadlock is created by concurrent users and in this 6.1 A definition for deadlock A set of processes is in a state of deadlock when every process in the set is waiting for a resource that can only be released by another process in the set. No preemption: only holding process can release resource 4.