Suppose four cars each approach an intersection from four different directions s
ID: 3701054 • Letter: S
Question
Suppose four cars each approach an intersection from four different directions simultaneously. Each corner of the intersection has a stop sign. Assume that traffic regulations require that when two cars approach adjacent stop signs at the same time, the car on the left must yield to the car on the right. Thus, as four cars each drive up to their individual stop signs, each waits (indefinitely) for the car on the left to proceed. Is this anomaly a communication deadlock? Is it a resource deadlock?
Please type Answer do not Hand write. Thank you.
Explanation / Answer
Basically Deadlock is defined as a situation where the execution of set of processes are blocked because process is holding a resource and waiting for resource acquired by other process and this situation continues.
Yes the above example of four cars is real world example of the deadlock in this cars can be replaced by processes and signal can be replaced by messages and resources.
This is basically a communication deadlock as there is a communication gap of messages between the drivers.
The solution of the problem is ,one of the driver will have to abandon his priority and provide signal to the driver on his left. This approach resolves the deadlock and breaks symmetry.