100 likes | 233 Views
Alex Olson Embedded Software Spring 2004. Distributed Process Network Deadlock Detection & Resolution. 1. What is Process Networks?. Process Network (PN) [Kahn74] Concurrent processes communicate only over one-way channels (FIFO queues) Reads block until enough data is available
E N D
Alex Olson Embedded Software Spring 2004 Distributed Process Network Deadlock Detection & Resolution
1. What is Process Networks? • Process Network (PN) [Kahn74] • Concurrent processes communicate only over one-way channels (FIFO queues) • Reads block until enough data is available • Determinate model of computation • Queues are unbounded in size • Program deadlocks only at termination PN models functional parallelism
2. Why make PNs Distributed? • Why make PNs distributed? • Multiprocessor (SMP) desktops are expensive, have limited number of processors ( ~16 ) • SMP is overkill for PN coarse-grain parallelism (don’t need shared memory) • PNs are inherently parallelizable • Perhaps one computer is specialized for computation, another specialized for 3D visualization, etc…
3. Implementation of Distributed Process Networks (DPN) • Is it Easy? • Deadlock Detection(Channel is now distributed) • Load Balancing(Need to consider what subset of all processes to put on each sever) • Dynamic Process Migration(Addition/Deletion of Servers) • Objectives • Create a high-performance DPN framework compatible with the above • Implement Deadlock Detection
3. Extensions of Kahn’s PN • Parks ‘95 • Sets capacity of each arc • Writes to full queues (artificially) block • On global deadlock, resize smallest queue • Prefers incomplete bounded over complete unbounded execution • Is determinacy of model compromised? • Geilen & Basten ‘03 • Prefers complete unbounded over incomplete unbounded • Solves local deadlock detection/resolution
4. PN & DPN Implementations All PN Implementations Map processes onto threads Rely on shared memory for deadlock detection All DPN Implementations Map processes onto threads, multiple servers over a network Only a few implementations exist None do deadlock detection!
5. DPN Deadlock Detection • Network ‘channel’ more complex than shared-memory queue • Network latency • Causes different views of channel • Indeterminate capacity • How much data is in transit? • Send / Receive Buffers • Even TCP doesn’t completely guarantee delivery!
6. Conclusion • Distributing PNs has cost & performance benefits • New problems arise in DPNs that didn’t exist in regular PNs. • No known DPN framework currently detects deadlocks. • Implementation Plan: • Create simple, high-performance framework using Java or C++ • Use a distributed global snapshot algorithm for deadlock detection • Tame the channel by counting and acknowledging tokens (on top of TCP)
7. Future Plans • Evaluate deadlock detection overhead • Examine queue sizes vs performance • Compare DPN vs. PN performance • Implement Dynamic Load Balancing Any questions?
8. References [Kahn 74 ] G. Kahn. "The Semantics of a Simple Language for Parallel Programming." In J.L. Rosenfeld, editor, Information Processing 74, Proceedings, pages 471–475, Stockholm, Sweden, August 1974. North-Holland, Amsterdam, The Netherlands, 1974. [Parks 95 ]T.M. Parks. "Bounded Scheduling of Process Networks." PhD thesis, University of California, EECS Dept., Berkeley, CA, December 1995. Technical Memorandum UCB/ERL M95/105. [Geilen 03]M.C.W. Geilen and T. Basten. "Requirements on the Execution of Kahn Process Networks." Programming Languages and Systems, ESOP 2003, Warsaw, Poland, April 7-11, 2003, Proceedings. Lecture Notes in Computer Science. Berlin, Germany, 2003