190 likes | 405 Views
Deadlock Detection for Distributed Process Networks. Alex Olson Embedded Software Spring 2004. Problem Statement. Implement deadlock detection in a distributed process network (DPN) Deadlock detection required for PN scheduling algorithms Deadlock not statically predictable
E N D
Deadlock Detection for Distributed Process Networks Alex Olson Embedded Software Spring 2004
Problem Statement • Implement deadlock detection in a distributed process network (DPN) • Deadlock detection required for PN scheduling algorithms • Deadlock not statically predictable • DPN allows for high performance computations • Distributed Process Network • 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 (Allen00) • Zero copy queues • C++, POSIX Threads • Transmit and receive queues • TCP socket for communication • Simple Deadlock Detection Algorithm
Deadlock Detection • Mitchell & Merritt’s algorithm (Mitchell84) • 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
1,1 5,5 4,4 3,3 1,1 5,5 4,4 3,3 Mitchell-Merritt Example pub priv
4,1 5,5 4,4 3,3 4,1 5,5 4,4 3,3 Mitchell-Merritt Example BLOCK pub priv
4,1 6,5 4,4 3,3 4,1 6,5 4,4 3,3 Mitchell-Merritt Example BLOCK pub priv
4,1 6,5 4,4 7,3 4,1 6,5 4,4 7,3 Mitchell-Merritt Example BLOCK pub priv
7,3 6,5 4,4 7,3 4,1 6,5 4,4 7,3 Mitchell-Merritt Example Transmit pub priv
7,3 7,3 4,4 7,3 4,1 6,5 4,4 7,3 Mitchell-Merritt Example Transmit pub priv
7,3 7,3 4,4 7,3 4,1 6,5 4,4 7,3 Mitchell-Merritt Example DEADLOCK pub priv
Interface • Processes inherit methods from a “Process” class and implement the following: • void Init() • void Step() • int GetPID()
Performance • Up to 2 Million 1-Byte tokens per second • 120 Mbytes/sec (1kb tokens) • Verified deadlock detection for a a variety of cases
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 • Load Balancing