Active Testing for Concurrent Programs

Size: px
Start display at page:

Download "Active Testing for Concurrent Programs"

Transcription

1 Active Testing for Concurrent Programs Pallavi Joshi, Mayur Naik, Chang-Seo Park, Koushik Sen 12/30/2008 ROPAS Seminar ParLab, UC Berkeley Intel Research

2 Overview ParLab The Parallel Computing Laboratory Checking correctness of concurrent programs Active testing directed by Data races Atomicity violations Deadlocks Programmer directed active testing Breakpoints for parallel programs Conclusion

3 The Parallel Computing Laboratory Goal: Productively create efficient and correct software for multicore/manycore Application driven Revisit entire HW / SW stack Collaborative Research Center 9 Professors, 40 Grad students Funded by Intel and Microsoft

4 Correctness ParLab Research Overview Personal Health Image Retrieval Hearing, Music Dwarfs Speech Parallel Browser Composition & Coordination Language (C&CL) C&CL Compiler/Interpreter Static Verification Parallel Libraries Parallel Frameworks Type Systems Efficiency Sketching Languages Autotuners Legacy Communication & Schedulers Code Synch. Primitives Efficiency Language Compilers OS Libraries & Services Legacy OS Hypervisor Intel Multicore/GPGPU RAMP Manycore Directed Testing Dynamic Checking Debugging with Replay

5 Correctness ParLab Research Overview Personal Health Image Retrieval Hearing, Music Dwarfs Speech Parallel Browser Composition & Coordination Language (C&CL) C&CL Compiler/Interpreter Static Verification Parallel Libraries Parallel Frameworks Type Systems Efficiency Sketching Languages Autotuners Legacy Communication & Schedulers Code Synch. Primitives Efficiency Language Compilers OS Libraries & Services Legacy OS Hypervisor Intel Multicore/GPGPU RAMP Manycore Directed Testing Dynamic Checking Debugging with Replay

6 Checking Correctness of Concurrent Programs Multiple threads of execution with shared memory Want correctness for All executions All inputs need to be checked Interference among threads introduces non deterministic bugs All schedules need to be checked

7 Checking All Schedules Model checking Check all schedules systematically Does not scale to large programs Focus on potentially buggy schedules Schedules that may expose bugs Boundary case schedules What are those potentially buggy schedules?

8 Checking All Schedules Model checking Check all schedules systematically Does not scale to large programs Focus on potentially buggy schedules Schedules that may expose bugs Boundary case schedules What are those potentially buggy schedules? Schedules exhibiting data races, atomicity violations, deadlocks

9 Active Testing Check the potentially buggy schedules Practical and efficient Find many bugs quickly Create an actual execution showing a bug How?

10 Active Testing Check the potentially buggy schedules Practical and efficient Find many bugs quickly Create an actual execution showing a bug Actively control scheduler Explore schedules systematically or randomly

11 Active Testing Check the potentially buggy schedules Practical and efficient Find many bugs quickly Create an actual execution showing a bug Actively control scheduler Explore schedules systematically or randomly But, preempt threads at appropriate states so that buggy schedules get created Observe execution for any abnormal behavior (e.g. uncaught exceptions, assertion failures)

12 Race Directed X = 1; if(x == 0) ERROR; [Sen; PLDI 08]

13 Race Directed X = 1; In race if(x == 0) ERROR; [Sen; PLDI 08]

14 Race Directed X = 1; State to preempt State to preempt if(x == 0) ERROR; [Sen; PLDI 08]

15 Race Directed X = 1; if(x == 0) ERROR; [Sen; PLDI 08]

16 Race Directed X = 1; if(x == 0) ERROR; [Sen; PLDI 08]

17 Race Directed X = 1; if(x == 0) ERROR; [Sen; PLDI 08]

18 Race Directed X = 1; if(x == 0) ERROR; [Sen; PLDI 08]

19 Race Directed X = 1; if(x == 0) ERROR; [Sen; PLDI 08]

20 Race Directed X = 1; if(x == 0) ERROR; [Sen; PLDI 08]

21 lock(l1) lock(l2) unlock(l2) Deadlock Directed unlock(l1) lock(l2) lock(l1) unlock(l1) unlock(l2) [Joshi, Park, Sen, Naik; Under submission]

22 lock(l1) Deadlock Directed lock(l2) lock(l2) lock(l1) unlock(l2) unlock(l1) unlock(l1) unlock(l2) [Joshi, Park, Sen, Naik; Under submission]

23 lock(l1) Deadlock Directed lock(l2) lock(l2) lock(l1) unlock(l2) unlock(l1) unlock(l1) unlock(l2) [Joshi, Park, Sen, Naik; Under submission]

24 lock(l1) lock(l2) unlock(l2) Deadlock Directed unlock(l1) lock(l2) lock(l1) unlock(l1) unlock(l2) [Joshi, Park, Sen, Naik; Under submission]

25 lock(l1) lock(l2) unlock(l2) Deadlock Directed unlock(l1) lock(l2) lock(l1) unlock(l1) unlock(l2) [Joshi, Park, Sen, Naik; Under submission]

26 lock(l1) lock(l2) unlock(l2) Deadlock Directed unlock(l1) lock(l2) lock(l1) unlock(l1) unlock(l2) [Joshi, Park, Sen, Naik; Under submission]

27 lock(l1) lock(l2) unlock(l2) Deadlock Directed unlock(l1) lock(l2) lock(l1) unlock(l1) unlock(l2) [Joshi, Park, Sen, Naik; Under submission]

28 lock(l1) lock(l2) unlock(l2) Deadlock Directed unlock(l1) lock(l2) lock(l1) unlock(l1) unlock(l2) [Joshi, Park, Sen, Naik; Under submission]

29 lock(l1) lock(l2) unlock(l2) Deadlock Directed unlock(l1) lock(l2) lock(l1) unlock(l1) unlock(l2) [Joshi, Park, Sen, Naik; Under submission]

30 lock(l1) lock(l2) unlock(l2) Deadlock Directed unlock(l1) lock(l2) lock(l1) unlock(l1) unlock(l2) [Joshi, Park, Sen, Naik; Under submission]

