Deadlock Avoidance for Distributed Real-Time and Embedded Systems

César Sánchez

This thesis studies how to prevent deadlocks in distributed real-time and embedded systems. Deadlocks are undesirable states of concurrent systems, characterized by a set of processes in a circular wait state, in which each process is blocked trying to gain access to a resource held by the next one in the chain. Solutions can be classified into three categories:

  • Deadlock detection is an optimistic approach. It assumes that deadlocks are infrequent and detects and corrects them at runtime. This technique is not applicable to real-time systems since the worst case running time is long. Moreover, in embedded systems actions cannot be undone.
  • Deadlock prevention is a pessimistic approach. The possibility of a deadlock is broken statically at the price of restricting concurrency.
  • Deadlock avoidance takes a middle route. At runtime each allocation request is examined to ensure that it cannot lead to a deadlock.
Deadlock prevention is commonly used in distributed real-time and embedded systems but, since concurrency is severely limited, an efficient distributed deadlock avoidance schema can have a big practical impact. However, it is commonly accepted (since the mid 1990s) that the general solution for distributed deadlock avoidance is impractical, because it requires maintaining global states and global atomicity of actions. The communication costs involved simply outweigh the benefits gained from avoidance over prevention.

This thesis presents an efficient distributed deadlock avoidance schema that requires no communication between the participant sites, based on a combination of static analysis and runtime protocols. This solution assumes that the possible sequences of remote calls are available for analysis at design time. This thesis also includes protocols that guarantee liveness, and mechanisms to handle distributed priority inversions.

Ph.D. thesis, Stanford University, May 2007.
Download: BIB PDF