deadlock detection for distributed process networks alex olson embedded software spring 2004
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](https://reader036.vdocuments.site/reader036/viewer/2022082510/5a4d1b637f8b9ab0599ae57c/html5/thumbnails/1.jpg)
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](https://reader036.vdocuments.site/reader036/viewer/2022082510/5a4d1b637f8b9ab0599ae57c/html5/thumbnails/2.jpg)
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](https://reader036.vdocuments.site/reader036/viewer/2022082510/5a4d1b637f8b9ab0599ae57c/html5/thumbnails/3.jpg)
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](https://reader036.vdocuments.site/reader036/viewer/2022082510/5a4d1b637f8b9ab0599ae57c/html5/thumbnails/4.jpg)
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](https://reader036.vdocuments.site/reader036/viewer/2022082510/5a4d1b637f8b9ab0599ae57c/html5/thumbnails/5.jpg)
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](https://reader036.vdocuments.site/reader036/viewer/2022082510/5a4d1b637f8b9ab0599ae57c/html5/thumbnails/6.jpg)
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](https://reader036.vdocuments.site/reader036/viewer/2022082510/5a4d1b637f8b9ab0599ae57c/html5/thumbnails/7.jpg)
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](https://reader036.vdocuments.site/reader036/viewer/2022082510/5a4d1b637f8b9ab0599ae57c/html5/thumbnails/8.jpg)
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](https://reader036.vdocuments.site/reader036/viewer/2022082510/5a4d1b637f8b9ab0599ae57c/html5/thumbnails/9.jpg)
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](https://reader036.vdocuments.site/reader036/viewer/2022082510/5a4d1b637f8b9ab0599ae57c/html5/thumbnails/10.jpg)
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](https://reader036.vdocuments.site/reader036/viewer/2022082510/5a4d1b637f8b9ab0599ae57c/html5/thumbnails/11.jpg)
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](https://reader036.vdocuments.site/reader036/viewer/2022082510/5a4d1b637f8b9ab0599ae57c/html5/thumbnails/12.jpg)
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](https://reader036.vdocuments.site/reader036/viewer/2022082510/5a4d1b637f8b9ab0599ae57c/html5/thumbnails/13.jpg)
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](https://reader036.vdocuments.site/reader036/viewer/2022082510/5a4d1b637f8b9ab0599ae57c/html5/thumbnails/14.jpg)
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](https://reader036.vdocuments.site/reader036/viewer/2022082510/5a4d1b637f8b9ab0599ae57c/html5/thumbnails/15.jpg)
Performance Statistics Token Rate
![Page 16: Deadlock Detection for Distributed Process Networks Alex Olson Embedded Software Spring 2004](https://reader036.vdocuments.site/reader036/viewer/2022082510/5a4d1b637f8b9ab0599ae57c/html5/thumbnails/16.jpg)
Performance Statistics Data Rate
![Page 17: Deadlock Detection for Distributed Process Networks Alex Olson Embedded Software Spring 2004](https://reader036.vdocuments.site/reader036/viewer/2022082510/5a4d1b637f8b9ab0599ae57c/html5/thumbnails/17.jpg)
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](https://reader036.vdocuments.site/reader036/viewer/2022082510/5a4d1b637f8b9ab0599ae57c/html5/thumbnails/18.jpg)
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.