Clock Snooping and its Application in On-the-fly Data Race Detection Koen De Bosschere and Michiel Ronsse University of Ghent, Belgium Taipei, TaiwanDec.

Slides:



Advertisements
Similar presentations
Chapter 6 Concurrency: Deadlock and Starvation Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community.
Advertisements

Operating Systems Part III: Process Management (Process Synchronization)
Optimistic Methods for Concurrency Control By : H.T. Kung & John T. Robinson Presenters: Munawer Saeed.
Last Class: Clock Synchronization
COMP 655: Distributed/Operating Systems Summer 2011 Dr. Chunbo Chu Week 7: Consistency 4/13/20151Distributed Systems - COMP 655.
Chapter 6 Concurrency: Deadlock and Starvation Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community.
Concurrency: Deadlock and Starvation Chapter 6. Deadlock Permanent blocking of a set of processes that either compete for system resources or communicate.
Virtual Time “Virtual Time and Global States of Distributed Systems” Friedmann Mattern, 1989 The Model: An asynchronous distributed system = a set of processes.
SES Algorithm SES: Schiper-Eggli-Sandoz Algorithm. No need for broadcast messages. Each process maintains a vector V_P of size N - 1, N the number of processes.
Chapter 6 Process Synchronization Bernard Chen Spring 2007.
Time and Global States Part 3 ECEN5053 Software Engineering of Distributed Systems University of Colorado, Boulder.
Synchronization Chapter clock synchronization * 5.2 logical clocks * 5.3 global state * 5.4 election algorithm * 5.5 mutual exclusion * 5.6 distributed.
An efficient data race detector for DIOTA Michiel Ronsse, Bastiaan Stougie, Jonas Maebe, Frank Cornelis, Koen De Bosschere Department of Electronics and.
Distributed Systems Spring 2009
Ordering and Consistent Cuts Presented By Biswanath Panda.
CMPT 431 Dr. Alexandra Fedorova Lecture VIII: Time And Global Clocks.
Distributed Systems Fall 2009 Logical time, global states, and debugging.
CPSC 668Set 12: Causality1 CPSC 668 Distributed Algorithms and Systems Fall 2009 Prof. Jennifer Welch.
CPSC 4650 Operating Systems Chapter 6 Deadlock and Starvation
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved Chapter 7 Consistency.
Ordering of events in Distributed Systems & Eventual Consistency Jinyang Li.
1 Concurrency: Deadlock and Starvation Chapter 6.
Computer Science Lecture 10, page 1 CS677: Distributed OS Last Class: Clock Synchronization Physical clocks Clock synchronization algorithms –Cristian’s.
Time, Clocks, and the Ordering of Events in a Distributed System Leslie Lamport (1978) Presented by: Yoav Kantor.
Distributed Systems Foundations Lecture 1. Main Characteristics of Distributed Systems Independent processors, sites, processes Message passing No shared.
Chapter 5.
Deterministic Replay of Java Multithreaded Applications Jong-Deok Choi and Harini Srinivasan slides made by Qing Zhang.
Lazy Release Consistency for Software Distributed Shared Memory Pete Keleher Alan L. Cox Willy Z.
AADEBUG MUNCHEN Non-intrusive on-the-fly data race detection using execution replay Michiel Ronsse - Koen De Bosschere Ghent University - Belgium.
Logical Clocks n event ordering, happened-before relation (review) n logical clocks conditions n scalar clocks condition implementation limitation n vector.
1 Causal Delivery Advanced Networks PhD. Saúl Pomares Hernández.
SafetyNet Improving the Availability of Shared Memory Multiprocessors with Global Checkpoint/Recovery Daniel J. Sorin, Milo M. K. Martin, Mark D. Hill,
Page 1 Logical Clocks Paul Krzyzanowski Distributed Systems Except as otherwise noted, the content of this presentation is.
1 M. Tudruj, J. Borkowski, D. Kopanski Inter-Application Control Through Global States Monitoring On a Grid Polish-Japanese Institute of Information Technology,
Synchronization. Why we need synchronization? It is important that multiple processes do not access shared resources simultaneously. Synchronization in.
1 Efficient Dependency Tracking for Relevant Events in Shared Memory Systems Anurag Agarwal Vijay K. Garg
“Virtual Time and Global States of Distributed Systems”
Distributed Systems Fall 2010 Logical time, global states, and debugging.
Event Ordering Greg Bilodeau CS 5204 November 3, 2009.
Memory Consistency Models 1. Uniform Consistency Models Only have read and write operations Sequential Consistency Pipelined-RAM Causal Consistency Coherence.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
CIS825 Lecture 2. Model Processors Communication medium.
9/14/20051 Time, Clocks, and the Ordering of Events in a Distributed System by L. Lamport CS 5204 Operating Systems Vladimir Glina Fall 2005.
D u k e S y s t e m s Asynchronous Replicated State Machines (Causal Multicast and All That) Jeff Chase Duke University.
Lazy Release Consistency for Software Distributed Shared Memory Pete Keleher Alan L. Cox Willy Z. By Nooruddin Shaik.
Lamport's Scalar clocks and Singhal-Kshemkalyani’s VC Algorithms
Chapter 6 Concurrency: Deadlock and Starvation Operating Systems: Internals and Design Principles, 6/E William Stallings.
Logical Clocks. Topics r Logical clocks r Totally-Ordered Multicasting.
Event Ordering. CS 5204 – Operating Systems2 Time and Ordering The two critical differences between centralized and distributed systems are: absence of.
Execution Replay and Debugging. Contents Introduction Parallel program: set of co-operating processes Co-operation using –shared variables –message passing.
IMPLEMENTATION OF LAMPORT’S SCALAR CLOCKS Surekha Busa.
Logical Clocks event ordering, happened-before relation (review) logical clocks conditions scalar clocks  condition  implementation  limitation vector.
Distributed Systems Lecture 6 Global states and snapshots 1.
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS

