A formal proof of a necessary and sufficient condition for deadlock-free adaptive networks Interactive Theorem Proving 11-07-2010 Freek Verbeek & Julien.

Slides:



Advertisements
Similar presentations
Functional Decompositions for Hardware Verification With a few speculations on formal methods for embedded systems Ken McMillan.
Advertisements

Optimization Problems in Optical Networks. Wavelength Division Multiplexing (WDM) Directed: Symmetric: Undirected: Optic Fiber.
Spreading Alerts Quietly and the Subgroup Escape Problem Aleksandr Yampolskiy (Yale) Joint work with James Aspnes, Zoë Diamadi, Kristian Gjøsteen, and.
1 Distributed Deadlock Fall DS Deadlock Topics Prevention –Too expensive in time and network traffic in a distributed system Avoidance.
Presentation of Designing Efficient Irregular Networks for Heterogeneous Systems-on-Chip by Christian Neeb and Norbert Wehn and Workload Driven Synthesis.
Advanced Networking Wickus Nienaber Daniel Beech.
Miguel Gorgues, Dong Xiang, Jose Flich, Zhigang Yu and Jose Duato Uni. Politecnica de Valencia, Spain School of Software, Tsinghua University, China, Achieving.
High Performance Router Architectures for Network- based Computing By Dr. Timothy Mark Pinkston University of South California Computer Engineering Division.
1 Lecture 12: Interconnection Networks Topics: dimension/arity, routing, deadlock, flow control.
CSE 291-a Interconnection Networks Lecture 12: Deadlock Avoidance (Cont’d) Router February 28, 2007 Prof. Chung-Kuan Cheng CSE Dept, UC San Diego Winter.
CS 258 Parallel Computer Architecture Lecture 5 Routing February 6, 2008 Prof John D. Kubiatowicz
Interconnection Networks: Deadlock and Livelock Feb. 26 th, 2007 Prof. Chung-Kuan Cheng Transcribed by: Mohammad Al-Fares.
1 Lecture 24: Interconnection Networks Topics: topologies, routing, deadlocks, flow control Final exam reminders:  Plan well – attempt every question.
Dept. of Computer Science Distributed Computing Group Asymptotically Optimal Mobile Ad-Hoc Routing Fabian Kuhn Roger Wattenhofer Aaron Zollinger.
1 Lecture 24: Interconnection Networks Topics: topologies, routing, deadlocks, flow control.
2015/7/2Deadlock-free Packet Switching1 Introduction to Distributed Algorithm Part One: Protocols Chapter 5- Deadlock-free Packet Switching Teacher: Chun-Yuan.
1 Indirect Adaptive Routing on Large Scale Interconnection Networks Nan Jiang, William J. Dally Computer System Laboratory Stanford University John Kim.
Router modeling using Ptolemy Xuanming Dong and Amit Mahajan May 15, 2002 EE290N.
A Comparative Analysis of Deadlock Recovery and Avoidance-Based Routing Algorithms in Wormhole-Switched k-Ary n-Cubes Paper review Reviewer : Nthu CS03.
1 The Turn Model for Adaptive Routing. 2 Summary Introduction to Direct Networks. Deadlocks in Wormhole Routing. System Model. Partially Adaptive Routing.
Routing algorithms Routing algorithms establish the path followed by each message or packet. Routing algorithms for wormhole routing are also valid for.
Distributed Algorithms 2014 Igor Zarivach A Distributed Algorithm for Minimum Weight Spanning Trees By Gallager, Humblet,Spira (GHS)
High-Performance Networks for Dataflow Architectures Pravin Bhat Andrew Putnam.
High-Level Interconnect Architectures for FPGAs An investigation into network-based interconnect systems for existing and future FPGA architectures Nick.
High-Level Interconnect Architectures for FPGAs Nick Barrow-Williams.
Shubhendu S. Mukherjee, Peter Bannon, Steven Lang, Aaron Spink, and David Webb Alpha Development Group, Compaq HOT Interconnects 9 (2001) Presented by.
Deadlock CEG 4131 Computer Architecture III Miodrag Bolic.
Multiprocessor Interconnection Networks Todd C. Mowry CS 740 November 3, 2000 Topics Network design issues Network Topology.
O1TURN : Near-Optimal Worst-Case Throughput Routing for 2D-Mesh Networks DaeHo Seo, Akif Ali, WonTaek Lim Nauman Rafique, Mithuna Thottethodi School of.
ECE669 L21: Routing April 15, 2004 ECE 669 Parallel Computer Architecture Lecture 21 Routing.
Second-Order Functions and Theorems in ACL2 Alessandro Coglio Workshop 2015 Kestrel Institute.
NC2 (No.4) 1 Undeliverable packets & solutions Deadlock: packets are unable to progress –Prevention, avoidance, recovery Livelock: packets cannot reach.
1 Lecture 15: Interconnection Routing Topics: deadlock, flow control.
BZUPAGES.COM Presentation On SWITCHING TECHNIQUE Presented To; Sir Taimoor Presented By; Beenish Jahangir 07_04 Uzma Noreen 07_08 Tayyaba Jahangir 07_33.
Run-time Adaptive on-chip Communication Scheme 林孟諭 Dept. of Electrical Engineering National Cheng Kung University Tainan, Taiwan, R.O.C.
Topics Paths and Circuits (11.2) A B C D E F G.
1 The Encoding Complexity of Network Coding Michael Langberg California Institute of Technology Joint work with Jehoshua Bruck and Alex Sprintson.
© Sudhakar Yalamanchili, Georgia Institute of Technology (except as indicated) Deadlock.
ICSA 341 Data communications & Computer Networks Switching In the WAN, mesh networks are not practical for geographically spread areas with many nodes.
1 Lecture 24: Interconnection Networks Topics: communication latency, centralized and decentralized switches, routing, deadlocks (Appendix F)
1 Lecture 14: Interconnection Networks Topics: dimension vs. arity, deadlock.
Effective bandwidth with link pipelining Pipeline the flight and transmission of packets over the links Overlap the sending overhead with the transport.
Ch 3 –What is a deadlock ? –Conditions Hold and Wait Mutual Exclusion Non Preemption Circular Wait –Deadlock Models Single Unit Request AND Request OR.
© Sudhakar Yalamanchili, Georgia Institute of Technology (except as indicated) Deadlock: Part II - Recovery.
Headline in Arial Bold 30pt Cyclic Dependencies and Deadlock Cyclic Dependencies and Deadlock in Computer Networks (with historical anectdotes) Greg Thorson.
1 Lecture 22: Interconnection Networks Topics: Routing, deadlock, flow control, virtual channels.
Complexity of Compositional Model Checking of Computation Tree Logic on Simple Structures Krishnendu Chatterjee Pallab Dasgupta P.P. Chakrabarti IWDC 2004,
Network Layer COMPUTER NETWORKS Networking Standards (Network LAYER)
CS 3700 Networks and Distributed Systems
Ch 3 What is a deadlock ? Conditions Deadlock Models Hold and Wait
L. Cittadini, G. Di Battista, M. Rimondini, S. Vissicchio
Deadlock-free Packet Switching
Deadlock.
Interconnection Networks: Flow Control
CS 3700 Networks and Distributed Systems
ITEC452 Distributed Computing Lecture 9 Global State Collection
CS 4700 / CS 5700 Network Fundamentals
Deadlock Free Hardware Router with Dynamic Arbiter
Mechanics of Flow Control
Chapter 10: Mathematical proofs
Lecture 14: Interconnection Networks
CS 4700 / CS 5700 Network Fundamentals
Memory Management Algorithms Huan Liu, Damon Mosk-Aoyama
CEG 4131 Computer Architecture III Miodrag Bolic
Lecture: Interconnection Networks
ECE 544 Project3 Team member.
Reductions Complexity ©D.Moshkovitz.
Reductions Complexity ©D.Moshkovitz.
Lecture 25: Interconnection Networks
EE382C Lecture 9 Deadlock 4/26/11 EE 382C - S11- Lecture 9.
Presentation transcript:

