distributed process network deadlock detection & resolution

10
Distributed Process Network Deadlock Detection & Resolution Alex Olson Alex Olson Embedded Software Embedded Software Spring 2004 Spring 2004

Upload: dakota

Post on 25-Feb-2016

27 views

Category:

Documents


3 download

DESCRIPTION

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 - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Distributed Process Network Deadlock Detection & Resolution

Distributed Process Network Deadlock Detection &

ResolutionAlex OlsonAlex Olson

Embedded SoftwareEmbedded SoftwareSpring 2004Spring 2004

Page 2: Distributed Process Network Deadlock Detection & Resolution

1. What is Process Networks?1. What is Process Networks?

Process NetworkProcess Network (PN) (PN) [Kahn74][Kahn74]

Concurrent processes communicate only Concurrent processes communicate only over one-way channels (FIFO queues)over one-way channels (FIFO queues)

Reads block until enough data is availableReads block until enough data is available Determinate model of computationDeterminate model of computation Queues are unbounded in sizeQueues are unbounded in size Program deadlocks only at terminationProgram deadlocks only at termination

PN models PN models functional functional parallelismparallelism

Page 3: Distributed Process Network Deadlock Detection & Resolution

2. Why make PNs Distributed?2. Why make PNs Distributed?

Why make PNs distributed?Why make PNs distributed? Multiprocessor (SMP) desktops are Multiprocessor (SMP) desktops are

expensive, have limited number of expensive, have limited number of processors ( ~16 )processors ( ~16 )

SMP is overkill for PN coarse-grain SMP is overkill for PN coarse-grain parallelism (don’t parallelism (don’t need need shared memory)shared memory)

PNs are inherently parallelizablePNs are inherently parallelizable Perhaps one computer is specialized for Perhaps one computer is specialized for

computation, another specialized for 3D computation, another specialized for 3D visualization, etc…visualization, etc…

Page 4: Distributed Process Network Deadlock Detection & Resolution

3. Implementation of Distributed 3. Implementation of Distributed Process Networks (DPN)Process Networks (DPN) Is it Easy?Is it Easy?

Deadlock DetectionDeadlock Detection(Channel is now distributed)(Channel is now distributed)

Load BalancingLoad Balancing(Need to consider what subset of all processes (Need to consider what subset of all processes to put on each sever)to put on each sever)

Dynamic Process MigrationDynamic Process Migration(Addition/Deletion of Servers)(Addition/Deletion of Servers)

ObjectivesObjectives Create a high-performance DPN Create a high-performance DPN

framework compatible with the aboveframework compatible with the above Implement Deadlock DetectionImplement Deadlock Detection

Page 5: Distributed Process Network Deadlock Detection & Resolution

3. Extensions of Kahn’s PN3. Extensions of Kahn’s PN

Parks ‘95Parks ‘95 Sets capacity of each arcSets capacity of each arc Writes to full queues (artificially) blockWrites to full queues (artificially) block On global deadlock, resize smallest On global deadlock, resize smallest

queuequeue Prefers incomplete bounded over Prefers incomplete bounded over

complete unbounded executioncomplete unbounded execution Is determinacy of model compromised?Is determinacy of model compromised?

Geilen & Basten ‘03Geilen & Basten ‘03 Prefers complete unbounded over Prefers complete unbounded over

incomplete unboundedincomplete unbounded Solves local deadlock Solves local deadlock

detection/resolutiondetection/resolution

Page 6: Distributed Process Network Deadlock Detection & Resolution

4. PN & DPN Implementations4. PN & DPN Implementations

All PN ImplementationsAll PN Implementations Map processes onto threadsMap processes onto threads Rely on shared memory for deadlock Rely on shared memory for deadlock

detectiondetection

All DPN ImplementationsAll DPN Implementations Map processes onto threads, Map processes onto threads,

multiple servers over a networkmultiple servers over a network Only a few implementations existOnly a few implementations exist None do deadlock detection!None do deadlock detection!

Page 7: Distributed Process Network Deadlock Detection & Resolution

5. DPN Deadlock Detection5. DPN Deadlock Detection

Network ‘channel’ more complex Network ‘channel’ more complex than shared-memory queuethan shared-memory queue Network latencyNetwork latency

Causes different views of channelCauses different views of channel

Indeterminate capacityIndeterminate capacity How much data is in transit?How much data is in transit?

Send / Receive BuffersSend / Receive Buffers Even TCP doesn’t completely Even TCP doesn’t completely

guarantee delivery!guarantee delivery!

Page 8: Distributed Process Network Deadlock Detection & Resolution

6. Conclusion6. Conclusion

Distributing PNs has cost & Distributing PNs has cost & performance benefitsperformance benefits

New problems arise in DPNs that New problems arise in DPNs that didn’t exist in regular PNs.didn’t exist in regular PNs.

No known DPN framework currently No known DPN framework currently detects deadlocks.detects deadlocks.

Implementation Plan:Implementation Plan: Create simple, high-performance Create simple, high-performance

framework using Java or C++framework using Java or C++ Use a distributed global snapshot Use a distributed global snapshot

algorithm for deadlock detectionalgorithm for deadlock detection Tame the channel by counting and Tame the channel by counting and

acknowledging tokens (on top of TCP)acknowledging tokens (on top of TCP)

Page 9: Distributed Process Network Deadlock Detection & Resolution

7. Future Plans7. Future Plans

Evaluate deadlock detection Evaluate deadlock detection overheadoverhead

Examine queue sizes vs performanceExamine queue sizes vs performance

Compare DPN vs. PN performanceCompare DPN vs. PN performance

Implement Dynamic Load BalancingImplement Dynamic Load Balancing

Any questions?Any questions?

Page 10: Distributed Process Network Deadlock Detection & Resolution

8. References8. 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