31 lock(l1) Deadlock Directed lock(l2) lock(l2) unlock(l2) unlock(l1) lock(l1) unlock(l1) unlock(l2) [Joshi, Park, Sen, Naik; Under submission]

32 lock(l1) Deadlock Directed lock(l2) lock(l2) unlock(l2) unlock(l1) lock(l1) unlock(l1) unlock(l2) [Joshi, Park, Sen, Naik; Under submission]

33 lock(l1) Deadlock Directed lock(l2) lock(l2) unlock(l2) unlock(l1) lock(l1) unlock(l1) unlock(l2) [Joshi, Park, Sen, Naik; Under submission]

34 lock(l1) Deadlock Directed lock(l2) lock(l2) unlock(l2) unlock(l1) Deadlock! lock(l1) unlock(l1) unlock(l2) [Joshi, Park, Sen, Naik; Under submission]

35 atomic Atomicity Violation Directed t = x; x = t + 1; t = 0; [Park, Sen; FSE 08]

36 atomic Atomicity Violation Directed t = x; x = t + 1; t = 0; [Park, Sen; FSE 08]

37 Atomicity Violation Directed t = x; atomic Atomicity Violation! t = 0; x = t + 1; [Park, Sen; FSE 08]

38 atomic Atomicity Violation Directed t = x; x = t + 1; t = 0; [Park, Sen; FSE 08]

39 atomic Atomicity Violation Directed t = x; x = t + 1; t = 0; [Park, Sen; FSE 08]

40 atomic Atomicity Violation Directed t = x; x = t + 1; t = 0; [Park, Sen; FSE 08]

41 atomic Atomicity Violation Directed t = x; x = t + 1; t = 0; [Park, Sen; FSE 08]

42 atomic Atomicity Violation Directed t = x; x = t + 1; t = 0; [Park, Sen; FSE 08]

43 atomic Atomicity Violation Directed t = x; x = t + 1; t = 0; [Park, Sen; FSE 08]

44 atomic Atomicity Violation Directed t = x; x = t + 1; t = 0; [Park, Sen; FSE 08]

45 atomic Atomicity Violation Directed t = x; x = t + 1; t = 0; [Park, Sen; FSE 08]

46 atomic Atomicity Violation Directed t = x; x = t + 1; t = 0; [Park, Sen; FSE 08]

47 atomic Atomicity Violation Directed t = x; x = t + 1; t = 0; [Park, Sen; FSE 08]

48 Bugs Found Too implemented for Java Races, deadlocks, atomicity violations in Java Collections Framework Deadlocks found and reproduced in Jigsaw web server Java Swing GUI framework Java Database Connectivity (JDBC) Atomicity violations in Apache Commons Collections

49 Lessons Learned Controlling scheduler makes testing effective Focus on potentially buggy schedules Reproduce bugs with high probability Need the right preemption points Directed preemption uncovered many bugs Why not let the programmer choose the preemption points? Breakpoints for concurrent programs Language for describing schedules

50 Schedule Exploration Language Facility to specify thread schedules User specifies breakpoints Preempt a thread at a user specified state User specifies ordering constraints on events Control schedule to meet constraints Testing for logical (semantic) bugs Schedules are given as input to program Either generated automatically (directed) or programmer specified Inputs to unit tests but on schedules

51 Example Usage foo(l) { 1: lock(l) 2: f() 3: unlock(l) 4:... 5: lock(l) 6: g() 7: unlock(l) } foo(l1) foo(l2) foo(l3) T1 T2 T3 T4 foo(l2) foo(l1) foo(l1)

52 Example Usage foo(l) { 1: lock(l) 2: f() 3: unlock(l) 4:... 5: lock(l) 6: g() 7: unlock(l) } foo(l1) foo(l2) foo(l3) T1 T2 T3 T4 foo(l2) foo(l1) foo(l1) break 5

53 Example Usage foo(l) { 1: lock(l) 2: f() 3: unlock(l) 4:... 5: lock(l) 6: g() 7: unlock(l) } foo(l1) foo(l2) foo(l3) T1 T2 T3 T4 foo(l2) foo(l1) foo(l1) break lock(l2)

54 Example Usage foo(l) { 1: lock(l) 2: f() 3: unlock(l) 4:... 5: lock(l) 6: g() 7: unlock(l) } foo(l1) foo(l2) foo(l3) T1 T2 T3 T4 foo(l2) foo(l1) foo(l1) break lock(l2),5

55 Example Usage foo(l) { 1: lock(l) 2: f() 3: unlock(l) 4:... 5: lock(l) 6: g() 7: unlock(l) } foo(l1) foo(l2) foo(l3) T1 T2 T3 T4 foo(l2) foo(l1) foo(l1) break lock(l2), 5, T1

56 Abstraction: Naming Runtime Objects Threads and locks are runtime objects Address changes across runs Need to identify consistently with only static information An abstraction based on object creation site Line number (PC) of where object allocated

57 Abstraction Example main { 1: Lock L1 = new Lock(); 2: Lock L2 = new Lock(); 3: Thread T1 = new MyThread(L1); 4: Thread T2 = new MyThread(L2); 5:... } MyThread(L) { 6: foo(l); } main T1 T2 foo(l1) foo(l2)

58 Abstraction Example main { 1: Lock L1 = new Lock(); 2: Lock L2 = new Lock(); 3: Thread T1 = new MyThread(L1); 4: Thread T2 = new MyThread(L2); 5:... } MyThread(L) { 6: foo(l); } main [3] [4] foo([1]) foo([2])

59 Abstraction: Naming Runtime Objects Threads and locks are runtime objects Address changes across runs Need to identify consistently with only static information An abstraction based on object creation site Line number (PC) of where object allocated Use and combine richer abstractions for increased separation Objects created in loops Objects created in different contexts

60 Another Example Usage T1 T2 T3 T4 wait(o) notify(o) before (notify(abs(o)),abs(t3)-> notify(abs(o)), abs(t1))

61 Conclusion Practical and efficient testing of concurrent programs Find and reproduce bugs to lessen burden of manual inspection Input language for user specified schedules

Active Testing for Concurrent Programs

