Parrot: A Practical Runtime for Deterministic, Stable, and Reliable threads HEMING CUI, YI-HONG LIN, HAO LI, XINAN XU, JUNFENG YANG, JIRI SIMSA, BEN BLUM,

Slides:



Advertisements
Similar presentations
PEREGRINE: Efficient Deterministic Multithreading through Schedule Relaxation Heming Cui, Jingyue Wu, John Gallagher, Huayang Guo, Junfeng Yang Software.
Advertisements

Software & Services Group PinPlay: A Framework for Deterministic Replay and Reproducible Analysis of Parallel Programs Harish Patil, Cristiano Pereira,
Silberschatz, Galvin and Gagne ©2009Operating System Concepts – 8 th Edition Chapter 4: Threads.
CHESS: A Systematic Testing Tool for Concurrent Software CSCI6900 George.
Parrot: A Practical Runtime for Deterministic, Stable, and Reliable Threads Heming Cui, Jiri Simsa, Yi-Hong Lin, Hao Li, Ben Blum, Xinan Xu, Junfeng Yang,
1 Concurrency Specification. 2 Outline 4 Issues in concurrent systems 4 Programming language support for concurrency 4 Concurrency analysis - A specification.
CS444/CS544 Operating Systems Introduction to Synchronization 2/07/2007 Prof. Searleman
Race Conditions. Isolated & Non-Isolated Processes Isolated: Do not share state with other processes –The output of process is unaffected by run of other.
Continuously Recording Program Execution for Deterministic Replay Debugging.
October 2003 What Does the Future Hold for Parallel Languages A Computer Architect’s Perspective Josep Torrellas University of Illinois
Threads vs. Processes April 7, 2000 Instructor: Gary Kimura Slides courtesy of Hank Levy.
CS590 Z Software Defect Analysis Xiangyu Zhang. CS590F Software Reliability What is Software Defect Analysis  Given a software program, with or without.
CS Distributed Computing Systems Chin-Chih Chang, An Introduction to Threads.
DoublePlay: Parallelizing Sequential Logging and Replay Kaushik Veeraraghavan Dongyoon Lee, Benjamin Wester, Jessica Ouyang, Peter M. Chen, Jason Flinn,
Threads CNS What is a thread?  an independent unit of execution within a process  a "lightweight process"  an independent unit of execution within.
Silberschatz, Galvin and Gagne ©2009Operating System Concepts – 8 th Edition Chapter 4: Threads.
DTHREADS: Efficient Deterministic Multithreading
Rex: Replication at the Speed of Multi-core Zhenyu Guo, Chuntao Hong, Dong Zhou*, Mao Yang, Lidong Zhou, Li Zhuang Microsoft ResearchCMU* 1.
Discussion Week 3 TA: Kyle Dewey. Overview Concurrency overview Synchronization primitives Semaphores Locks Conditions Project #1.
Concurrency Recitation – 2/24 Nisarg Raval Slides by Prof. Landon Cox.
Computer System Architectures Computer System Software
9/13/20151 Threads ICS 240: Operating Systems –William Albritton Information and Computer Sciences Department at Leeward Community College –Original slides.
Operating System Principles Ku-Yaw Chang Assistant Professor, Department of Computer Science and Information Engineering Da-Yeh.
Microsoft Research Asia Ming Wu, Haoxiang Lin, Xuezheng Liu, Zhenyu Guo, Huayang Guo, Lidong Zhou, Zheng Zhang MIT Fan Long, Xi Wang, Zhilei Xu.
Silberschatz, Galvin and Gagne ©2011Operating System Concepts Essentials – 8 th Edition Chapter 4: Threads.
Silberschatz, Galvin and Gagne ©2009Operating System Concepts – 8 th Edition Chapter 4: Threads.
LiNK: An Operating System Architecture for Network Processors Steve Muir, Jonathan Smith Princeton University, University of Pennsylvania
15-740/ Oct. 17, 2012 Stefan Muller.  Problem: Software is buggy!  More specific problem: Want to make sure software doesn’t have bad property.
- 1 - Dongyoon Lee, Peter Chen, Jason Flinn, Satish Narayanasamy University of Michigan, Ann Arbor Chimera: Hybrid Program Analysis for Determinism * Chimera.
LOOM: Bypassing Races in Live Applications with Execution Filters Jingyue Wu, Heming Cui, Junfeng Yang Columbia University 1.
What Change History Tells Us about Thread Synchronization RUI GU, GUOLIANG JIN, LINHAI SONG, LINJIE ZHU, SHAN LU UNIVERSITY OF WISCONSIN – MADISON, USA.
LATA: A Latency and Throughput- Aware Packet Processing System Author: Jilong Kuang and Laxmi Bhuyan Publisher: DAC 2010 Presenter: Chun-Sheng Hsueh Date:
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 13 Threads Read Ch 5.1.
COMP 111 Threads and concurrency Sept 28, Tufts University Computer Science2 Who is this guy? I am not Prof. Couch Obvious? Sam Guyer New assistant.
Copyright ©: University of Illinois CS 241 Staff1 Threads Systems Concepts.
CS333 Intro to Operating Systems Jonathan Walpole.
Discussion Week 2 TA: Kyle Dewey. Overview Concurrency Process level Thread level MIPS - switch.s Project #1.
Bugs (part 1) CPS210 Spring Papers  Bugs as Deviant Behavior: A General Approach to Inferring Errors in System Code  Dawson Engler  Eraser: A.
Motivation  Parallel programming is difficult  Culprit: Non-determinism Interleaving of parallel threads But required to harness parallelism  Sequential.
Tongping Liu, Charlie Curtsinger, Emery Berger D THREADS : Efficient Deterministic Multithreading Insanity: Doing the same thing over and over again and.
Sound and Precise Analysis of Parallel Programs through Schedule Specialization Jingyue Wu, Yang Tang, Gang Hu, Heming Cui, Junfeng Yang Columbia University.
Polytechnic University of Tirana Faculty of Information Technology Computer Engineering Department A MULTITHREADED SEARCH ENGINE AND TESTING OF MULTITHREADED.
A Memory-hierarchy Conscious and Self-tunable Sorting Library To appear in 2004 International Symposium on Code Generation and Optimization (CGO ’ 04)
U NIVERSITY OF M ASSACHUSETTS A MHERST Department of Computer Science Computer Systems Principles Synchronization Emery Berger and Mark Corner University.
Parallelization Geant4 simulation is an embarrassingly parallel computational problem – each event can possibly be treated independently 1.
State Machine Replication State Machine Replication through transparent distributed protocols State Machine Replication through a shared log.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 4: Threads.
Flashback : A Lightweight Extension for Rollback and Deterministic Replay for Software Debugging Sudarshan M. Srinivasan, Srikanth Kandula, Christopher.
Gauss Students’ Views on Multicore Processors Group members: Yu Yang (presenter), Xiaofang Chen, Subodh Sharma, Sarvani Vakkalanka, Anh Vo, Michael DeLisi,
Soyeon Park, Shan Lu, Yuanyuan Zhou UIUC Reading Group by Theo.
Agenda  Quick Review  Finish Introduction  Java Threads.
Silberschatz, Galvin and Gagne ©2009Operating System Concepts – 8 th Edition Chapter 4: Threads.
2.2 Threads  Process: address space + code execution  There is no law that states that a process cannot have more than one “line” of execution.  Threads:
Silberschatz, Galvin and Gagne ©2009Operating System Concepts – 8 th Edition Chapter 4: Threads.
1 Chapter 5: Threads Overview Multithreading Models & Issues Read Chapter 5 pages
Chapter 4: Threads.
Presented by: Daniel Taylor
Processes and Threads Processes and their scheduling
CS399 New Beginnings Jonathan Walpole.
Operating System (013022) Dr. H. Iwidat
Chapter 4: Multithreaded Programming
Operating System Concepts
Operating Systems (CS 340 D)
Setac: A Phased Deterministic Testing Framework for Scala Actors
Heming Cui, Jingyue Wu, John Gallagher, Huayang Guo, Junfeng Yang
Chapter 4: Threads.
Chapter 4: Threads.
Setac: A Phased Deterministic Testing Framework for Scala Actors
Operating Systems (CS 340 D)
CS 286 Computer Organization and Architecture
Presentation transcript:

