deadlock detection for distributed process networks alex olson embedded software spring 2004

18
Deadlock Detection for Distributed Process Networks Alex Olson Embedded Software Spring 2004

Upload: baldwin-ramsey

Post on 18-Jan-2018

218 views

Category:

Documents


0 download

DESCRIPTION

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.

TRANSCRIPT

Page 1: Deadlock Detection for Distributed Process Networks Alex Olson Embedded Software Spring 2004

Deadlock Detection for Distributed Process Networks

Alex OlsonEmbedded Software

Spring 2004

Page 2: Deadlock Detection for Distributed Process Networks Alex Olson Embedded Software Spring 2004

Problem StatementImplement 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

Page 3: Deadlock Detection for Distributed Process Networks Alex Olson Embedded Software Spring 2004

GoalsAchieve high-performanceDeadlock detection should have minimal impact on system performance, resource usageDeadlock detection should support future addition of dynamic process migration.

Page 4: Deadlock Detection for Distributed Process Networks Alex Olson Embedded Software Spring 2004

ImplementationDistributed Computational Process Network (Allen00)Zero copy queuesC++, POSIX ThreadsTransmit and receive queuesTCP socket for communicationSimple Deadlock Detection Algorithm

Page 5: Deadlock Detection for Distributed Process Networks Alex Olson Embedded Software Spring 2004

Deadlock DetectionMitchell & 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 guaranteeNo synchronization mechanism required

Page 6: Deadlock Detection for Distributed Process Networks Alex Olson Embedded Software Spring 2004

Mitchell-Merritt Example

1,1

1,1

5,5

5,5

4,4

4,4

3,3

3,3 pub

priv

Page 7: Deadlock Detection for Distributed Process Networks Alex Olson Embedded Software Spring 2004

Mitchell-Merritt Example

4,1

4,1

5,5

5,5

4,4

4,4

3,3

3,3 pub

priv

BLOCK

Page 8: Deadlock Detection for Distributed Process Networks Alex Olson Embedded Software Spring 2004

Mitchell-Merritt Example

4,1

4,1

6,5

6,5

4,4

4,4

3,3

3,3 pub

priv

BLOCK

Page 9: Deadlock Detection for Distributed Process Networks Alex Olson Embedded Software Spring 2004

Mitchell-Merritt Example

4,1

4,1

6,5

6,5

4,4

4,4

7,3

7,3 pub

priv

BLOCK

Page 10: Deadlock Detection for Distributed Process Networks Alex Olson Embedded Software Spring 2004

Mitchell-Merritt Example

7,3

4,1

6,5

6,5

4,4

4,4

7,3

7,3 pub

priv

Transmit

Page 11: Deadlock Detection for Distributed Process Networks Alex Olson Embedded Software Spring 2004

Mitchell-Merritt Example

7,3

4,1

7,3

6,5

4,4

4,4

7,3

7,3 pub

priv

Transmit

Page 12: Deadlock Detection for Distributed Process Networks Alex Olson Embedded Software Spring 2004

Mitchell-Merritt Example

7,3

4,1

7,3

6,5

4,4

4,4

7,3

7,3 pub

priv

DEADLOCK

Page 13: Deadlock Detection for Distributed Process Networks Alex Olson Embedded Software Spring 2004

InterfaceProcesses inherit methods from a “Process” class and implement the following:void Init()void Step() int GetPID()

Page 14: Deadlock Detection for Distributed Process Networks Alex Olson Embedded Software Spring 2004

PerformanceUp to 2 Million 1-Byte tokens per second120 Mbytes/sec (1kb tokens)Verified deadlock detection for a a variety of cases

Page 15: Deadlock Detection for Distributed Process Networks Alex Olson Embedded Software Spring 2004

Performance Statistics Token Rate

Page 16: Deadlock Detection for Distributed Process Networks Alex Olson Embedded Software Spring 2004

Performance Statistics Data Rate

Page 17: Deadlock Detection for Distributed Process Networks Alex Olson Embedded Software Spring 2004

ConclusionDeadlock detection in DPNs can be fairly simpleMethod can be applied to regular PNsDPNs capable of high performanceFuture WorkProcess MigrationLoad Balancing

Page 18: Deadlock Detection for Distributed Process Networks Alex Olson Embedded Software Spring 2004

ReferencesAllen00 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.

Mitchell84 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.