Active Testing for Concurrent Programs Active Testing for Concurrent Programs Pallavi Joshi Mayur Naik Chang-Seo Park Koushik Sen 1/8/2009 ParLab Retreat ParLab, UC Berkeley Intel Research Overview Checking correctness of concurrent programs

More information

Integrating the Par Lab Stack Running Damascene on SEJITS/ROS/RAMP Gold

Integrating the Par Lab Stack Running Damascene on SEJITS/ROS/RAMP Gold Integrating the Par Lab Stack Running on /ROS/RAMP Gold Kevin Klues, Yunsup Lee, Andrew Waterman Par Lab Winter Retreat 2010 Overall Goal of the Par Lab: Create Productive, Efficient, Correct, Portable

More information

CalFuzzer: An Extensible Active Testing Framework for Concurrent Programs Pallavi Joshi 1, Mayur Naik 2, Chang-Seo Park 1, and Koushik Sen 1

CalFuzzer: An Extensible Active Testing Framework for Concurrent Programs Pallavi Joshi 1, Mayur Naik 2, Chang-Seo Park 1, and Koushik Sen 1 CalFuzzer: An Extensible Active Testing Framework for Concurrent Programs Pallavi Joshi 1, Mayur Naik 2, Chang-Seo Park 1, and Koushik Sen 1 1 University of California, Berkeley, USA {pallavi,parkcs,ksen}@eecs.berkeley.edu

More information

Hardware Acceleration for Tagging

Hardware Acceleration for Tagging Parallel Hardware Parallel Applications IT industry (Silicon Valley) Parallel Software Users Hardware Acceleration for Tagging Sarah Bird, David McGrogan, John Kubiatowicz, Krste Asanovic June 5, 2008

More information

Parallel Webpage Layout

Parallel Webpage Layout Parallel Webpage Layout Leo Meyerovich, Chan Siu Man, Chan Siu On, Heidi Pan Krste Asanovic, Rastislav Bodik and many others from the UPCRC Berkeley project UC Berkeley Par Lab Research Overview Diagnosing

More information

Making Performance Understandable: Towards a Standard for Performance Counters on Manycore Architectures

Making Performance Understandable: Towards a Standard for Performance Counters on Manycore Architectures Parallel Hardware Parallel Applications IT industry (Silicon Valley) Parallel Software Users Making Performance Understandable: Towards a Standard for Performance Counters on Manycore Architectures Sarah

More information

Code Generators for Stencil Auto-tuning

Code Generators for Stencil Auto-tuning Code Generators for Stencil Auto-tuning Shoaib Kamil with Cy Chan, Sam Williams, Kaushik Datta, John Shalf, Katherine Yelick, Jim Demmel, Leonid Oliker Diagnosing Power/Performance Correctness Where this

More information

Code Generators for Stencil Auto-tuning

Code Generators for Stencil Auto-tuning Code Generators for Stencil Auto-tuning Shoaib Kamil with Cy Chan, John Shalf, Sam Williams, Kaushik Datta, Katherine Yelick, Jim Demmel, Leonid Oliker Diagnosing Power/Performance Correctness Where this

More information

SEJITS: High Performance for Productivity Applications

SEJITS: High Performance for Productivity Applications SEJITS: High Performance for Productivity Applications Shoaib Kamil & many others Parlab End of Project Celebration May 30, 2013 Correctness Where Did We Start? Personal Health Image Retrieval Hearing,

More information

Contour Detection on Mobile Platforms

Contour Detection on Mobile Platforms Contour Detection on Mobile Platforms Bor-Yiing Su, subrian@eecs.berkeley.edu Prof. Kurt Keutzer, keutzer@eecs.berkeley.edu Parallel Computing Lab, University of California, Berkeley 1/26 Diagnosing Power/Performance

More information

Third party names are the property of their owners.

Third party names are the property of their owners. Disclaimer READ THIS its very important The views expressed in this talk are those of the speaker and not his employer. This is an academic style talk and does not address details of any particular Intel

More information

End of Parlab talk. May 29, 2013 Gans Srinivasa Intel Corp

End of Parlab talk. May 29, 2013 Gans Srinivasa Intel Corp End of Parlab talk May 29, 2013 Gans Srinivasa Intel Corp 1 A Journey: Year 2005; 2008; 2011; Potential Parallel Speedup 1000 100 MIMD*SIMD (32 b) MIMD*SIMD (64 b) SIMD (32b) SIMD (64b) MIMD 10 To Multicore

More information

Efficient Data Race Detection for Unified Parallel C

Efficient Data Race Detection for Unified Parallel C P A R A L L E L C O M P U T I N G L A B O R A T O R Y Efficient Data Race Detection for Unified Parallel C ParLab Winter Retreat 1/14/2011" Costin Iancu, LBL" Nick Jalbert, UC Berkeley" Chang-Seo Park,

More information

BERKELEY PAR LAB. UPC-THRILLE Demo. Chang-Seo Park

BERKELEY PAR LAB. UPC-THRILLE Demo. Chang-Seo Park BERKELEY PAR LAB UPC-THRILLE Demo Chang-Seo Park 1 Correctness Group Highlights Active Testing for Java, C, and UPC Practical, easy-to-use tools for finding bugs, with sophisticated program analysis internally

More information

Randomized Active Atomicity Violation Detection in Concurrent Programs

Randomized Active Atomicity Violation Detection in Concurrent Programs Randomized Active Atomicity Violation Detection in Concurrent Programs Chang-Seo Park EECS Department, UC Berkeley, CA, USA. parkcs@cs.berkeley.edu Koushik Sen EECS Department, UC Berkeley, CA, USA. ksen@cs.berkeley.edu

More information

Chimera: Hybrid Program Analysis for Determinism

Chimera: Hybrid Program Analysis for Determinism Chimera: Hybrid Program Analysis for Determinism Dongyoon Lee, Peter Chen, Jason Flinn, Satish Narayanasamy University of Michigan, Ann Arbor - 1 - * Chimera image from http://superpunch.blogspot.com/2009/02/chimera-sketch.html

More information

Semantic Atomicity for Multithreaded Programs!

Semantic Atomicity for Multithreaded Programs! P A R A L L E L C O M P U T I N G L A B O R A T O R Y Semantic Atomicity for Multithreaded Programs! Jacob Burnim, George Necula, Koushik Sen! Parallel Computing Laboratory! University of California, Berkeley!

