Deadlock Detection and Recovery!



Similar documents
Time Management in the High Level Architecture"

ZooKeeper. Table of contents

Design and Implementation of Distributed Process Execution Environment

Implementing New Approach for Enhancing Performance and Throughput in a Distributed Database

Applying Attribute Level Locking to Decrease the Deadlock on Distributed Database

Chapter 7: Termination Detection

Preferred citation style for this presentation

Physical Data Organization

CHAPTER 8 CONCLUSION AND FUTURE ENHANCEMENTS

Copyright 2013 wolfssl Inc. All rights reserved. 2

TCP over Wireless Networks

Unit Storage Structures 1. Storage Structures. Unit 4.3

Distributed Load Balancing for FREEDM system

Chapter 3 General Principles in Simulation

Previous Lectures. B-Trees. External storage. Two types of memory. B-trees. Main principles

Keywords: Architecture, Interoperability, Simulation Time, Synchronization

DYNAMIC LOAD BALANCING IN A DECENTRALISED DISTRIBUTED SYSTEM

Chapter 4. Medium Access Control. IN2P3 Octobre 2002 Jean-Pierre Thomesse

EECS 122: Introduction to Computer Networks Multiaccess Protocols. ISO OSI Reference Model for Layers

Stretching A Wolfpack Cluster Of Servers For Disaster Tolerance. Dick Wilkins Program Manager Hewlett-Packard Co. Redmond, WA dick_wilkins@hp.

Trigger-to-Image Reliability (T2IR)

Network (Tree) Topology Inference Based on Prüfer Sequence

An Approach to Load Balancing In Cloud Computing

BIRCH: An Efficient Data Clustering Method For Very Large Databases

Chapter 11 I/O Management and Disk Scheduling

PORTrockIT. Spectrum Protect : faster WAN replication and backups with PORTrockIT

An Optimistic Parallel Simulation Protocol for Cloud Computing Environments

B-Trees. Algorithms and data structures for external memory as opposed to the main memory B-Trees. B -trees

Load balancing Static Load Balancing

In This Lecture. More Concurrency. Deadlocks. Precedence/Wait-For Graphs. Example. Example

Load Balancing and Termination Detection

EE602 Algorithms GEOMETRIC INTERSECTION CHAPTER 27

Communication System Design Projects

Distributed Dynamic Load Balancing for Iterative-Stencil Applications

Load balancing; Termination detection

Using reverse circuit execution for efficient parallel simulation of logic circuits

1. The subnet must prevent additional packets from entering the congested region until those already present can be processed.

Chap. 1: Introduction

Data Structures Using C++ 2E. Chapter 5 Linked Lists

Load Balance Strategies for DEVS Approximated Parallel and Distributed Discrete-Event Simulations

Unit I. Introduction

Anomaly Detection Toolkit for Integrated Systems Health Management (ISHM)

Load Balancing in Periodic Wireless Sensor Networks for Lifetime Maximisation

B+ Tree Properties B+ Tree Searching B+ Tree Insertion B+ Tree Deletion Static Hashing Extendable Hashing Questions in pass papers

Load-Balancing for a Real-Time System Based on Asymmetric Multi-Processing

Giving life to today s media distribution services

Protagonist International Journal of Management And Technology (PIJMT) Online ISSN Vol 2 No 3 (May-2015) Active Queue Management

Load Balancing and Termination Detection

Earliest Due Date (EDD) [Ferrari] Delay EDD. Jitter EDD

Concurrency Control. Module 6, Lectures 1 and 2

A binary heap is a complete binary tree, where each node has a higher priority than its children. This is called heap-order property

Data Structure [Question Bank]

Introduction to Basics of Communication Protocol

Efficient Data Replication Scheme based on Hadoop Distributed File System

Simple Solution for a Location Service. Naming vs. Locating Entities. Forwarding Pointers (2) Forwarding Pointers (1)

Scheduling Allowance Adaptability in Load Balancing technique for Distributed Systems

VoIP QoS. Version 1.0. September 4, AdvancedVoIP.com. Phone:

Arrival rate

Routing and Transport in Wireless Sensor Networks

NSPK Protocol Security Model Checking System Builder

Introduction to Database Management Systems

Synchronization in. Distributed Systems. Cooperation and Coordination in. Distributed Systems. Kinds of Synchronization.

OPERATING SYSTEM - VIRTUAL MEMORY

ISSUES IN PARALLEL DISCRETE EVENT SIMULATION FOR AN INTERNET TELEPHONY CALL SIGNALING PROTOCOL

Synchronization. Todd C. Mowry CS 740 November 24, Topics. Locks Barriers

Decentralized Task-Aware Scheduling for Data Center Networks

Fibonacci Backoff Algorithm for Mobile Ad Hoc Networks

AXI Performance Monitor v5.0

Alok Gupta. Dmitry Zhdanov

SIMULATION OF LOAD BALANCING ALGORITHMS: A Comparative Study

Arena 9.0 Basic Modules based on Arena Online Help

Load balancing; Termination detection

Load Balancing in cloud computing

Frequently Asked Questions About Georgia Workers Compensation Ty Wilson Attorney At Law

Recovery System C H A P T E R16. Practice Exercises

Hadoop Fair Scheduler Design Document

G.8032 Ethernet Ring Protection Overview. March, 2008 ITU-T Q9 SG 15

Lecture 15: Congestion Control. CSE 123: Computer Networks Stefan Savage

Binary Heaps * * * * * * * / / \ / \ / \ / \ / \ * * * * * * * * * * * / / \ / \ / / \ / \ * * * * * * * * * *

Naming vs. Locating Entities

