EducationBlog

banner image

Home - PageNavi (show/hide)

banner image

Consider the traffic deadlock depicted in Figure 7.10. a. Show that the four necessary conditions for deadlock indeed hold in this example. b. State a simple rule for avoiding deadlocks in this system.

Consider the traffic deadlock depicted in Figure 7.10. a. Show that the four necessary conditions for deadlock indeed hold in this example. b. State a simple rule for avoiding deadlocks in this system. 



Answer: a. The four necessary conditions for a deadlock are (1) mutual exclusion; (2) hold-and-wait; (3) no preemption; and (4) circular wait. The mutual exclusion condition holds since only one car can occupy a space in the roadway. Hold-and-wait occurs where a car holds onto its place in the roadway while it waits to advance in the roadway. A car cannot be removed (i.e. preempted) from its position in the roadway. Lastly, there is indeed a circular wait as each car is waiting for a subsequent car to advance. The circular wait condition is also easily observed from the graphic. b. A simple rule that would avoid this traffic deadlock is that a car may not advance
Consider the traffic deadlock depicted in Figure 7.10. a. Show that the four necessary conditions for deadlock indeed hold in this example. b. State a simple rule for avoiding deadlocks in this system. Consider the traffic deadlock depicted in Figure 7.10. a. Show that the four necessary conditions for deadlock indeed hold in this example. b. State a simple rule for avoiding deadlocks in this system. Reviewed by Pappy on September 21, 2019 Rating: 5

No comments:

Sports

3/Sports/small-col-right
Powered by Blogger.