Parrot: A Practical Runtime for Deterministic, Stable, and Reliable threads HEMING CUI, YI-HONG LIN, HAO LI, XINAN XU, JUNFENG YANG, JIRI SIMSA, BEN BLUM, GARTH A. GIBSON, AND RANDAL E. BRYANT. Presented by Ramachandra Pai

Outline  Motivation  Traditional and deterministic multithreading models  What is stable multithreading models?  PARROT: A Practical StableMT system  How to use PARROT?  Architecture  Performance  Evaluation 2

The one core era: Good times 3

Multiprocessor era Parallelism gives improved performance but at cost of introducing complexity  Deadlocks  Race conditions  Multiple threads accessing CS  Non-determinism 4

Motivation  Reliable parallelism is considered “something of a black art” because they are so hard to get right! 5

Traditional multithreading  Many to Many mapping  Hard to find concurrency bugs even if the buggy schedule is reproduced 6

How to reduce the order of threads?  Deterministic Multithreading  Examples: Dthreads, Peregrine 7

Is non-determinism the real culprit for all the problems?  Same input + same program -> same output.  But what if the program changes slightly?  We need stability for more reliable code. Hence we move to Stable multithreading models. 8

What is stable multithreading models?  Reduces the number of schedules for all inputs  Does so at the cost of performance. 9

PARROT: A StableMT model  Reduction in schedules  Round robin scheduling.  How do we get performance?  Soft barriers : “parallel scheduling of chosen computations”  Performance critical sections : “Ignore determinism”  Integrated with DBUG 10

Performance hints  Soft Barriers:  Encourages scheduler to co-schedule a group of threads  Scheduler may ignore it if it affects correctness void soba_init(int groupsize, void *key, int timeout); void soba_wait(void *key);  Performance Critical section:  Removes the round robin scheduling  Allows OS to schedule this part of code.  Introduces non-determinism. 11

Example: 12

Example: total order of events 13

How to use PARROT? 14

Total order of events 15

What is DBUG?  Model checking model : checks all the states of a system  Mutually beneficial to both systems  Parrot Reduces the number of schedules. Hence reducing the checking sample space.  DBUG helps check schedules that matter to Parrot and developers. 16

Architecture:  Deterministic Scheduler  Performance hints  Wrapper functions for pthread  Network  Timeout 17

How does parrot perform in the real world?  55 Real world programs  BerkleyDB, database Library  OpenLDAP, server with Lightweight directory Access protocol  Mplayer, video encoder/decoder and player  Pbzip2, a parallel compression utility etc.  53 programs used in benchmarks  15 program in PARSEC  14 in phoenix etc. 18

Performance charts 19

Effects of Soft barriers and Performance critical sections  Reduction of overhead from 510% to 11.9% 20

Evaluation  Easy to use  Performance takes a hit, and sometimes its too bad.  Better than its predecessors in terms of stability and performance. e.g.: Dthreads, Peregrine  Deterministic  Does not solve data races  Easily deployable  Replay Debugging 21

Thank you. Any Questions? 22