Understanding and Genera-ng High Quality Patches for Concurrency Bugs. Haopeng Liu, Yuxi Chen and Shan Lu
|
|
- Harvey Reynolds
- 5 years ago
- Views:
Transcription
1 1 Understanding and Genera-ng High Quality Patches for Concurrency Bugs Haopeng Liu, Yuxi Chen and Shan Lu
2 2 What are concurrency bugs Synchroniza-on mistakes in mul--threaded programs
3 3 What are concurrency bugs Synchroniza-on mistakes in mul--threaded programs //child thread if( ){ unlock(f->mut); return; } //parent thread f->mut = NULL;
4 4 What are concurrency bugs Synchroniza-on mistakes in mul--threaded programs //child thread if( ){ unlock(f->mut); return; } //parent thread f->mut = NULL;
5 5 What are concurrency bugs Synchroniza-on mistakes in mul--threaded programs //child thread if( ){ unlock(f->mut); return; } //parent thread f->mut = NULL;
6 6 Concurrency bugs need to be fixed Prevalence Widely exist in mul--threaded programs Seriousness Cause real world disasters Difficulty Time-consuming to fix [LuASPLOS 08] Patches are the most error-prone [YinFSE 11] 2X -mes more oxen to be buggy than memory/seman-c bugs
7 7 Concurrency bug automated fixing Observa-on: Program is correct in most -ming interleavings. Solu-on: Only need to remove some bad -ming. add lock-related synchroniza-on FSE 14]. [AFix PLDI 11] [CFix OSDI 12] [Grail
8 8 An automated fixing example //child thread if( ){ unlock(f->mut); + lock(l); + signal(con); + unlock(l); return; } + lock(l); + signal(con); + unlock(l); //parent thread + lock(l) + while( ){ + wait(con, L); + } + unlock (L) f->mut = NULL; Overall: 9 new synchroniza-ons 1 new while loop Reality is even worse!
9 9 The manual patch //child thread if( ){ unlock(f->mut); return; } //parent thread + thread_join( ); f->mut = NULL; Overall: New sycn.: 1 VS. 9 New while loop: 0 VS. 1 Simpler patch à Easier to read and maintain Can we automa7cally generate such simple patches?
10 10 Manual patch study 77 real-world concurrency bugs The limita-on of exis-ng techniques Guidance to design new tools HFix Contribu-ons Bug Reports AFix[1] Bug Reports CFix[2] Bug Reports Grail[3] Bug Reports [1] Guoliang Jin etc. AFix. In PLDI 11 [2] Guoliang Jin etc. CFix. In OSDI 12 [3] Peng Liu etc. Grail. In FSE 14 Bug Reports HFix
11 11 Outline Mo-va-on Manual patch study HFix Evalua-on Conclusion
12 12 Research Ques-ons Q1: Do manual patches mostly use lockrelated synchroniza-ons? Q2: Do manual patches mostly disable buggy -ming by adding synchroniza-on ops?
13 13 Manual patch study methodology [1] App. Source Descrip7on #. Bugs Apache Web Server 13 Mozilla Browser Suite 41 Lu ASPLOS 08 MySQL Database Server 12 OpenOffice Office Suite 5 Misc Recent papers[2-4] 6 Total 77 Study developer patches & on-line discussion [1] Threads to validity are listed in paper. [2] Guoliang Jin etc. AFix. In PLDI 11 [3] Guoliang Jin etc. CFix. In OSDI 12 [4] Wei Zhang etc. ConSeq. In ASPLOS 11
14 14 Q1: How many patches use lock? Use Sync. primi7ves? Yes None
15 15 Q1: How many patches use lock? Use Sync. primi7ves? Synchroniza7on primi7ves Yes None Lock/Con. Var Create/Join Misc. AV patches OV patches
16 16 Q1: How many patches use lock? Use Sync. primi7ves? Synchroniza7on primi7ves Yes None Lock/Con. Var Create/Join Misc. AV patches OV patches
17 17 Q1: How many patches use lock? Use Sync. primi7ves? Synchroniza7on primi7ves Yes None Lock/Con. Var Create/Join Misc. AV patches OV patches
18 18 Q1: How many patches use lock? Use Sync. primi7ves? Synchroniza7on primi7ves Yes None Lock/Con. Var Create/Join Misc. AV patches OV patches Thread pc P C Thread r R
19 19 Q1: How many patches use lock? Use Sync. primi7ves? Synchroniza7on primi7ves Yes None Lock/Con. Var Create/Join Misc. AV patches OV patches Thread pc P C Thread r R
20 20 Q1: How many patches use lock? Use Sync. primi7ves? Synchroniza7on primi7ves Yes None Lock/Con. Var Create/Join Misc. AV patches OV patches Thread pc P C Thread r R Thread A A Thread B B
21 21 Q1: How many patches use lock? Use Sync. primi7ves? Synchroniza7on primi7ves Yes None Lock/Con. Var Create/Join Misc. AV patches OV patches Thread pc P C Thread r R Thread A A Thread B B
22 22 Q1 implica-on Use non-lock synchroniza-on to fix OV. Synchroniza7on primi7ves Lock/Con. Var Create/Join Misc. AV patches OV patches
23 23 Q1 implica-on Use non-lock synchroniza-on to fix OV. Synchroniza7on primi7ves Lock/Con. Var Create/Join Misc.! AV patches OV patches
24 24 Q2: What are developers fix strategy? Disable Tolerate
25 25 Q2: What are developers fix strategy? Disable (Adds)[1-3] Tolerate [1] Guoliang Jin etc. AFix. In PLDI 11 [2] Guoliang Jin etc. CFix. In OSDI 12 [3] Peng Liu etc. Grail.In FSE 14
26 26 Q2: What are developers fix strategy? Disable (Adds) Disable (Data priv.)[1] Tolerate [1] Jeff Huang etc.execu-on Priva-za-on of Scheduler-Oblivious Concurrent Programs. In OOPSLA 11
27 27 Q2: What are developers fix strategy? Disable (Adds) Disable (Data priv.) Disable (Moves) Tolerate
28 28 Q2: What are developers fix strategy? Disable (Adds) Disable (Data priv.) Disable (Moves) Disable (Bypass) Tolerate
29 29 Q2 implica-on Add-Sync widely applies, but oxen not best Need to automate: Move synchroniza-on Bypass Tolerate! Disable (Adds) Disable (Data priv.) Disable (Moves) Disable (Bypass) Tolerate Different bugs are suitable different strategies
30 30 Outline Mo-va-on Manual patch studying HFix HFixJoin HFixmove Evalua-on Conclusion
31 31 HFix overview HFix HFixJoin Sta-c analysis Code transform Thd pc Thd r P R C Thd A A Thd B B Sta-c analysis HFixMove Code transform Goal: Fix bugs with simple patches Do not introduce new bugs
32 32 HFixjoin Intui-on Which kind of bugs can be fixed by HFixjoin? ThreadA ThreadB A S create B
33 33 HFixjoin Intui-on Which kind of bugs can be fixed by HFixjoin? ThreadA ThreadB A S create B
34 34 HFixjoin Step1: Suitability checking Goal: do not introduce new bugs. Step2: Insert join synchroniza-on Goal: fix the bug
35 35 Suitability checking (sta-c analysis) Is ThreadA a joinable child thread of ThreadB? Only one ThreadB? Is ThreadA already joined? Will there be deadlock/severe performance slow-down? ThreadA ThreadB A S create B
36 36 Suitability checking (sta-c analysis) Is ThreadA a joinable child thread of ThreadB? Only one ThreadB? Is ThreadA already joined? Will there be deadlock/severe performance slow-down? //parent thread + thread_join( ); fp = NULL; signal(condv); //child thread fputs(fp, ); wait(condv);
37 37 Insert join synchroniza-on Insert join before opera-on B Patch Example //child thread if( ){ unlock(f->mut); return; } //parent thread pthread_create(&tid, )... f->mut = NULL;
38 38 Insert join synchroniza-on Insert join before opera-on B Patch Example //child thread if( ){ unlock(f->mut); return; } //parent thread pthread_create(&tid, ) tmp = tid;... pthread_join(tmp); f->mut = NULL;
39 39 HFixmove Intui-on What kind of bugs can be fixed by HFixmove? ThreadA ThreadB S create A B (a) Move create fixes OV bug move-up A or move-down S
40 40 HFixmove Intui-on What kind of bugs can be fixed by HFixmove? ThreadA ThreadB A* ThreadA ThreadB S create B A S join B (a) Move create fixes OV bug move-up A or move-down S (b) Move join fixes OV bug move-up S or move-down B
41 41 HFixmove Intui-on What kind of bugs can be fixed by HFixmove? ThreadA ThreadB ThreadA ThreadB Threadpc Threadr Threadpc Threadr A* S create B A S join B* p c S unlock r S lock p c r (a) Move create fixes OV bug move-up A or move-down S (b) Move join fixes OV bug move-up S or move-down B (c) Move unlock fixes AV bug move-up c or move-down S (d) Move lock fixes AV bug move-up S or move-down p
42 42 Step1: iden-fy two opera-ons to move ThreadA ThreadB ThreadA ThreadB Threadpc Threadr Threadpc Threadr A* S create B A S join B* p C* r S lock P* c r S unlock (a) Move create fixes OV bug move-up A or move-down S (b) Move join fixes OV bug move-up S or move-down B (c) Move unlock fixes AV bug move-up c or move-down S (d) Move lock fixes AV bug move-up S or move-down p
43 43 Step1: iden-fy two opera-ons to move ThreadA ThreadB ThreadA ThreadB Threadpc Threadr Threadpc Threadr A* S create B A S join B* p C* r S lock P* c r S unlock (a) Move create fixes OV bug move-up A or move-down S (b) Move join fixes OV bug move-up S or move-down B (c) Move unlock fixes AV bug move-up c or move-down S (d) Move lock fixes AV bug move-up S or move-down p X Y Y X
44 44 Step 2: decide the moving des-na-on X* Goal # of execu-ons of X == # of execu-ons of X*
45 45 Strawman solu-on doesn t work # of execu-ons of X # of execu-ons of X* 1 0 Y Naïve sol X* Y X Originally, X executes once. AXer moving, X* does not execute.
46 46 Strawman solu-on doesn t work # of execu-ons of X # of execu-ons of X* 1 N Naïve sol X Y X* Y Originally, X executes once. AXer moving, X* executes more than once.
47 * X and Y are inside the same func-on; neither is in loop 47 HFixmove demonstra-on Guarantee: X* will execute exactly once before Y. X Y
48 * X and Y are inside the same func-on; neither is in loop 48 HFixmove demonstra-on Guarantee: X* will execute exactly once before Y. Y X
49 * X and Y are inside the same func-on; neither is in loop 49 HFixmove demonstra-on Guarantee: X* will execute exactly once before Y. Y X
50 * X and Y are inside the same func-on; neither is in loop 50 HFixmove demonstra-on Guarantee: X* will execute exactly once before Y. X* Y Our solu-on X* X* X X* Y
51 * X and Y are inside the same func-on; neither is in loop 51 HFixmove demonstra-on Guarantee: X* will execute exactly once before Y. X* Y Our solu-on X* X* X X* Y X Y
52 * X and Y are inside the same func-on; neither is in loop 52 HFixmove demonstra-on Guarantee: X* will execute exactly once before Y. X* Y Our solu-on X* X* X X* Y X* X Y Our solu-on X* Y
53 53 Step 3: suitability checking Does move change local def-use rela-onship? + gx = m; s_create( ); m = 0; gx = m;
54 54 Step 3: suitability checking Does move change local def-use rela-onship? + gx = m; s_create( ); m = 0; gx = m;
55 55 Step 3: suitability checking Does move change local def-use rela-onship? + gx = m; s_create( ); m = 0; gx = m;
56 56 Step 3: suitability checking Does move change local def-use rela-onship? + gx = m; s_create( ); m = 0; Might move introduce deadlocks?
57 57 HFixmove patch example //child thread assert(h->band); //parent thread + h->band = bdnew(h); pthread_create( )... - h->band = bdnew(h);
58 58 Outline Mo-va-on Manual patch studying HFix Evalua-on Methodology Results Conclusion
59 59 Methodology Benchmark Suite 13 bugs set up by Cfix [OSDI 12] All the AV bugs in ASPLOS 08 suite that are fixed through moving synchroniza-on by developers.
60 60 Results for OV bugs App. HFix VS. Manual FFT HTTrack Mozilla PBZIP2 Transmission X264 ZSNES - - join join create join create
61 61 Results for OV bugs App. Strategy HFix #.Sync Strategy CFix #.Sync FFT join 1 signal/wait 5 HTTrack - - signal/wait 3 Mozilla - - signal/wait 2 PBZIP2 Transmission X264 join create join signal/wait signal/wait signal/wait ZSNES create 0 signal/wait 3
62 62 Results for AV bugs App. Apache Mozilla1 Mozilla2 MySQL1 MySQL2 MySQL3 HFix lock lock unlock unlock unlock
63 63 Outline Mo-va-on Manual patch studying HFix Evalua-on Conclusion
64 64 Conclusion Manual patch study: Add join for OV (HFix) Move exis-ng sync. (HFix) Bypass & tolerate (Future work) HFix A useful complement. Generate much simple patches.! Disable (Adds) Disable (Data priv.) Disable (Moves) Disable (Bypass) Tolerate
65 65 Thank you! Q&A
CFix. Automated Concurrency-Bug Fixing. Guoliang Jin, Wei Zhang, Dongdong Deng, Ben Liblit, and Shan Lu. University of Wisconsin Madison
CFix Automated Concurrency-Bug Fixing Guoliang Jin, Wei Zhang, Dongdong Deng, Ben Liblit, and Shan Lu. University of Wisconsin Madison 1 Bugs Need to be Fixed Buggy software is an unfortunate fact; There
More informationYuxi Chen, Shu Wang, Shan Lu, and Karthikeyan Sankaralingam *
Yuxi Chen, Shu Wang, Shan Lu, and Karthikeyan Sankaralingam * * 2 q Synchronization mistakes in multithreaded programs Thread 1 Thread 2 If(ptr){ tmp = *ptr; ptr = NULL; } Segfault q Common q Hard to diagnose
More informationDiagnosing 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 informationAutomated Concurrency-Bug Fixing
Automated Concurrency-Bug Fixing Guoliang Jin Wei Zhang Dongdong Deng Ben Liblit Shan Lu University of Wisconsin Madison {aliang,wzh,dongdong,liblit,shanlu@cs.wisc.edu Abstract Concurrency bugs are widespread
More informationUnderstanding the Interleaving Space Overlap across Inputs and So7ware Versions
Understanding the Interleaving Space Overlap across Inputs and So7ware Versions Dongdong Deng, Wei Zhang, Borui Wang, Peisen Zhao, Shan Lu University of Wisconsin, Madison 1 Concurrency bug detec3on is
More informationProduction-Run Software Failure Diagnosis via Hardware Performance Counters. Joy Arulraj, Po-Chun Chang, Guoliang Jin and Shan Lu
Production-Run Software Failure Diagnosis via Hardware Performance Counters Joy Arulraj, Po-Chun Chang, Guoliang Jin and Shan Lu Motivation Software inevitably fails on production machines These failures
More informationDo 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 informationChimera: 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 informationLeveraging the Short-Term Memory of Hardware to Diagnose Production-Run Software Failures. Joy Arulraj, Guoliang Jin and Shan Lu
Leveraging the Short-Term Memory of Hardware to Diagnose Production-Run Software Failures Joy Arulraj, Guoliang Jin and Shan Lu Production-Run Failure Diagnosis Goal Figure out root cause of failure on
More informationAd Hoc Synchroniza/on Considered Harmful
Ad Hoc Synchroniza/on Considered Harmful Weiwei Xiong, Soyoen Park, Jiaqi Zhang, Yuanyuan Zhou and Zhiqiang Ma UC San Diego University of Illinois Intel Synchroniza/on is Important Concurrent programs
More informationStatistical Debugging for Real-World Performance Problems
Statistical Debugging for Real-World Performance Problems Linhai Song 1 and Shan Lu 2 1 University of Wisconsin-Madison 2 University of Chicago What are Performance Problems? Definition of Performance
More informationTERN: 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 informationDoubleChecker: Efficient Sound and Precise Atomicity Checking
DoubleChecker: Efficient Sound and Precise Atomicity Checking Swarnendu Biswas, Jipeng Huang, Aritra Sengupta, and Michael D. Bond The Ohio State University PLDI 2014 Impact of Concurrency Bugs Impact
More informationActive 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 informationAnnouncements. Cond Var: Review
Announcements Project 2a: Graded see Learn@UW; contact your TA if questions Part 2b will be graded end of next week Exam 2: Wednesday 11/9 7:15 9:15 Humanities 3650. If you have an academic conflict, fill
More informationMaximal 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 informationLockout: Efficient Tes0ng for Deadlock Bugs. Ali Kheradmand, Baris Kasikci, George Candea
Lockout: Efficient Tes0ng for Deadlock Bugs Ali Kheradmand, Baris Kasikci, George Candea 1 Deadlock Set of threads Each holding a lock needed by another thread Wai?ng for another lock to be released by
More informationConcurrency problems. To do. q Non-deadlock bugs q Resources & deadlocks q Dealing with deadlocks q Other issues q Next Time: I/O and file systems
Concurrency problems To do q Non-deadlock bugs q Resources & deadlocks q Dealing with deadlocks q Other issues q Next Time: I/O and file systems Bugs in some modern applications From some key apps, a summary
More informationActive Testing for Concurrent Programs
Active Testing for Concurrent Programs Pallavi Joshi, Mayur Naik, Chang-Seo Park, Koushik Sen 12/30/2008 ROPAS Seminar ParLab, UC Berkeley Intel Research Overview ParLab The Parallel Computing Laboratory
More informationFTTH-GPON OLT Emulator with integrated Network Analyser
By WYZARTEL FTTH-GPON OLT Emulator with integrated Network Analyser Features OLT Emula on Emulates OLT func onality, allowing to build specific provi sioning models and configure OMCI enes individually
More informationTransaction 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[537] Concurrency Bugs. Tyler Harter
[537] Concurrency Bugs Tyler Harter Review Semaphores CV s vs. Semaphores CV rules of thumb: - Keep state in addition to CV s - Always do wait/signal with lock held - Whenever you acquire a lock, recheck
More informationOptimistic Shared Memory Dependence Tracing
Optimistic Shared Memory Dependence Tracing Yanyan Jiang1, Du Li2, Chang Xu1, Xiaoxing Ma1 and Jian Lu1 Nanjing University 2 Carnegie Mellon University 1 powered by Understanding Non-determinism Concurrent
More informationHaopeng Liu, Xu Wang *, Guangpu Li, Shan Lu, Feng Ye, and Chen Tian.
Haopeng Liu, Xu Wang *, Guangpu Li, Shan Lu, Feng Ye, and Chen Tian http://fcatch.cs.uchicago.edu/ * 1 Component failure: node crashes and message drops 2 #. Events 3 1000 900 800 700 600 500 400 300 200
More informationStatistical Debugging for Real-World Performance Problems. Linhai Song Advisor: Prof. Shan Lu
Statistical Debugging for Real-World Performance Problems Linhai Song Advisor: Prof. Shan Lu 1 Software Efficiency is Critical No one wants slow and inefficient software Frustrate end users Cause economic
More informationDeterministic 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 informationIntroduction to Threads
Computer Systems Introduction to Threads Race Conditions Single- vs. Multi-Threaded Processes Process Process Thread Thread Thread Thread Memory Memory Heap Stack Heap Stack Stack Stack Data Data Code
More informationTHE UNIVERSITY OF CHICAGO TRANSACTIONAL MEMORY SUPPORT FOR CONCURRENCY-BUG FAILURE RECOVERY IN PRODUCTION RUN A DISSERTATION SUBMITTED TO
THE UNIVERSITY OF CHICAGO TRANSACTIONAL MEMORY SUPPORT FOR CONCURRENCY-BUG FAILURE RECOVERY IN PRODUCTION RUN A DISSERTATION SUBMITTED TO THE FACULTY OF THE DIVISION OF THE PHYSICAL SCIENCES IN CANDIDACY
More informationCSC2/458 Parallel and Distributed Systems Scalable Synchronization
CSC2/458 Parallel and Distributed Systems Scalable Synchronization Sreepathi Pai February 20, 2018 URCS Outline Scalable Locking Barriers Outline Scalable Locking Barriers An alternative lock ticket lock
More informationProduction-Run Software Failure Diagnosis via Hardware Performance Counters
Production-Run Software Failure Diagnosis via Hardware Performance Counters Joy Arulraj Po-Chun Chang Guoliang Jin Shan Lu University of Wisconsin Madison {joy,pchang9,aliang,shanlu}@cs.wisc.edu Abstract
More informationCS 153 Lab4 and 5. Kishore Kumar Pusukuri. Kishore Kumar Pusukuri CS 153 Lab4 and 5
CS 153 Lab4 and 5 Kishore Kumar Pusukuri Outline Introduction A thread is a straightforward concept : a single sequential flow of control. In traditional operating systems, each process has an address
More informationSlides 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 informationREST Services. Zaenal Akbar
PS/ Web Services REST Services Zaenal Akbar Friday, - - Outline REST Services Overview Principles Common Errors Exercise What is REST? Set of architectural principles used for design of distributed systems
More informationFixing, preventing, and recovering from concurrency bugs
SCIENCE CHINA Information Sciences. REVIEW. Special Focus on High-Confidence Software Technologies May 2015, Vol. 58 052105:1 052105:18 doi: 10.1007/s11432-015-5315-9 Fixing, preventing, and recovering
More informationOutline. CS4254 Computer Network Architecture and Programming. Introduction 2/4. Introduction 1/4. Dr. Ayman A. Abdel-Hamid.
Threads Dr. Ayman Abdel-Hamid, CS4254 Spring 2006 1 CS4254 Computer Network Architecture and Programming Dr. Ayman A. Abdel-Hamid Computer Science Department Virginia Tech Threads Outline Threads (Chapter
More informationAutomatically 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 information10/17/2011. Cooperating Processes. Synchronization 1. Example: Producer Consumer (3) Example
Cooperating Processes Synchronization 1 Chapter 6.1 4 processes share something (devices such as terminal, keyboard, mouse, etc., or data structures) and can affect each other non deterministic Not exactly
More informationIn Workflow. Viewing: Last edit: 11/04/14 4:01 pm. Approval Path. Programs referencing this course. Submi er: Proposing College/School: Department:
1 of 5 1/6/2015 1:20 PM Date Submi ed: 11/04/14 4:01 pm Viewing: Last edit: 11/04/14 4:01 pm Changes proposed by: SIMSLUA In Workflow 1. INSY Editor 2. INSY Chair 3. EN Undergraduate Curriculum Commi ee
More informationConcurrency problems. q Non-deadlock bugs q Resources & deadlocks q Dealing with deadlocks q Other issues q Next Time: I/O and file systems
Concurrency problems q Non-deadlock bugs q Resources & deadlocks q Dealing with deadlocks q Other issues q Next Time: I/O and file systems Bugs in some modern applications From some key apps, a summary
More informationSOFTWARE CONFIGURATION MANAGEMENT
SOFTWARE CONFIGURATION MANAGEMENT Cape Town SPIN - Albert Visagie - 19 March 2008 Goals Where were we? And get back there reliably. Where are we? How did we get here? Which bugs were fixed in this version?
More informationCarnegie Mellon. Synchroniza+on : Introduc+on to Computer Systems Recita+on 14: November 25, Pra+k Shah (pcshah) Sec+on C
Synchroniza+on 15-213: Introduc+on to Computer Systems Recita+on 14: November 25, 2013 Pra+k Shah (pcshah) Sec+on C 1 Topics News Shared State Race condi+ons Synchroniza+on Mutex Semaphore Readers- writers
More informationCrowdCode: A Platform for Crowd Development
CrowdCode: A Platform for Crowd Development Thomas D. LaToza 1, Eric Chiquillo 1, 2, W. Ben Towne 3, Christian M. Adriano 1, André van der Hoek 1 1 University of California, Irvine 2 Zynga 3 Carnegie Mellon
More informationLecture 7: Transactional Memory Intro. Topics: introduction to transactional memory, lazy implementation
Lecture 7: Transactional Memory Intro Topics: introduction to transactional memory, lazy implementation 1 Transactions New paradigm to simplify programming instead of lock-unlock, use transaction begin-end
More informationWeb Services in Ac-on. Mark Schroeder 2E Track
Web Services in Ac-on Mark Schroeder 2E Track FOR INFORMATION PURPOSES ONLY Terms of this presenta3on This presenta-on was based on current informa-on and resource alloca-ons as of April 2013 and is subject
More informationmultiprocessing HPC Python R. Todd Evans January 23, 2015
multiprocessing HPC Python R. Todd Evans rtevans@tacc.utexas.edu January 23, 2015 What is Multiprocessing Process-based parallelism Not threading! Threads are light-weight execution units within a process
More informationConcurrency & Multithreading
Concurrency & Multithreading Multithreaded Programming Pieter Hijma Multithreaded Programming Multithreaded Programming is really difficult. Problems race conditions non-determinism deadlock termination
More informationConcurrency: Signaling and Condition Variables
Concurrency: Signaling and Condition Variables Questions Answered in this Lecture: How do we make fair locks perform better? How do we notify threads of that some condition has been met? Hale CS450 Thanks
More informationCONCURRENCY: DEADLOCK. Shivaram Venkataraman CS 537, Spring 2019
CONCURRENCY: DEADLOCK Shivaram Venkataraman CS 537, Spring 2019 ADMINISTRIVIA Midterm is on Wednesday 3/13 at 5.15pm, details on Piazza Venue: If your last name starts with A-L, go to VanVleck B102 else
More informationHigh Performance Computing Course Notes Shared Memory Parallel Programming
High Performance Computing Course Notes 2009-2010 2010 Shared Memory Parallel Programming Techniques Multiprocessing User space multithreading Operating system-supported (or kernel) multithreading Distributed
More informationSemantic 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 informationDynamically 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 information32. Common Concurrency Problems.
32. Common Concurrency Problems. Oerating System: Three Easy Pieces AOS@UC 1 Common Concurrency Problems More recent work focuses on studying other tyes of common concurrency bugs. w Take a brief look
More informationHow to reduce fric-on and transac-on costs in intellectual property management for free and open source projects?
How to reduce fric-on and transac-on costs in intellectual property management for free and open source projects? LinuxCon Europe 2013, October 21 st 2013 Background Most free and open source so:ware (and
More informationCoe628 Midterm Study Guide (2017)
Coe628 Study Guide 2017 1/6 Coe628 Midterm Study Guide (2017) The Questions 1. Multi-core state diagram A single CPU (core) has a state transition diagram indicating the possible process state changes
More informationCS 450 Exam 2 Mon. 4/11/2016
CS 450 Exam 2 Mon. 4/11/2016 Name: Rules and Hints You may use one handwritten 8.5 11 cheat sheet (front and back). This is the only additional resource you may consult during this exam. No calculators.
More informationRaces. Example. A race condi-on occurs when the computa-on result depends on scheduling (how threads are interleaved)
Races A race condi-on occurs when the computa-on result depends on scheduling (how threads are interleaved) Bugs that exist only due to concurrency o No interleaved scheduling with 1 thread Typically,
More informationConcurrent Programming
Concurrent Programming is Hard! Concurrent Programming Kai Shen The human mind tends to be sequential Thinking about all possible sequences of events in a computer system is at least error prone and frequently
More informationDFM Concurrent Costing
Die Casting Analysis Start a new analysis For the purposes of this tutorial we will es mate the cost per part of manufacturing 200,000 of the disk drive casings shown here: front The material is to be
More informationRead-Copy Update in a Garbage Collected Environment. By Harshal Sheth, Aashish Welling, and Nihar Sheth
Read-Copy Update in a Garbage Collected Environment By Harshal Sheth, Aashish Welling, and Nihar Sheth Overview Read-copy update (RCU) Synchronization mechanism used in the Linux kernel Mainly used in
More informationCS 261 Fall Mike Lam, Professor. Threads
CS 261 Fall 2017 Mike Lam, Professor Threads Parallel computing Goal: concurrent or parallel computing Take advantage of multiple hardware units to solve multiple problems simultaneously Motivations: Maintain
More informationREGION: NORTH AMERICA
R U M A REGION: NORTH AMERICA R U M A Chapter Issue Date 1 Introduc on 05/21/2012 2 Install and Upgrade Minimum Hardware Requirements Android Opera ng System and Wi Fi Se ngs Installing Revoquest the First
More informationParallelism 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 informationConcurrent Programming
Concurrent Programming is Hard! Concurrent Programming Kai Shen The human mind tends to be sequential Thinking about all possible sequences of events in a computer system is at least error prone and frequently
More informationEsercitazione re- di accesso
Esercitazione re- di accesso 15 05 2008 Outline Linux the Survivor Kit Netkit The poor man's system to experiment computer networking IpRoute2 show / manipulate rou-ng, devices, policy rou-ng and tunnels
More informationColumn-Family Stores: Cassandra
NDBI040: Big Data Management and NoSQL Databases h p://www.ksi.mff.cuni.cz/ svoboda/courses/2016-1-ndbi040/ Lecture 10 Column-Family Stores: Cassandra Mar n Svoboda svoboda@ksi.mff.cuni.cz 13. 12. 2016
More informationRaceMob: Crowdsourced Data Race Detec,on
RaceMob: Crowdsourced Data Race Detec,on Baris Kasikci, Cris,an Zamfir, and George Candea School of Computer & Communica3on Sciences Data Races to shared memory loca,on By mul3ple threads At least one
More informationCoerced Cache Evic-on and Discreet- Mode Journaling: Dealing with Misbehaving Disks
Coerced Cache Evic-on and Discreet- Mode Journaling: Dealing with Misbehaving Disks Abhishek Rajimwale *, Vijay Chidambaram, Deepak Ramamurthi Andrea Arpaci- Dusseau, Remzi Arpaci- Dusseau * Data Domain
More informationBackground: I/O Concurrency
Background: I/O Concurrency Brad Karp UCL Computer Science CS GZ03 / M030 5 th October 2011 Outline Worse Is Better and Distributed Systems Problem: Naïve single-process server leaves system resources
More informationUnderstanding Real-World Concurrency Bugs in Go
Understanding Real-World Concurrency Bugs in Go Abstract Tengfei Tu BUPT, Pennsylvania State University tutengfei.kevin@bupt.edu.cn Linhai Song Pennsylvania State University songlh@ist.psu.edu Go is a
More informationNDBI040: Big Data Management and NoSQL Databases
NDBI040: Big Data Management and NoSQL Databases h p://www.ksi.mff.cuni.cz/~svoboda/courses/171-ndbi040/ Prac cal Class 8 MongoDB Mar n Svoboda svoboda@ksi.mff.cuni.cz 5. 12. 2017 Charles University in
More informationDeterministic Process Groups in
Deterministic Process Groups in Tom Bergan Nicholas Hunt, Luis Ceze, Steven D. Gribble University of Washington A Nondeterministic Program global x=0 Thread 1 Thread 2 t := x x := t + 1 t := x x := t +
More informationCSCI4430 Data Communication and Computer Networks. Pthread Programming. ZHANG, Mi Jan. 26, 2017
CSCI4430 Data Communication and Computer Networks Pthread Programming ZHANG, Mi Jan. 26, 2017 Outline Introduction What is Multi-thread Programming Why to use Multi-thread Programming Basic Pthread Programming
More informationDigital Analy 韜 cs Installa 韜 on and Configura 韜 on
Home > Digital AnalyĀcs > Digital Analy 韜 cs Installa 韜 on and Configura 韜 on Digital Analy 韜 cs Installa 韜 on and Configura 韜 on Introduc 韜 on Digital Analy 韜 cs is an e automate applica 韜 on that assists
More informationThread. Disclaimer: some slides are adopted from the book authors slides with permission 1
Thread Disclaimer: some slides are adopted from the book authors slides with permission 1 IPC Shared memory Recap share a memory region between processes read or write to the shared memory region fast
More informationReminder from last <me
Concurrent systems Lecture 2: Mutual exclusion and process synchronisa
More informationCharlie Garrod Bogdan Vasilescu
Principles of So3ware Construc9on: Objects, Design, and Concurrency Part 3: Concurrency Introduc9on to concurrency, part 2 Concurrency primi9ves and challenges, con9nued Charlie Garrod Bogdan Vasilescu
More informationUsing Cowichan Problems to Inves6gate Programmability of X10 Programming System
Using Cowichan Problems to Inves6gate Programmability of X1 Programming System Jeeva S. Paudel, J. Nelson Amaral Department of Computing Science University of Alberta, Edmonton Canada June 4, 211 X1: Design
More informationProxy: Concurrency & Caches
Proxy: Concurrency & Caches Elie Krevat (with wisdom from past terms) Outline Proxy Lab logistics Concurrency and multi-threading Synchronization with semaphores Caching objects in your proxy Proxy Lab
More informationHarnessing Publicly Available Factual Data in the Analytical Process
June 14, 2012 Harnessing Publicly Available Factual Data in the Analytical Process by Benson Margulies, CTO We put the World in the World Wide Web ABOUT BASIS TECHNOLOGY Basis Technology provides so ware
More informationThreads. COMP 401 Fall 2017 Lecture 22
Threads COMP 401 Fall 2017 Lecture 22 Threads As a generic term Abstrac>on for program execu>on Current point of execu>on. Call stack. Contents of memory. The fundamental unit of processing that can be
More informationFinding Concurrency Bugs with Context-Aware Communication Graphs
Finding Concurrency Bugs with Context-Aware Communication Graphs Brandon Lucia Luis Ceze Department of Computer Science and Engineering, University of Washington {bluciaa,luisceze@cs.washington.edu http://sampa.cs.washington.edu
More informationExplicitly Parallel Programming with Shared Memory is Insane: At Least Make it Deterministic!
Explicitly Parallel Programming with Shared Memory is Insane: At Least Make it Deterministic! Joe Devietti, Brandon Lucia, Luis Ceze and Mark Oskin University of Washington Parallel Programming is Hard
More information1. Assess the CATIA tools, workbenches, func ons, and opera ons used to create and edit 3D part models, products, and drawings.
1 of 5 5/1/2014 2:38 PM MFGT 142 CATIA II Approval Date: 02/20/2014 Effec ve Term: Fall 2014 Department: MANUFACTURING TECHNOLOGY Division: Career Technical Educa on Units: 3.00 Grading Op on: Le er Grade
More informationKey-Value Stores: RiakKV
B4M36DS2, BE4M36DS2: Database Systems 2 h p://www.ksi.m.cuni.cz/~svoboda/courses/181-b4m36ds2/ Lecture 7 Key-Value Stores: RiakKV Mar n Svoboda mar n.svoboda@fel.cvut.cz 12. 11. 2018 Charles University,
More informationKey-Value Stores: RiakKV
B4M36DS2: Database Systems 2 h p://www.ksi.mff.cuni.cz/ svoboda/courses/2016-1-b4m36ds2/ Lecture 4 Key-Value Stores: RiakKV Mar n Svoboda svoboda@ksi.mff.cuni.cz 24. 10. 2016 Charles University in Prague,
More informationLight64: Ligh support for data ra. Darko Marinov, Josep Torrellas. a.cs.uiuc.edu
: Ligh htweight hardware support for data ra ce detection ec during systematic testing Adrian Nistor, Darko Marinov, Josep Torrellas University of Illinois, Urbana Champaign http://iacoma a.cs.uiuc.edu
More informationLecture 4. Threads vs. Processes. fork() Threads. Pthreads. Threads in C. Thread Programming January 21, 2005
Threads vs. Processes Lecture 4 Thread Programming January 21, 2005 fork() is expensive (time, memory) Interprocess communication is hard. Threads are lightweight processes: one process can contain several
More informationKey-Value Stores: RiakKV
NDBI040: Big Data Management and NoSQL Databases h p://www.ksi.mff.cuni.cz/ svoboda/courses/2016-1-ndbi040/ Lecture 4 Key-Value Stores: RiakKV Mar n Svoboda svoboda@ksi.mff.cuni.cz 25. 10. 2016 Charles
More informationKEYNOTE FOR
THE OS SCHEDULER: A PERFORMANCE-CRITICAL COMPONENT IN LINUX CLUSTER ENVIRONMENTS KEYNOTE FOR BPOE-9 @ASPLOS2018 THE NINTH WORKSHOP ON BIG DATA BENCHMARKS, PERFORMANCE, OPTIMIZATION AND EMERGING HARDWARE
More informationThread- Level Parallelism
Thread- Level Parallelism 15-213 / 18-213: Introduc on to Computer Systems 26 th Lecture, Nov 26, 2012 Instructors: Randy Bryant, Dave O Hallaron, and Greg Kesden 1 Today Parallel Compu ng Hardware Mul
More informationMultithreading Programming II
Multithreading Programming II Content Review Multithreading programming Race conditions Semaphores Thread safety Deadlock Review: Resource Sharing Access to shared resources need to be controlled to ensure
More informationCSE 120. Fall Lecture 6: Semaphores. Keith Marzullo
CSE 120 Principles of Operating Systems Fall 2007 Lecture 6: Semaphores Keith Marzullo Announcements Homework #2 out Homework #1 almost graded... Discussion session on Wednesday will entertain questions
More informationBT SIP Trunk CRF User Guide - BT Sales / Originator + Specialist
BT SIP Trunk CRF User Guide - BT Sales / Originator + Specialist The following informa on provides an overview of how to use and complete the SIP Trunk elements of the BT System CRF portal. 1. Introduc
More informationDesigning API: 20 API Paradoxes. Jaroslav Tulach NetBeans Platform Architect
Designing API: 20 API Paradoxes Jaroslav Tulach NetBeans Platform Architect Motto Just like there is a difference between describing a house and describing a Universe, there is a difference between writing
More informationelectronic license applications user s guide Contents What you need Page 1 Get started Page 3 Paper Non-Resident Licensing Page 10
applications Contents What you need Page 1 Get started Page 3 Paper Non-Resident Licensing Page 10 Welcome to the Na onal Insurance Producer Registry s applications The give producers the ability to quickly
More informationConcurrent Programming
Concurrent Programming 15-213 / 18-213: Introduc2on to Computer Systems 23 rd Lecture, Nov. 14, 2013 Instructors: Randy Bryant, Dave O Hallaron, and Greg Kesden 1 Concurrent Programming is Hard! The human
More informationConSeq: Detecting Concurrency Bugs through Sequential Errors
ConSeq: Detecting Concurrency Bugs through Sequential Errors Wei Zhang 1 Junghee Lim 1 Ramya Olichandran 1 Joel Scherpelz 1 Guoliang Jin 1 Shan Lu 1 Thomas Reps 1,2 1 Computer Sciences Department, University
More informationExploiting Commutativity For Practical Fast Replication. Seo Jin Park and John Ousterhout
Exploiting Commutativity For Practical Fast Replication Seo Jin Park and John Ousterhout Overview Problem: consistent replication adds latency and throughput overheads Why? Replication happens after ordering
More informationMASSACHUSETTS INSTITUTE OF TECHNOLOGY Computer Systems Engineering: Spring Quiz I Solutions
Department of Electrical Engineering and Computer Science MASSACHUSETTS INSTITUTE OF TECHNOLOGY 6.033 Computer Systems Engineering: Spring 2011 Quiz I Solutions There are 10 questions and 12 pages in this
More informationTRANSACTION MANAGEMENT
TRANSACTION MANAGEMENT CS 564- Spring 2018 ACKs: Jeff Naughton, Jignesh Patel, AnHai Doan WHAT IS THIS LECTURE ABOUT? Transaction (TXN) management ACID properties atomicity consistency isolation durability
More information