Greetings. Those of you who don't yet know me... Today is... and
The University of Adelaide, School of Computer Science
Parallel and Distributed Simulation Techniques
Effective Data-Race Detection for the Kernel
CSC 8320 Advanced Operating System
Chapter 7 Deadlock.
Time And Global Clocks CMPT 431.
Event Ordering.
CS 425 / ECE 428  2013, I. Gupta, K. Nahrtstedt, S. Mitra, N. Vaidya, M. T. Harandi, J. Hou.
Concurrency: Mutual Exclusion and Process Synchronization
Basics of Distributed Systems
The University of Adelaide, School of Computer Science
Outline Theoretical Foundations - continued
by Manas Hardas for Advanced Operating Systems Nov 27th 2007
Outline Theoretical Foundations
Presentation transcript:

Clock Snooping and its Application in On-the-fly Data Race Detection Koen De Bosschere and Michiel Ronsse University of Ghent, Belgium Taipei, TaiwanDec. 19, 1997

Contents n Clocks – Logical clocks – Examples – Disadvantages – Snooping clocks n An Application – On-the-fly data race detection – Snooped vs. Logical clocks n Conclusions

Tracking Causality n What? Capturing the causality relation between events on different processors. n Why? n Distributed algorithms design n Tracking of dependent events n Knowledge about the progress n Concurrency measure n... n How? Physical clocks vs. logical clocks.

n Each processor has its own logical clock. n The clock is advanced using a set of rules: – the monotonicity principle (clock consistency condition) is obeyed: – clocks from different processors are synchronized at synchronization operations Logical Clocks

An Example of an Execution

Example 1: Scalar Clocks – Timestamps are scalar values. – Better known as Lamport Clocks. – Clocks are incremented at each operation:

Example 2: Vector Clocks – A system with p processors has vector clocks of size p. – Vector clocks allow us to detect concurrent events.

Example 3: Matrix Clocks – A system with p processors has matrix clocks of size p  p. – Matrix clocks allow us to detect obsolete information: Process i knows that every other process k knows that the local time of l has progressed till t.

Disadvantages of Logical Clocks n Maintaining clocks introduces overhead (both in time and space). n Causality is a weak form of event ordering. n Events are ordered most of the time, even if they have no causal relationship. n Logical clocks cannot capture the ordering between these unrelated events.

Solution: Snooped Clocks n Snooped clocks are updated with clock infromation that is explicitely requested from the other processes.

An Application: On-the-fly Data Race Detection n Data race: two unsynchronized accesses to the same variable, and at least one of them modifies the variable. n Example: x=get_input() y=calculate1(x) z=get_input() wait_a_while() z=calculate2(y,z) task1task2

On-the-fly Data Race Detection n We collect all memory references per sequential block i between two successive synchronisation operations (a segment) in L(i) and S(i). n We check all concurrent segments i and j for data races. A data race is found if (or vice-versa)

Implementation n Concurrent segments are detected using vector clocks. n The amount of segments forces us to use on-the-fly data race detection: – as soon as a segment ends, its L(i) and S(i) are compared to all previous concurrent segments; – obsolete segments are removed as soon as possible.

Removing Obsolete Segments n A segment is obsolete if no new concurrent segments can appear. n Matrix clocks can be used to detect these segments:

Logical vs. Snooped Matrix Clocks Logical clocks:Snooped clocks:

Experimental Evaluation

Conclusions n Snooped clocks: – are not updated at synchronization operations; – are updated using explicit clock requests. n Timestamps based on snooped clocks instead of logical clocks are more precise. n Snooped clocks allow for a more efficient implementation of data race detection.