MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

OPERATING SYSTEM

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
An example of a potential deadlock situation is
A
a one way bridge
B
a two way bridge
C
a single lane bridge
D
a one way train line
Explanation: 

Detailed explanation-1: -All trains are stopped, waiting for another to go, though none of them move. This is an example of deadlock because the resource, the train track, is held in a state of limbo as each train waits for another to move along so that they can continue.

Detailed explanation-2: -A potential deadlock does not necessarily occur in a given run, but can occur in any execution of the program depending on the scheduling of threads and the timing of lock requests by the threads. An actual deadlock is one that occurs during the execution of a program.

Detailed explanation-3: -One process cannot hold a resource, yet be waiting for another resource that it is holding. So it is not possible to have a deadlock involving only one process.

Detailed explanation-4: -Deadlocks occur in human systems with striking regularity. The traffic gridlock is the most common example. A simple gridlock occurs in an intersection when two lines of cars are attempting to turn left and the path of the front car is blocked by cars in the other line.

There is 1 question to complete.