Software & the Concurrency Revolution by Sutter & Larus ACM Queue Magazine, Sept. 2005 For CMPS 5433 - Halverson 1.

Slides:



Advertisements
Similar presentations
Concurrency Issues Motivation, Problems, Directions Dennis Kafura - CS Operating Systems1.
Advertisements

Multiprocessors— Large vs. Small Scale Multiprocessors— Large vs. Small Scale.
CS492B Analysis of Concurrent Programs Lock Basics Jaehyuk Huh Computer Science, KAIST.
Concurrency The need for speed. Why concurrency? Moore’s law: 1. The number of components on a chip doubles about every 18 months 2. The speed of computation.
© Chinese University, CSE Dept. Software Engineering / Software Engineering Topic 1: Software Engineering: A Preview Your Name: ____________________.
Study of Hurricane and Tornado Operating Systems By Shubhanan Bakre.
The Path to Multi-core Tools Paul Petersen. Multi-coreToolsThePathTo 2 Outline Motivation Where are we now What is easy to do next What is missing.
Transactional Memory (TM) Evan Jolley EE 6633 December 7, 2012.
An Introduction To PARALLEL PROGRAMMING Ing. Andrea Marongiu
Programming Creating programs that run on your PC
DISTRIBUTED AND HIGH-PERFORMANCE COMPUTING CHAPTER 7: SHARED MEMORY PARALLEL PROGRAMMING.
W4118 Operating Systems OS Overview Junfeng Yang.
University of Kansas Construction & Integration of Distributed Systems Jerry James Oct. 30, 2000.
1 New Architectures Need New Languages A triumph of optimism over experience! Ian Watson 3 rd July 2009.
12/1/2005Comp 120 Fall December Three Classes to Go! Questions? Multiprocessors and Parallel Computers –Slides stolen from Leonard McMillan.
Why The Grass May Not Be Greener On The Other Side: A Comparison of Locking vs. Transactional Memory Written by: Paul E. McKenney Jonathan Walpole Maged.
Advances in Language Design
What is Concurrent Programming? Maram Bani Younes.
SEC(R) 2008 Intel® Concurrent Collections for C++ - a model for parallel programming Nikolay Kurtov Software and Services.
CSE 425: Intro to Programming Languages and their Design A Few Key Ideas No particular language is a prerequisite for this course –However you should be.
Computer System Architectures Computer System Software
Lecture 4: Parallel Programming Models. Parallel Programming Models Parallel Programming Models: Data parallelism / Task parallelism Explicit parallelism.
Comparative Programming Languages hussein suleman uct csc304s 2003.
Computer Architecture Computational Models Ola Flygt V ä xj ö University
COMPUTER SOFTWARE Section 2 “System Software: Computer System Management ” CHAPTER 4 Lecture-6/ T. Nouf Almujally 1.
GENERAL CONCEPTS OF OOPS INTRODUCTION With rapidly changing world and highly competitive and versatile nature of industry, the operations are becoming.
LOGO OPERATING SYSTEM Dalia AL-Dabbagh
Operating System Review September 10, 2012Introduction to Computer Security ©2004 Matt Bishop Slide #1-1.
Parallel Programming Models Jihad El-Sana These slides are based on the book: Introduction to Parallel Computing, Blaise Barney, Lawrence Livermore National.
1b.1 Types of Parallel Computers Two principal approaches: Shared memory multiprocessor Distributed memory multicomputer ITCS 4/5145 Parallel Programming,
View-Oriented Parallel Programming for multi-core systems Dr Zhiyi Huang World 45 Univ of Otago.
Introduction, background, jargon Jakub Yaghob. Literature T.G.Mattson, B.A.Sanders, B.L.Massingill: Patterns for Parallel Programming, Addison- Wesley,
Chapter 6 Multiprocessor System. Introduction  Each processor in a multiprocessor system can be executing a different instruction at any time.  The.
SJSU SPRING 2011 PARALLEL COMPUTING Parallel Computing CS 147: Computer Architecture Instructor: Professor Sin-Min Lee Spring 2011 By: Alice Cotti.
Rethinking Hardware and Software for Disciplined Parallelism Sarita V. Adve University of Illinois
Colorama: Architectural Support for Data-Centric Synchronization Luis Ceze, Pablo Montesinos, Christoph von Praun, and Josep Torrellas, HPCA 2007 Shimin.
Spring 2003CSE P5481 Issues in Multiprocessors Which programming model for interprocessor communication shared memory regular loads & stores message passing.
Group 3: Architectural Design for Enhancing Programmability Dean Tullsen, Josep Torrellas, Luis Ceze, Mark Hill, Onur Mutlu, Sampath Kannan, Sarita Adve,
Executing Parallel Programs with Potential Bottlenecks Efficiently Yoshihiro Oyama Kenjiro Taura Akinori Yonezawa {oyama, tau,
Chapter 3 - Language Design Principles
CS510 Concurrent Systems Why the Grass May Not Be Greener on the Other Side: A Comparison of Locking and Transactional Memory.
Lecture 3 : Performance of Parallel Programs Courtesy : MIT Prof. Amarasinghe and Dr. Rabbah’s course note.
Operating Systems: Wrap-Up Questions answered in this lecture: What is an Operating System? Why are operating systems so interesting? What techniques can.
13-1 Chapter 13 Concurrency Topics Introduction Introduction to Subprogram-Level Concurrency Semaphores Monitors Message Passing Java Threads C# Threads.
Survey of multicore architectures Marko Bertogna Scuola Superiore S.Anna, ReTiS Lab, Pisa, Italy.
C H A P T E R E L E V E N Concurrent Programming Programming Languages – Principles and Paradigms by Allen Tucker, Robert Noonan.
3/12/2013Computer Engg, IIT(BHU)1 PARALLEL COMPUTERS- 2.
Martin Kruliš by Martin Kruliš (v1.0)1.
1 Why Threads are a Bad Idea (for most purposes) based on a presentation by John Ousterhout Sun Microsystems Laboratories Threads!
From Use Cases to Implementation 1. Structural and Behavioral Aspects of Collaborations  Two aspects of Collaborations Structural – specifies the static.
Gauss Students’ Views on Multicore Processors Group members: Yu Yang (presenter), Xiaofang Chen, Subodh Sharma, Sarvani Vakkalanka, Anh Vo, Michael DeLisi,
Parallel Computing Presented by Justin Reschke
Testing Concurrent Programs Sri Teja Basava Arpit Sud CSCI 5535: Fundamentals of Programming Languages University of Colorado at Boulder Spring 2010.
From Use Cases to Implementation 1. Mapping Requirements Directly to Design and Code  For many, if not most, of our requirements it is relatively easy.
Language Paradigms CS655.
Java.util.concurrent package. concurrency utilities packages provide a powerful, extensible framework of high-performance threading utilities such as.
Programming paradigms
Coupling and Cohesion Rajni Bhalla.
CS5102 High Performance Computer Systems Thread-Level Parallelism
Chapter 2 Processes and Threads Today 2.1 Processes 2.2 Threads
Parallel and Distributed Simulation Techniques
The Client/Server Database Environment
Parallel Algorithm Design
Challenges in Concurrent Computing
Transactional Memory Semaphores, monitors, and conditional critical regions all suffer from limitations based on lock semantics Naïve synchronization may.
Shared Memory Programming
Background and Motivation
Why Threads Are A Bad Idea (for most purposes)
Why Threads Are A Bad Idea (for most purposes)
Why Threads Are A Bad Idea (for most purposes)
Presentation transcript:

Software & the Concurrency Revolution by Sutter & Larus ACM Queue Magazine, Sept For CMPS Halverson 1

In a Nutshell “The concurrency revolution is primarily a software revolution. The difficult problem is not building multicore hardware, but programming it in a way that lets mainstream applications benefit from the continued exponential growth in CPU performance.” 2

A look back at computing history ENIAC* – 1949 UNIVAC – US Census Bureau –1952 – 2 installations –1953 – 3 installations –1954 – 13 installations IBM – –Punch Card Systems (tabulations) –1951 – IBM : Fortran & Cobol established 3

Software Crisis Rapid growth in hardware Little development in software Consider Apple Computer in 1970’s –vs. IBM in the 1980’s 4

Current State of Parallel HW Distributed systems Multicore chips Graphics processing units (GPU) Etc. Software? Severely Lacking –Similar to 1940’s to 1950’s –Programs may run slower now 5

Turning Point Performance of programs will not increase due to HW improvements Need for asynchronous processing Barriers –It’s hard; new way of thinking –Inadequate tools & languages –Difficult to find concurrency in some applications 6

Concurrency a disruption? Concurrency = high performance –hw, sw, systems, languages w/ will survive Concurrent programming is difficult –Context-sensitivity & Synchronization analysis These are provably undecidable People don’t tend to think concurrently about programming 7

Programming Models Granularity (fine – coarse*) –Extent to which a problem is broken in to smaller parts –Relative measure of the size of a task Degree of Coupling (loosely* – tightly) –Relative measure of dependence of tasks Communication Synchronization Regularity –Regular vs. Irregular parallelism 8

3 Parallel Models Independent Parallelism Inherently, Embarassingly Operations applied independently to each data item Fine grained, uncoupled –E.G. A PU is assigned to each element of a 100 X 100 element array to double the value Coarse grained, uncoupled –E.G. web-based apps, multi-simulations 9

3 Parallel Models (cont’d) Regular Parallelism Apply same operation to collection of data when computations are dependent –Synchronization or dependent results Fine grained –E.G. Array value becomes sum of 4 nhbrs. Coarse grained –E.G. Web apps with access to common DB 10

3 Parallel Models Unstructured Parallelism Most general, least disciplined –Threads w/ synchronization Unpredictable access to shared data Requires explicit synchronization –Messages Via shared memory Via message passing 11

Locks Mechanism for protecting data/code from conflicting or concurrent access (SW) –E.G. Semaphore, Monitor Standard locks don’t work in parallel –Not composable – deadlock –Standard libraries may quit working –Programmers MUST follow all rules! –Global vs. Local procedures –Local synchronization difficult 12

Lock Alternatives Lock-free programming –Use knowledge of memory to design d.s. not needing locking –Difficult, fragile, still publishable Transactional memory –Language – ability to write atomic blocks –Still in research 13

Goal for Programming Languages “Higher-level language abstractions, including evolutionary extensions to current imperative languages, so that existing applications can incrementally become concurrent.” Make concurrency easy to understand –During development –During maintenance 14

3 Methods for Realizing Parallelism Explicit Programming Implicit Programming Automatic Parallelism 15

Explicit Programming for Parallelization Programmer states exactly where concurrency can occur ADV: Programmer can fully exploit concurrent potential DIS: Need higher-level language features & higher level of programming skill 16

Implicit Programming for Parallelization Concurrency hides in libraries or API’s; programmer maintains sequential view ADV: Inexperienced programmers can use concurrency DIS: Cannot realize all concurrency & difficult to design 17

Automatic Parallelization Compiler extracts parallelism in sequential program. ADV: Does the work for us DIS: Has not worked well in practice –Hard for simple languages –Nearly impossible for complex languages (pointers) –Sequential algorithms have little concurrency 18

Imperative vs. Functional Languages Pascal, C, C++, C#, Java Scheme, ML, Haskell Still many issues to be resolved to see if Functional Languages can provide needed features. 19

Abstraction Low-level: Thread & Lock level –Not a good building block, viewpoint High-level: express tasks with inherent concurrency, system schedules on HW –Easier transition to new HW –Easier for programmer 20

High-Level Abstraction Asynchronous call: non-blocking; call made but caller keeps working Future: mechanism for returning result from an asynchronous call; a placeholder for the value Active object: non-standard; each object runs own thread; outside method calls are asynchronous 21

4 Needed Programming Tools Defect detection Debugger Bottleneck detection Testing aids 22

Defect (Error) Detection New types of errors Race conditions & Livelocks –Difficult to reproduce, non-deterministic Modularity & High-level abstraction help Cannot test modules independently –You can, but… Too many possible paths Active research 23

Debuggers Loggers –Track Messages –Causality Trails –Reverse execution 24

Bottleneck Detection Lock Contention Cache Coherence Overheads Lock Convoys 25

Testing Aids Extend Coverage metrics –Not just of statement is executed, but with what other concurrent statements Stress testing –Need extending –Needs determinism 26

REPEAT: In a Nutshell “The concurrency revolution is primarily a software revolution. The difficult problem is not building multicore hardware, but programming it in a way that lets mainstream applications benefit from the continued exponential growth in CPU performance.” 27

Conclusion – Goals Parallel Apps will (again) run faster on new HW New Interfaces Systems designers: focus on concurrency –Operating systems –Languages –Abstractions 28