A formal proof of a necessary and sufficient condition for deadlock-free adaptive networks Interactive Theorem Proving Freek Verbeek & Julien Schmaltz

Deadlocks: circular wait

Deadlocks: resources

Deadlocks: dependencies A B

Resource dependency graph

Deadlocks: circular wait? A B C

Resource dependency graph

Necessary and sufficient condition A cyclic dependency graph is only sufficient Duato was the first to define a necessary and sufficient condition Duato’s theorem was “complex, counter- intuitive and disruptive”

Necessary and sufficient condition A cyclic dependency graph is only sufficient Duato was the first to define a necessary and sufficient condition Duato’s theorem was “complex, counter- intuitive and disruptive” A simple, easy to understand and formally proven correct condition for adaptive routing.

Necessary and sufficient condition A network is deadlock-free if and only if all sets of cycles have an escape.

Escape A B C

No escape A B C

Necessary and sufficient condition All sets of cycles must have an escape. No deadlock Deadlock No deadlock

Necessary and sufficient condition All sets of cycles must have an escape No deadlock

Necessary and sufficient condition No deadlock

Interconnection Networks Interconnection network consists of: – Nodes n0n0 n1n1 n2n2 n4n4 n3n3 n5n5

Interconnection Networks Interconnection network consists of: – Nodes – Channels n0n0 n1n1 n2n2 n4n4 n3n3 n5n5 c0c0 c1c1 c5c5 c6c6 c2c2 c3c3 c4c4

