Testing Concurrent Programs, A 7-Minute Jargon-Free Introduction Thesis Writing Seminar Mathias Ricken Rice University February 25, 2010.

Slides:



Advertisements
Similar presentations
What is a fraction? 1 A simple fraction has two parts:
Advertisements

Effective Straggler Mitigation: Attack of the Clones [1]
Race Directed Random Testing of Concurrent Programs KOUSHIK SEN - UNIVERSITY OF CALIFORNIA, BERKELEY PRESENTED BY – ARTHUR KIYANOVSKI – TECHNION, ISRAEL.
Ensuring Operating System Kernel Integrity with OSck By Owen S. Hofmann Alan M. Dunn Sangman Kim Indrajit Roy Emmett Witchel Kent State University College.
Testing Concurrent/Distributed Systems Review of Final CEN 5076 Class 14 – 12/05.
CHESS: A Systematic Testing Tool for Concurrent Software CSCI6900 George.
ConcJUnit: Unit Testing for Concurrent Programs PPPJ 2009 Mathias Ricken and Robert Cartwright Rice University August 28, 2009.
Ashish Kundu CS590F Purdue 02/12/07 Language-Based Information Flow Security Andrei Sabelfield, Andrew C. Myers Presentation: Ashish Kundu
Mixed Numbers Mixed numbers are whole numbers and fractions together.
Intro to Threading CS221 – 4/20/09. What we’ll cover today Finish the DOTS program Introduction to threads and multi-threading.
SYNAR Systems Networking and Architecture Group CMPT 886: Special Topics in Operating Systems and Computer Architecture Dr. Alexandra Fedorova School of.
Changing Percents to a Fraction #3 To change a percent to a fraction you need to first write the numerator over 100. Next simplify the fraction.
JUnit. What is unit testing? A unit is the smallest testable part of an application. A unit test automatically verifies the correctness of the unit. There.
Fractions, Decimals, & Percent Conversions
Energy Model for Multiprocess Applications Texas Tech University.
Comparing Fractions By: Greg Stark EC&I 831 Why compare fractions? To determine which fraction represents a larger value Fractions with the same denominator.
Parallel Programming in.NET Kevin Luty.  History of Parallelism  Benefits of Parallel Programming and Designs  What to Consider  Defining Types of.
Testing Concurrent Programs COMP Production Programming Mathias Ricken Rice University Spring 2009.
Unit Testing in Java with an Emphasis on Concurrency Corky Cartwright Rice and Halmstad Universities Summer 2013.
Percent to Fraction 1.Setup a fraction with 100 as denominator 2.Insert percent number as numerator 3. Common Factor of numerator and denominator 4.Divide.
Accelerating Precise Race Detection Using Commercially-Available Hardware Transactional Memory Support Serdar Tasiran Koc University, Istanbul, Turkey.
Threads by Dr. Amin Danial Asham. References Operating System Concepts ABRAHAM SILBERSCHATZ, PETER BAER GALVIN, and GREG GAGNE.
Multi-core Programming Introduction Topics. Topics General Ideas Moore’s Law Amdahl's Law Processes and Threads Concurrency vs. Parallelism.
Meta Scheduling Sathish Vadhiyar Sources/Credits/Taken from: Papers listed in “References” slide.
Test-First Java Concurrency for the Classroom SIGCSE 2010 Mathias Ricken and Robert Cartwright Rice University March 12, 2009.
Fractions Vocabulary Review.
Percentages, Decimals, & Fractions 5 th Grade Mathematics By: Rebecca Farrell Click the arrows to go to the Main Menu.
Outline  Over view  Design  Performance  Advantages and disadvantages  Examples  Conclusion  Bibliography.
1 A Framework for Testing Concurrent Programs PhD Thesis Defense Mathias Ricken Rice University January 10, 2011.
A Framework for Testing Concurrent Programs COMP 600 Mathias Ricken Rice University August 27, 2007.
A Framework for Testing Concurrent Programs MS Thesis Defense Mathias Ricken Rice University June 14, 2007.
Multicore Computing Lecture 1 : Course Overview Bong-Soo Sohn Associate Professor School of Computer Science and Engineering Chung-Ang University.
RDPStatistical Methods in Scientific Research - Lecture 41 Lecture 4 Sample size determination 4.1 Criteria for sample size determination 4.2 Finding the.
Dividing Fractions. A. Review  Examples of fractions.
Moore’s Law and Its Future Mark Clements. 15/02/2007EADS 2 This Week – Moore’s Law History of Transistors and circuits The Integrated circuit manufacturing.
ADDING FRACTIONS. Adding Fractions How to do…… 1.You have to get the bottoms (denominators) the same 2.To get the bottoms the same you find the biggest.
CDP Tutorial 3 Basics of Parallel Algorithm Design uses some of the slides for chapters 3 and 5 accompanying “Introduction to Parallel Computing”, Addison.
Fractions, Decimals, Percentages
Copyright © 1998, Triola, Elementary Statistics Addison Wesley Longman 1 Assumptions 1) Sample is large (n > 30) a) Central limit theorem applies b) Can.
1 A Framework for Testing Concurrent Programs PhD Proposal Mathias Ricken Rice University December 2, 2010.
ConcJUnit: Unit Testing for Concurrent Programs COMP 600 Mathias Ricken Rice University August 24, 2009.
When you compare two fractions, you decide which is greater or which is less. If the fractions have common denominators, compare their numerators. The.
Minutes Left:
Uses some of the slides for chapters 3 and 5 accompanying “Introduction to Parallel Computing”, Addison Wesley, 2003.
Reachability Testing of Concurrent Programs1 Reachability Testing of Concurrent Programs Richard Carver, GMU Yu Lei, UTA.
Introduction to Mathematics This prep course introduces decimals, percents, and fractions. Some reference websites can be found on the last slide of this.
Improper Fractions and Mixed Number.  An improper fraction is a fraction in which the numerator is larger than the denominator. Example: 7/3 The numerator.
Multicore Computing Lecture 1 : Course Overview Bong-Soo Sohn Associate Professor School of Computer Science and Engineering Chung-Ang University.
Introduction. News you can use Hardware –Multicore chips (2009: mostly 2 cores and 4 cores, but doubling) (cores=processors) –Servers (often.
Fractions Introduction and Review. Simplifying Fractions Divide the numerator (top) and denominator (bottom) by the same number Repeat, as needed 12 ÷
Adding Fractions BY MRS. MULLER. Key Vocabulary  Numerator: The top number of the fraction (the amount out of the whole)  Denominator: The bottom number.
Introduction Super-computing Tuesday
Introduction to JUnit CS 4501 / 6501 Software Testing
Equivalent Fractions and Multipliers
FRACTIONS DECIMALS & PERCENTS
Confidence Intervals for a Population Proportion
Introduction.
Introduction.
Introduction to JUnit CS 4501 / 6501 Software Testing
Using surface code experimental output correctly and effectively
Dimensional Analysis Why do it?.
Adaptive Single-Chip Multiprocessing
Multithreaded Programming
Maths Unit 11 – Fractions, Decimals & Percentages
Lecture 2 The Art of Concurrency
Human Media Multicore Computing Lecture 1 : Course Overview
Objective: Learn to compare the values of the fractions.
Fractions, Decimals, Percents
Testing Concurrent Programs
Maths Unit 9 – Fractions, Decimals & Percentages
Presentation transcript:

Testing Concurrent Programs, A 7-Minute Jargon-Free Introduction Thesis Writing Seminar Mathias Ricken Rice University February 25, 2010

2 Computer Annoyances Program bugsSlow computers

3 Unit Testing Test program parts, not the whole program –Test parts individually, then together –Smaller parts  larger parts Unit tests are programs –Compare expected result to actual result: assertEquals(12, multiply(3,4));

4 Moore’s Law Adopted from Sutter 2009

5 Existing Approaches Fail Simple Unit Testing Frameworks –Example: JUnit –Assume program is single-threaded –Many errors go undetected detected not detected Main thread: Other thread:

6 Problem: Non-Determinism Synchronization points –Information exchanged between threads –Order of threads reaching sync. points is non-deterministic

7 Problem: Non-Determinism Synchronization points –Information exchanged between threads –Order of threads reaching sync. points is non-deterministic –Program could succeed in one order but fail in another

8 Comprehensive Tools: Costly Model checking or schedule-based execution –Examples: JPF, ExitBlock –Test all arrangements –Too costly t= # of threads s= # of sync. points N= # of arrangements Longer than the universe exists! (if N=1  1 minute)

9 Insert random delays before synchronization points to modify the order Run tests many times with different delays Probabilistic Approach

10 Probabilistic Approach Insert random delays before synchronization points to modify the order Run tests many times with different delays delay

11 (Proposed) Contributions Probabilistic Approach –Random delays at synchronization points Call Graph Analysis –Determine which parts of the program may interact –Only insert delays where necessary Improved JUnit Framework –Exception handler for all threads –Ensures that all errors in all threads are detected

12 Evaluation Tested DrJava with Improved JUnit –Number of unit tests:900 –Previously unknown problems:20 –Slowdown: ~1 percent Other parts still under development

13 Conclusion Unit testing of concurrent programs will become more important Concutest helps… –by improving JUnit’s abilities –by using probabilistic techniques –by using call graph analysis to reduce the number of synchronization points

14 Image Attribution 1.Left image on Computer Annoyances: Adapted from MicrosoftComputer AnnoyancesMicrosoft 2.Graph on Moore’s Law: Adapted from Herb Sutter 2009Moore’s LawHerb Sutter Top image on Multi-Cores and Concurrency: Adapted from Brian Goetz et al. 2006, Addison WesleyMulti-Cores and ConcurrencyBrian Goetz et al. 2006, Addison Wesley 4.Bottom image on Multi-Cores and Concurrency: Caption FridaysMulti-Cores and Concurrency Caption Fridays

15 Extra Slides

16 Multi-Cores and Concurrency Recent trends –Clock speed stagnated –Transistors still increasing –Reason: multi-core CPUs Implication –Must use concurrency to benefit from modern CPUs –Concurrent programming is difficult

17 Number of schedules (N) –t: # of threads, s: # of slices per thread –Note: s is # of slices (between synchronization points) Number of Arrangements

18 Product of s-combinations For thread 1: choose s out of ts time slices For thread 2: choose s out of ts-s time slices … For thread t-1: choose s out of 2s time slices For thread t-1: choose s out of s time slices Writing s-combinations using factorial Cancel out terms in denominator and next numerator Left with (ts)! in numerator and t numerators with s! Number of Arrangements