More information

A Retrospective on Par Lab Architecture Research

A Retrospective on Par Lab Architecture Research A Retrospective on Par Lab Architecture Research Par Lab SIGARCH Krste Asanovic, Rimas Avizienis, Jonathan Bachrach, Scott Beamer, Sarah Bird, Alex Bishara, Chris Celio, Henry Cook, Ben Keller, Yunsup

More information

Memory Consistency Models: Convergence At Last!

Memory Consistency Models: Convergence At Last! Memory Consistency Models: Convergence At Last! Sarita Adve Department of Computer Science University of Illinois at Urbana-Champaign sadve@cs.uiuc.edu Acks: Co-authors: Mark Hill, Kourosh Gharachorloo,

More information

CHESS: Analysis and Testing of Concurrent Programs

CHESS: Analysis and Testing of Concurrent Programs CHESS: Analysis and Testing of Concurrent Programs Sebastian Burckhardt, Madan Musuvathi, Shaz Qadeer Microsoft Research Joint work with Tom Ball, Peli de Halleux, and interns Gerard Basler (ETH Zurich),

More information

Tessellation: Space-Time Partitioning in a Manycore Client OS

Tessellation: Space-Time Partitioning in a Manycore Client OS Tessellation: Space-Time ing in a Manycore Client OS Rose Liu 1,2, Kevin Klues 1, Sarah Bird 1, Steven Hofmeyr 3, Krste Asanovic 1, John Kubiatowicz 1 1 Parallel Computing Laboratory, UC Berkeley 2 Data

More information

TERN: Stable Deterministic Multithreading through Schedule Memoization

TERN: Stable Deterministic Multithreading through Schedule Memoization TERN: Stable Deterministic Multithreading through Schedule Memoization Heming Cui, Jingyue Wu, Chia-che Tsai, Junfeng Yang Columbia University Appeared in OSDI 10 Nondeterministic Execution One input many

More information

Computation Abstractions. Processes vs. Threads. So, What Is a Thread? CMSC 433 Programming Language Technologies and Paradigms Spring 2007

Computation Abstractions. Processes vs. Threads. So, What Is a Thread? CMSC 433 Programming Language Technologies and Paradigms Spring 2007 CMSC 433 Programming Language Technologies and Paradigms Spring 2007 Threads and Synchronization May 8, 2007 Computation Abstractions t1 t1 t4 t2 t1 t2 t5 t3 p1 p2 p3 p4 CPU 1 CPU 2 A computer Processes

More information

Static and Dynamic Program Analysis: Synergies and Applications

Static and Dynamic Program Analysis: Synergies and Applications Static and Dynamic Program Analysis: Synergies and Applications Mayur Naik Intel Labs, Berkeley CS 243, Stanford University March 9, 2011 Today s Computing Platforms Trends: parallel cloud mobile Traits:

More information

2 Introduction to Java. Introduction to Programming 1 1

2 Introduction to Java. Introduction to Programming 1 1 2 Introduction to Java Introduction to Programming 1 1 Objectives At the end of the lesson, the student should be able to: Describe the features of Java technology such as the Java virtual machine, garbage

More information

Typed Assembly Language for Implementing OS Kernels in SMP/Multi-Core Environments with Interrupts

Typed Assembly Language for Implementing OS Kernels in SMP/Multi-Core Environments with Interrupts Typed Assembly Language for Implementing OS Kernels in SMP/Multi-Core Environments with Interrupts Toshiyuki Maeda and Akinori Yonezawa University of Tokyo Quiz [Environment] CPU: Intel Xeon X5570 (2.93GHz)

More information

DART: Directed Automated Random Testing. CUTE: Concolic Unit Testing Engine. Slide Source: Koushik Sen from Berkeley

DART: Directed Automated Random Testing. CUTE: Concolic Unit Testing Engine. Slide Source: Koushik Sen from Berkeley DAR: Directed Automated Random esting CUE: Concolic Unit esting Engine Slide Source: Koushik Sen from Berkeley Verification and esting We would like to prove programs correct Verification and esting We

More information

Parallelism Marco Serafini

Parallelism Marco Serafini Parallelism Marco Serafini COMPSCI 590S Lecture 3 Announcements Reviews First paper posted on website Review due by this Wednesday 11 PM (hard deadline) Data Science Career Mixer (save the date!) November

More information

Do you have to reproduce the bug on the first replay attempt?

Do you have to reproduce the bug on the first replay attempt? Do you have to reproduce the bug on the first replay attempt? PRES: Probabilistic Replay with Execution Sketching on Multiprocessors Soyeon Park, Yuanyuan Zhou University of California, San Diego Weiwei

More information

Testing. ECE/CS 5780/6780: Embedded System Design. Why is testing so hard? Why do testing?