Interconnection Networks Interconnection network consists of: – Nodes – Channels – Routing function n0n0 n1n1 n2n2 n4n4 n3n3 n5n5 c0c0 c1c1 c5c5 c6c6 c2c2 c3c3 c4c4 R(n 0,n 5 )=c 0 R(n 1,n 5 )={c 3, c 1 }

Interconnection Networks Interconnection network consists of: – Nodes – Channels – Routing function – Packet switching n0n0 n1n1 n2n2 n4n4 n3n3 n5n5 c0c0 c1c1 c5c5 c6c6 c2c2 c3c3 c4c4

Formalization of deadlock A configuration σ is a list of messages and their current channels. n0n0 n1n1 n2n2 n4n4 n3n3 n5n5 c0c0 c1c1 c5c5 c6c6 c2c2 c3c3 c4c4 MessageDestinationCurrent channe l n5n5 c0c0 n2n2 c0c0 n1n1 c6c6 Network:Configuration:

Formalization of deadlock A deadlock is a configuration where all messages are stuck. n0n0 n1n1 n2n2 n4n4 n3n3 n5n5 c0c0 c1c1 c5c5 c6c6 c2c2 c3c3 c4c4

Formalization of deadlock A deadlock is a configuration where all messages are stuck. A message is stuck if all its next hops are unavailable. n0n0 n1n1 n2n2 n4n4 n3n3 n5n5 c0c0 c1c1 c5c5 c6c6 c2c2 c3c3 c4c4

Formalization of deadlock A deadlock is a configuration where all messages are stuck. A message is stuck if all its next hops are unavailable. ((encapsulate (((unav * *) => *)) (((dl *) => *)) (defthm deadlock unav-next-hops (iff (dl σ) (unav (next-hops (msgs σ)) σ))) (defthm unav==>free-channel (implies (unav channels σ) (free channels σ))))

Formalization of deadlock A network is deadlock-free iff there exists no deadlock-configuration. (defun-sk E-deadlock (exists (σ) (and (legal-configp σ) (deadlock-configp σ))))

Formalization of condition (defun-sk A-cycles-E-escape (forall (cycles) (implies (and (consp cycles) (dep-cyclesp cycles)) (E-escape cycles)))) (defun-sk E-escape (cycles) (exists (channel) (and (member channel cycles) (A-dests-E-neighbor-outside channel cycles))

Formalization of condition (defthm correctness-of-condition (iff (not (E-deadlock)) (A-cycles-E-escape)))

Proof of correctness Condition --> Deadlock: – Define function that creates a legal deadlock from a set of cycles without an escape: – Proof correctness of this function. MessageDestinationCurrent channe l m0m0 d0d0 c0c0 m1m1 d1d1 c1c1 m2m2 d2d2 c2c2

Proof of correctness Deadlock --> Condition: – Define function that creates a set of cycles without an escape from a deadlock: – Proof correctness of this function. MessageDestinationCurrent channe l m0m0 d0d0 c0c0 m1m1 d1d1 c1c1 m2m2 d2d2 c2c2

Conclusions A correct, simple and formal condition for adaptive routing in packet switching networks Formal proof helped us understanding Duato’s condition Used defun-sk and defspec to elegantly define theorems Application: turn model in 2D Meshes

Future work Do a similar proof for wormhole networks Create a formally verified algorithm deciding deadlock-freedom

Questions?

Second order existential quantification A defspec construct does second order universal quantification Our approach: represent function f in an alist.

Second order existential quantification Given domain D and predicate p: (defun-sk A-x-in-D-p (f D) (forall (x) (implies (member x D) (p (cdr (assoc f x)))))) (defun-sk E-f-st-A-x-in-D-p (D) (exists f (and (alistp f) (A-x-in-D-p (f D)))))