Deadlock Detection for Distributed Process Networks Alex Olson
Deadlock Detection for Distributed Process Networks Alex Olson Embedded Software Spring 2004
Problem Statement Implement deadlock detection in a distributed process network (DPN) l l l Deadlock detection required for PN scheduling algorithms Deadlock not statically predictable DPN allows for high performance computations Distributed Process Network l l l Variable channel latency Limited bandwidth No central server
Goals Achieve high-performance Deadlock detection should have minimal impact on system performance, resource usage Deadlock detection should support future addition of dynamic process migration.
Implementation Distributed Computational Process Network (Allen 00) Zero copy queues C++, POSIX Threads Transmit and receive queues TCP socket for communication Simple Deadlock Detection Algorithm
Deadlock Detection Mitchell & Merritt’s algorithm (Mitchell 84) l l l Single-resource model Detects “local” and “global” deadlocks Each Process has two labels Each label is (count, pid) Guarantees only one process detects deadlock Send tokens and control information on same socket, make use of FIFO guarantee No synchronization mechanism required
Mitchell-Merritt Example 1, 1 3, 3 pub priv 5, 5 4, 4
Mitchell-Merritt Example BLOCK 4, 1 3, 3 pub priv 5, 5 4, 4
Mitchell-Merritt Example BLOCK 4, 1 3, 3 pub priv 6, 5 4, 4
Mitchell-Merritt Example BLOCK 4, 1 7, 3 pub priv 6, 5 4, 4
Mitchell-Merritt Example Transmit 7, 3 4, 1 7, 3 pub priv 6, 5 4, 4
Mitchell-Merritt Example Transmit 7, 3 4, 1 7, 3 pub priv 7, 3 4, 4 6, 5 4, 4
Mitchell-Merritt Example DEADLOCK 7, 3 4, 1 7, 3 pub priv 7, 3 4, 4 6, 5 4, 4
Interface Processes inherit methods from a “Process” class and implement the following: void Init() l void Step() l int Get. PID() l
Performance Up to 2 Million 1 -Byte tokens per second 120 Mbytes/sec (1 kb tokens) Verified deadlock detection for a a variety of cases
Performance Statistics Token Rate
Performance Statistics Data Rate
Conclusion Deadlock detection in DPNs can be fairly simple Method can be applied to regular PNs DPNs capable of high performance Future Work Process Migration l Load Balancing l
References Allen 00 Mitchell 84 G. Allen and B. Evans, “Real-time sonar beamforming on workstations using process networks and POSIX threads, ” in IEEE Trans. Signal Processing, Mar. 2000, pp. 921– 926. D. P. Mitchell and M. J. Merritt, “A distributed algorithm for deadlock detection and resolution, ” in ACM Symposium on Principles of Distributed Computing, 1984, pp. 282 – 284.
- Slides: 18