Testing. ECE/CS 5780/6780: Embedded System Design. Why is testing so hard? Why do testing? Testing ECE/CS 5780/6780: Embedded System Design Scott R. Little Lecture 24: Introduction to Software Testing and Verification What is software testing? Running a program in order to find bugs (faults,

More information

Deterministic Replay and Data Race Detection for Multithreaded Programs

Deterministic Replay and Data Race Detection for Multithreaded Programs Deterministic Replay and Data Race Detection for Multithreaded Programs Dongyoon Lee Computer Science Department - 1 - The Shift to Multicore Systems 100+ cores Desktop/Server 8+ cores Smartphones 2+ cores

More information

1. Introduction to Concurrent Programming

1. Introduction to Concurrent Programming 1. Introduction to Concurrent Programming A concurrent program contains two or more threads that execute concurrently and work together to perform some task. When a program is executed, the operating system

More information

Transaction Memory for Existing Programs Michael M. Swift Haris Volos, Andres Tack, Shan Lu, Adam Welc * University of Wisconsin-Madison, *Intel

Transaction Memory for Existing Programs Michael M. Swift Haris Volos, Andres Tack, Shan Lu, Adam Welc * University of Wisconsin-Madison, *Intel Transaction Memory for Existing Programs Michael M. Swift Haris Volos, Andres Tack, Shan Lu, Adam Welc * University of Wisconsin-Madison, *Intel Where do TM programs ome from?! Parallel benchmarks replacing

More information

Main concepts to be covered. Testing and Debugging. Code snippet of the day. Results. Testing Debugging Test automation Writing for maintainability

Main concepts to be covered. Testing and Debugging. Code snippet of the day. Results. Testing Debugging Test automation Writing for maintainability Main concepts to be covered Testing and Debugging Testing Debugging Test automation Writing for maintainability 4.0 Code snippet of the day public void test() { int sum = 1; for (int i = 0; i

More information

Concurrent systems Lecture 1: Introduction to concurrency, threads, and mutual exclusion

Concurrent systems Lecture 1: Introduction to concurrency, threads, and mutual exclusion Concurrent systems Lecture 1: Introduction to concurrency, threads, and mutual exclusion Michaelmas 2017 Dr Robert N. M. Watson (With thanks to Dr Steven Hand) 1 Concurrent and distributed systems One

More information

Advanced Memory Management

Advanced Memory Management Advanced Memory Management Main Points Applications of memory management What can we do with ability to trap on memory references to individual pages? File systems and persistent storage Goals Abstractions

More information

An Effective Dynamic Analysis for Detecting Generalized Deadlocks

An Effective Dynamic Analysis for Detecting Generalized Deadlocks An Effective Dynamic Analysis for Detecting Generalized Deadlocks Pallavi Joshi EECS, UC Berkeley, CA, USA pallavi@cs.berkeley.edu Mayur Naik Intel Labs Berkeley, CA, USA mayur.naik@intel.com David Gay

More information

Debugging Applications in Pervasive Computing

Debugging Applications in Pervasive Computing Debugging Applications in Pervasive Computing Larry May 1, 2006 SMA 5508; MIT 6.883 1 Outline Video of Speech Controlled Animation Survey of approaches to debugging Turning bugs into features Speech recognition

More information

Software Testing Strategies. Slides copyright 1996, 2001, 2005, 2009, 2014 by Roger S. Pressman. For non-profit educational use only

Software Testing Strategies. Slides copyright 1996, 2001, 2005, 2009, 2014 by Roger S. Pressman. For non-profit educational use only Chapter 22 Software Testing Strategies Slide Set to accompany Software Engineering: A Practitioner s Approach, 8/e by Roger S. Pressman and Bruce R. Maxim Slides copyright 1996, 2001, 2005, 2009, 2014

More information

Concurrency Analysis of Asynchronous APIs

Concurrency Analysis of Asynchronous APIs Concurrency Analysis of Asynchronous APIs Anirudh Santhiar and Aditya Kanade April 2, 2016 Computer Science and Automation, IISc Introduction Asynchronous Programming Model1 A way to organize programs

More information

Fully Automatic and Precise Detection of Thread Safety Violations

Fully Automatic and Precise Detection of Thread Safety Violations Fully Automatic and Precise Detection of Thread Safety Violations Michael Pradel and Thomas R. Gross Department of Computer Science ETH Zurich 1 Motivation Thread-safe classes: Building blocks for concurrent

More information

Dealing with Issues for Interprocess Communication

Dealing with Issues for Interprocess Communication Dealing with Issues for Interprocess Communication Ref Section 2.3 Tanenbaum 7.1 Overview Processes frequently need to communicate with other processes. In a shell pipe the o/p of one process is passed

More information

A Serializability Violation Detector for Shared-Memory Server Programs

A Serializability Violation Detector for Shared-Memory Server Programs A Serializability Violation Detector for Shared-Memory Server Programs Min Xu Rastislav Bodík Mark Hill University of Wisconsin Madison University of California, Berkeley Serializability Violation Detector:

More information

DMP Deterministic Shared Memory Multiprocessing

DMP Deterministic Shared Memory Multiprocessing DMP Deterministic Shared Memory Multiprocessing University of Washington Joe Devietti, Brandon Lucia, Luis Ceze, Mark Oskin A multithreaded voting machine 2 thread 0 thread 1 while (more_votes) { load

More information

Introduction to Automation. What is automation testing Advantages of Automation Testing How to learn any automation tool Types of Automation tools

Introduction to Automation. What is automation testing Advantages of Automation Testing How to learn any automation tool Types of Automation tools Introduction to Automation What is automation testing Advantages of Automation Testing How to learn any automation tool Types of Automation tools Introduction to Selenium What is Selenium Use of Selenium

More information

BERKELEY PAR LAB. RAMP Gold Wrap. Krste Asanovic. RAMP Wrap Stanford, CA August 25, 2010

BERKELEY PAR LAB. RAMP Gold Wrap. Krste Asanovic. RAMP Wrap Stanford, CA August 25, 2010 RAMP Gold Wrap Krste Asanovic RAMP Wrap Stanford, CA August 25, 2010 RAMP Gold Team Graduate Students Zhangxi Tan Andrew Waterman Rimas Avizienis Yunsup Lee Henry Cook Sarah Bird Faculty Krste Asanovic

More information

Concurrency, Mutual Exclusion and Synchronization C H A P T E R 5

Concurrency, Mutual Exclusion and Synchronization C H A P T E R 5 Concurrency, Mutual Exclusion and Synchronization C H A P T E R 5 Multiple Processes OS design is concerned with the management of processes and threads: Multiprogramming Multiprocessing Distributed processing

More information

Concurrent systems Lecture 1: Introduction to concurrency, threads, and mutual exclusion

Concurrent systems Lecture 1: Introduction to concurrency, threads, and mutual exclusion Concurrent systems Lecture 1: Introduction to concurrency, threads, and mutual exclusion Michaelmas 2016 Dr Robert N. M. Watson (With thanks to Dr Steven Hand) 1 Concurrent and distributed systems One

More information

Concurrency. Glossary

Concurrency. Glossary Glossary atomic Executing as a single unit or block of computation. An atomic section of code is said to have transactional semantics. No intermediate state for the code unit is visible outside of the

More information

Efficient, Deterministic, and Deadlock-free Concurrency

Efficient, Deterministic, and Deadlock-free Concurrency Efficient, Deterministic Concurrency p. 1/31 Efficient, Deterministic, and Deadlock-free Concurrency Nalini Vasudevan Columbia University Efficient, Deterministic Concurrency p. 2/31 Data Races int x;

More information

Static Analysis of Embedded C Code

Static Analysis of Embedded C Code Static Analysis of Embedded C Code John Regehr University of Utah Joint work with Nathan Cooprider Relevant features of C code for MCUs Interrupt-driven concurrency Direct hardware access Whole program

More information

Automatically Repairing Concurrency Bugs with ARC MUSEPAT 2013 Saint Petersburg, Russia

Automatically Repairing Concurrency Bugs with ARC MUSEPAT 2013 Saint Petersburg, Russia Automatically Repairing Concurrency Bugs with ARC MUSEPAT 2013 Saint Petersburg, Russia David Kelk, Kevin Jalbert, Jeremy S. Bradbury Faculty of Science (Computer Science) University of Ontario Institute

More information

Operating Systems: William Stallings. Starvation. Patricia Roy Manatee Community College, Venice, FL 2008, Prentice Hall

Operating Systems: William Stallings. Starvation. Patricia Roy Manatee Community College, Venice, FL 2008, Prentice Hall Operating Systems: Internals and Design Principles, 6/E William Stallings Chapter 6 Concurrency: Deadlock and Starvation Patricia Roy Manatee Community College, Venice, FL 2008, Prentice Hall Deadlock

More information

This guide will show you how to use Intel Inspector XE to identify and fix resource leak errors in your programs before they start causing problems.

This guide will show you how to use Intel Inspector XE to identify and fix resource leak errors in your programs before they start causing problems. Introduction A resource leak refers to a type of resource consumption in which the program cannot release resources it has acquired. Typically the result of a bug, common resource issues, such as memory

More information

Core Java - SCJP. Q2Technologies, Rajajinagar. Course content

Core Java - SCJP. Q2Technologies, Rajajinagar. Course content Core Java - SCJP Course content NOTE: For exam objectives refer to the SCJP 1.6 objectives. 1. Declarations and Access Control Java Refresher Identifiers & JavaBeans Legal Identifiers. Sun's Java Code

More information

11/19/2013. Imperative programs

11/19/2013. Imperative programs if (flag) 1 2 From my perspective, parallelism is the biggest challenge since high level programming languages. It s the biggest thing in 50 years because industry is betting its future that parallel programming

More information

Deterministic Parallel Programming

Deterministic Parallel Programming Deterministic Parallel Programming Concepts and Practices 04/2011 1 How hard is parallel programming What s the result of this program? What is data race? Should data races be allowed? Initially x = 0

More information

CS153: Deadlock. Chengyu Song. Slides modified from Harsha Madhyvasta, Nael Abu-Ghazaleh, and Zhiyun Qian

CS153: Deadlock. Chengyu Song. Slides modified from Harsha Madhyvasta, Nael Abu-Ghazaleh, and Zhiyun Qian 1 CS153: Deadlock Chengyu Song Slides modified from Harsha Madhyvasta, Nael Abu-Ghazaleh, and Zhiyun Qian 2 Administrivia Lab Lab1 is due this Sunday Demo sessions next week Little book of semaphores First

More information

Diagnosing Production-Run Concurrency-Bug Failures. Shan Lu University of Wisconsin, Madison

Diagnosing Production-Run Concurrency-Bug Failures. Shan Lu University of Wisconsin, Madison Diagnosing Production-Run Concurrency-Bug Failures Shan Lu University of Wisconsin, Madison 1 Outline Myself and my group Production-run failure diagnosis What is this problem What are our solutions CCI

More information

A Parameterized Type System for Race-Free Java Programs

A Parameterized Type System for Race-Free Java Programs A Parameterized Type System for Race-Free Java Programs Chandrasekhar Boyapati Martin Rinard Laboratory for Computer Science Massachusetts Institute of Technology {chandra, rinard@lcs.mit.edu Data races

More information

Dynamically Detecting and Tolerating IF-Condition Data Races

Dynamically Detecting and Tolerating IF-Condition Data Races Dynamically Detecting and Tolerating IF-Condition Data Races Shanxiang Qi (Google), Abdullah Muzahid (University of San Antonio), Wonsun Ahn, Josep Torrellas University of Illinois at Urbana-Champaign

More information

Race Directed Random Testing of Concurrent Programs

Race Directed Random Testing of Concurrent Programs Race Directed Random Testing of Concurrent Programs Koushik Sen EECS Department, UC Berkeley, CA, USA. ksen@cs.berkeley.edu Abstract Bugs in multi-threaded programs often arise due to data races. Numerous

More information

Enforcing Textual Alignment of

Enforcing Textual Alignment of Parallel Hardware Parallel Applications IT industry (Silicon Valley) Parallel Software Users Enforcing Textual Alignment of Collectives using Dynamic Checks and Katherine Yelick UC Berkeley Parallel Computing

More information

Eliminate Threading Errors to Improve Program Stability

Eliminate Threading Errors to Improve Program Stability Eliminate Threading Errors to Improve Program Stability This guide will illustrate how the thread checking capabilities in Parallel Studio can be used to find crucial threading defects early in the development

More information

UPCRC. Illiac. Gigascale System Research Center. Petascale computing. Cloud Computing Testbed (CCT) 2

UPCRC. Illiac. Gigascale System Research Center. Petascale computing. Cloud Computing Testbed (CCT) 2 Illiac UPCRC Petascale computing Gigascale System Research Center Cloud Computing Testbed (CCT) 2 www.parallel.illinois.edu Mul2 Core: All Computers Are Now Parallel We con'nue to have more transistors

More information

Lightweight Fault Detection in Parallelized Programs

Lightweight Fault Detection in Parallelized Programs Lightweight Fault Detection in Parallelized Programs Li Tan UC Riverside Min Feng NEC Labs Rajiv Gupta UC Riverside CGO 13, Shenzhen, China Feb. 25, 2013 Program Parallelization Parallelism can be achieved

More information

NDSeq: Runtime Checking for Nondeterministic Sequential Specs of Parallel Correctness

NDSeq: Runtime Checking for Nondeterministic Sequential Specs of Parallel Correctness EECS Electrical Engineering and Computer Sciences P A R A L L E L C O M P U T I N G L A B O R A T O R Y NDSeq: Runtime Checking for Nondeterministic Sequential Specs of Parallel Correctness Jacob Burnim,

More information

Java Memory Model. Jian Cao. Department of Electrical and Computer Engineering Rice University. Sep 22, 2016

Java Memory Model. Jian Cao. Department of Electrical and Computer Engineering Rice University. Sep 22, 2016 Java Memory Model Jian Cao Department of Electrical and Computer Engineering Rice University Sep 22, 2016 Content Introduction Java synchronization mechanism Double-checked locking Out-of-Thin-Air violation

More information

Productive Design of Extensible Cache Coherence Protocols!

Productive Design of Extensible Cache Coherence Protocols! P A R A L L E L C O M P U T I N G L A B O R A T O R Y Productive Design of Extensible Cache Coherence Protocols!! Henry Cook, Jonathan Bachrach,! Krste Asanovic! Par Lab Summer Retreat, Santa Cruz June

More information

Operating Systems (2INC0) 2018/19. Introduction (01) Dr. Tanir Ozcelebi. Courtesy of Prof. Dr. Johan Lukkien. System Architecture and Networking Group

Operating Systems (2INC0) 2018/19. Introduction (01) Dr. Tanir Ozcelebi. Courtesy of Prof. Dr. Johan Lukkien. System Architecture and Networking Group Operating Systems (2INC0) 20/19 Introduction (01) Dr. Courtesy of Prof. Dr. Johan Lukkien System Architecture and Networking Group Course Overview Introduction to operating systems Processes, threads and

More information

Symbolic Execution, Dynamic Analysis

Symbolic Execution, Dynamic Analysis Symbolic Execution, Dynamic Analysis http://d3s.mff.cuni.cz Pavel Parízek CHARLES UNIVERSITY IN PRAGUE faculty of mathematics and physics Symbolic execution Pavel Parízek Symbolic Execution, Dynamic Analysis

More information

Regression testing. Whenever you find a bug. Why is this a good idea?

Regression testing. Whenever you find a bug. Why is this a good idea? Regression testing Whenever you find a bug Reproduce it (before you fix it!) Store input that elicited that bug Store correct output Put into test suite Then, fix it and verify the fix Why is this a good

More information

Automatically Classifying Benign and Harmful Data Races Using Replay Analysis

Automatically Classifying Benign and Harmful Data Races Using Replay Analysis Automatically Classifying Benign and Harmful Data Races Using Replay Analysis Satish Narayanasamy, Zhenghao Wang, Jordan Tigani, Andrew Edwards, Brad Calder Microsoft University of California, San Diego

More information

A Trace Simplification Technique for Effective Debugging of Concurrent Programs

A Trace Simplification Technique for Effective Debugging of Concurrent Programs A Trace Simplification Technique for Effective Debugging of Concurrent Programs Nicholas Jalbert EECS Department, UC Berkeley, CA, USA jalbert@cs.berkeley.edu Koushik Sen EECS Department, UC Berkeley,

More information

Kernel Synchronization I. Changwoo Min

Kernel Synchronization I. Changwoo Min 1 Kernel Synchronization I Changwoo Min 2 Summary of last lectures Tools: building, exploring, and debugging Linux kernel Core kernel infrastructure syscall, module, kernel data structures Process management

More information

IT 540 Operating Systems ECE519 Advanced Operating Systems

IT 540 Operating Systems ECE519 Advanced Operating Systems IT 540 Operating Systems ECE519 Advanced Operating Systems Prof. Dr. Hasan Hüseyin BALIK (5 th Week) (Advanced) Operating Systems 5. Concurrency: Mutual Exclusion and Synchronization 5. Outline Principles

More information

Unit Testing in Java with an Emphasis on Concurrency Corky Cartwright Rice and Halmstad Universities Summer 2013

Unit Testing in Java with an Emphasis on Concurrency Corky Cartwright Rice and Halmstad Universities Summer 2013 Unit Testing in Java with an Emphasis on Concurrency Corky Cartwright Rice and Halmstad Universities Summer 2013 Software Engineering Culture Three Guiding Visions Data-driven design Test-driven development

More information

CS 571 Operating Systems. Midterm Review. Angelos Stavrou, George Mason University

CS 571 Operating Systems. Midterm Review. Angelos Stavrou, George Mason University CS 571 Operating Systems Midterm Review Angelos Stavrou, George Mason University Class Midterm: Grading 2 Grading Midterm: 25% Theory Part 60% (1h 30m) Programming Part 40% (1h) Theory Part (Closed Books):

More information

DDT: A visual, parallel debugger on Ra

DDT: A visual, parallel debugger on Ra DDT: A visual, parallel debugger on Ra David M. Larue dlarue@mines.edu High Performance & Research Computing Campus Computing, Communications, and Information Technologies Colorado School of Mines March,

More information

Deadlock Prevention. CSCI 3753 Operating Systems Spring 2005 Prof. Rick Han

Deadlock Prevention. CSCI 3753 Operating Systems Spring 2005 Prof. Rick Han Deadlock Prevention CSCI 3753 Operating Systems Spring 2005 Prof. Rick Han Announcements HW #3 is due Friday Feb. 25 extra office hours Thursday 1 pm - post this PA #2 assigned, due Thursday March 17 Midterm

More information

CS61CL : Machine Structures

CS61CL : Machine Structures inst.eecs.berkeley.edu/~cs61c CS61CL : Machine Structures Lecture #15 Parallelism 2009-8-12 www.xkcd.com/619 Paul Pearce, TA CS61CL L15 Parallelism(1) Background: Threads A Thread stands for thread of

More information

Introduction to Problem Solving and Programming in Python.

Introduction to Problem Solving and Programming in Python. Introduction to Problem Solving and Programming in Python http://cis-linux1.temple.edu/~tuf80213/courses/temple/cis1051/ Overview Types of errors Testing methods Debugging in Python 2 Errors An error in

More information

Program Synthesis for Forth Forth Day 2012

Program Synthesis for Forth Forth Day 2012 Program Synthesis for Forth Forth Day 2012 Computer Science UC Berkeley Ras Bodik Mangpo Phitchaya Phothilimthana Tikhon Jelvis Rohin Shah Synthesis with sketches Extend your language with two constructs

More information

Slides by Y. Nir-Buchbinder, adapted by O. Agmon Ben-Yehuda 1/30

Slides by Y. Nir-Buchbinder, adapted by O. Agmon Ben-Yehuda 1/30 Application of Synchronization Coverage Arkady Bron, Eitan Farchi, Yonit Magid, Yarden Nir-Buchbinder, Shmuel Ur PPoPP 2005 Presented in the spring 2011 Seminar on Advanced Topics in Concurrent Programming

More information

High Performance Computing on GPUs using NVIDIA CUDA

High Performance Computing on GPUs using NVIDIA CUDA High Performance Computing on GPUs using NVIDIA CUDA Slides include some material from GPGPU tutorial at SIGGRAPH2007: http://www.gpgpu.org/s2007 1 Outline Motivation Stream programming Simplified HW and

More information

Eliminate Threading Errors to Improve Program Stability

Eliminate Threading Errors to Improve Program Stability Introduction This guide will illustrate how the thread checking capabilities in Intel Parallel Studio XE can be used to find crucial threading defects early in the development cycle. It provides detailed

More information

Predictable Interrupt Management and Scheduling in the Composite Component-based System

Predictable Interrupt Management and Scheduling in the Composite Component-based System Predictable Interrupt Management and Scheduling in the Composite Component-based System Gabriel Parmer and Richard West Computer Science Department Boston University Boston, MA 02215 {gabep1, richwest}@cs.bu.edu

More information

System Architecture Directions for Networked Sensors[1]

System Architecture Directions for Networked Sensors[1] System Architecture Directions for Networked Sensors[1] Secure Sensor Networks Seminar presentation Eric Anderson System Architecture Directions for Networked Sensors[1] p. 1 Outline Sensor Network Characteristics

More information

Intel Parallel Studio 2011

Intel Parallel Studio 2011 THE ULTIMATE ALL-IN-ONE PERFORMANCE TOOLKIT Studio 2011 Product Brief Studio 2011 Accelerate Development of Reliable, High-Performance Serial and Threaded Applications for Multicore Studio 2011 is a comprehensive

More information

CSE 374 Programming Concepts & Tools

CSE 374 Programming Concepts & Tools CSE 374 Programming Concepts & Tools Hal Perkins Fall 2017 Lecture 22 Shared-Memory Concurrency 1 Administrivia HW7 due Thursday night, 11 pm (+ late days if you still have any & want to use them) Course

More information

Mock Objects and Distributed Testing

Mock Objects and Distributed Testing Mock Objects and Distributed Testing Making a Mockery of your Software Brian Gilstrap Once, said the Mock Turtle at last, with a deep sigh, I was a real Turtle. (Alice In Wonderland, Lewis Carroll) The

More information

Merge Sort Quicksort 9 Abstract Windowing Toolkit & Swing Abstract Windowing Toolkit (AWT) vs. Swing AWT GUI Components Layout Managers Swing GUI

Merge Sort Quicksort 9 Abstract Windowing Toolkit & Swing Abstract Windowing Toolkit (AWT) vs. Swing AWT GUI Components Layout Managers Swing GUI COURSE TITLE :Introduction to Programming 2 COURSE PREREQUISITE :Introduction to Programming 1 COURSE DURATION :16 weeks (3 hours/week) COURSE METHODOLOGY:Combination of lecture and laboratory exercises

More information

Program Synthesis for Forth Forth Day 2012

Program Synthesis for Forth Forth Day 2012 Program Synthesis for Forth Forth Day 2012 Computer Science UC Berkeley Ras Bodik Mangpo Phitchaya Phothilimthana Tikhon Jelvis Rohin Shah Synthesis with sketches Extend your language with two constructs

More information

A Classification of Concurrency Bugs in Java Benchmarks by Developer Intent

A Classification of Concurrency Bugs in Java Benchmarks by Developer Intent A Classification of Concurrency Bugs in Java Benchmarks by Developer Intent M. Erkan Keremoglu, Serdar Tasiran, Tayfun Elmas Center for Advanced Design Technologies @ Koc University http://designtech.ku.edu.tr

More information

Programming Models for Supercomputing in the Era of Multicore

Programming Models for Supercomputing in the Era of Multicore Programming Models for Supercomputing in the Era of Multicore Marc Snir MULTI-CORE CHALLENGES 1 Moore s Law Reinterpreted Number of cores per chip doubles every two years, while clock speed decreases Need

More information

Type Systems for Concurrent Programs

Type Systems for Concurrent Programs Type Systems for Concurrent Programs Naoki Kobayashi Tokyo Institute of Technology Type Systems for Programming Languages Guarantee partial correctness of programs fun fact (n) = if n=0 then 1 else n fact(n-1);

More information

Testing Concurrent Java Programs Using Randomized Scheduling

Testing Concurrent Java Programs Using Randomized Scheduling Testing Concurrent Java Programs Using Randomized Scheduling Scott D. Stoller Computer Science Department State University of New York at Stony Brook http://www.cs.sunysb.edu/ stoller/ 1 Goal Pillars of

More information

Automatic Testing of Sequential and Concurrent Substitutability

Automatic Testing of Sequential and Concurrent Substitutability Automatic Testing of Sequential and Concurrent Substitutability Michael Pradel and Thomas R. Gross Department of Computer Science ETH Zurich 1 Motivation void bar(foo f) { f.m();... } bar() expects functionality

More information

Maximal Causality Reduction for TSO and PSO. Shiyou Huang Jeff Huang Parasol Lab, Texas A&M University

Maximal Causality Reduction for TSO and PSO. Shiyou Huang Jeff Huang Parasol Lab, Texas A&M University Maximal Causality Reduction for TSO and PSO Shiyou Huang Jeff Huang huangsy@tamu.edu Parasol Lab, Texas A&M University 1 A Real PSO Bug $12 million loss of equipment curpos = new Point(1,2); class Point

More information

CMSC 132: Object-Oriented Programming II

CMSC 132: Object-Oriented Programming II CMSC 132: Object-Oriented Programming II Synchronization in Java Department of Computer Science University of Maryland, College Park Multithreading Overview Motivation & background Threads Creating Java

More information