A Survey on Load Balancing and Scheduling in Cloud Computing

Mathematical Modelling of Computer Networks: Part II. Module 1: Network Coding

! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. !-approximation algorithm.

Unordered Linked Lists

How To Create A Tree From A Tree In Runtime (For A Tree)

OPTIMAL BINARY SEARCH TREES

Highly Available Hadoop Name Node Architecture-Using Replicas of Name Node with Time Synchronization among Replicas

Load Balancing on a Grid Using Data Characteristics

WBAN Beaconing for Efficient Resource Sharing. in Wireless Wearable Computer Networks

Transcription:

Deadlock Detection and Recovery! Richard M. Fujimoto! Professor!! Computational Science and Engineering Division! College of Computing! Georgia Institute of Technology! Atlanta, GA 30332-0765, USA!! http://www.cc.gatech.edu/~fujimoto/! Copyright Richard M. Fujimoto!

Outline! Deadlock Detection and Recovery Algorithm (Chandy and Misra)! Basic Approach! Deadlock Detection! Diffusing distributed computations! Dijkstra/Scholten algorithm (signaling protocol)! Deadlock Recovery!

Deadlock Detection & Recovery! Algorithm A (executed by each LP):! Goal: Ensure events are processed in time stamp order:!! WHILE (simulation is not over)!!wait until each FIFO contains at least one message!!remove smallest time stamped event from its FIFO!!process that event! END-LOOP! No null messages! Allow simulation to execute until deadlock occurs! Provide a mechanism to detect deadlock! Provide a mechanism to recover from deadlocks!

Deadlock Detection! Diffusing computations (Dijkstra/Scholten)! Computation consists of a collection of processes that communicate by exchanging messages! Receiving a message triggers computation; may result in sending/receiving more messages! Processes do not spontaneously start new computations (must first receive a message)! One process identified as the controller that is used for deadlock detection and recovery! Goal: determine when all of the processes are blocked (global deadlock)!

Basic Idea! Initially, all processes blocked except controller! Controller sends messages to one or more processes to break deadlock! Computation spreads as processes send messages! Construct a tree of processes that expands as the computation spreads, contracts as processes become idle! Processes in tree are said to be engaged! Processes not in tree are said to be disengaged! A disengaged process becomes engaged (added to tree) when it receives a message! An engage process becomes disengaged (removed from the tree) when it is a leaf node and it is idle (blocked)! If the tree only includes the controller, the processes are deadlocked!

Example! 1! Disengaged! Cntl! 2! 3! 4! Engaged, busy! Engaged, blocked! Tree arc! Message (event)! 12, 3 Controller 1, 1 disengaged, and becomes 4 added 2, and 43 become to 4 sends disengaged, added tree, 3 still idle! sends start to engaged; engagement messages controller dropped 2 sends to begins tree! from to 3! 1, message 2, tree! recovery! 4! to 4!

Processes! Engaged process! Has received at least one message for which no signal has been returned! Engaged process (non-leaf): process has sent one or more messages for which a signal has not yet been returned! Engaged process (leaf): A signal has been received for every message sent by the process! Disengaged process! A signal has been returned for all received messages! A signal has been received for all messages the process has sent!

Implementation: Signaling Protocol! Add signaling protocol to simulation execution! When an engaged process receives a message! Immediately return a signal to sender indicating message did not spawn a new node in the tree! When a disengaged process receives a message:! Receiving process becomes engaged! Do not return a signal until it becomes disengaged! An engaged process becomes disengaged (and sends a signal to its parent in the tree) when! It is idle, and! It is a leaf node in the tree! Process is a leaf it it has received signals for all messages it has sent!

Implementation (cont.)! Each process maintains two variables! C = # messages received for which process hasn t returned a signal! D = # messages sent for which a signal has not yet been received! When are C and D updated?! Send a message: Increment D in sender, increment C in receiver! Return a signal: Decrement C in sender, decrement D in receiver! When is a process disengaged?! A process is disengaged if C = D = 0! When is a process a leaf node of tree?! A process is a leaf node if C>0, D=0! When does a process send a signal?! If C=1, D=0, and the process is idle (becomes disengaged), or! If it receives a message and C>0! When is deadlock detected?! System deadlocked if C = D = 0 in the controller!

Example! D=1! D=0! Cntl! C=1! 1! D=0! Disengaged! Engaged, busy! Engaged, blocked! D=0! C=1! 2! 3! 4! D=0! C=1! C=1! D=0! D=3! D=2! D=0! Tree arc! Message (event)! Signal! 2, 3 controller 1 Controller 1, sends and becomes 4 added 2, and 43 message become signal to detects 4 sends disengaged, added tree, to idle! sends blocked! deadlock, to start 3, to 4; disengages, engagement 4 messages sends immediately begins signals to 3 tree! to still 3! recovery returns 1, to engaged! to 2, controller! 3! 4! a signal!!

Deadlock Recovery! Deadlock recovery: identify safe events (events that can be processed w/o violating local causality),! deadlock state!! Assume minimum delay! between airports is 3! ORD! 7! (waiting! on SFO)! Which events are safe?! Time stamp 7: smallest time stamped event in system! Time stamp 8, 9: safe because of lookahead constraint! Time stamp 10: OK if events with the same time stamp can be processed in any order! No time creep!! 10! SFO! (waiting! on JFK)! JFK! (waiting! 9!8! on ORD)!

Summary! Deadlock Detection! Diffusing computation: Dijkstra/Scholten algorithm! Simple signaling protocol detects deadlock! Does not detect partial (local) deadlocks! Deadlock Recovery! Smallest time stamp event safe to process! Others may also be safe (requires additional work to determine this)!