The Future of Concurrency Theory Renaissance or Reformation? (Met dank aan Maurice Herlihy) Frits Vaandrager.

Slides:



Advertisements
Similar presentations
Introduction Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit TexPoint fonts used in EMF. Read the TexPoint manual.
Advertisements

The Art of Multiprocessor Programming Nir Shavit, Ori Shalev CS Spring 2007 (Based on the book by Herlihy and Shavit)
Concurrency Issues Motivation, Problems, Directions Dennis Kafura - CS Operating Systems1.
CS492B Analysis of Concurrent Programs Lock Basics Jaehyuk Huh Computer Science, KAIST.
Multi-Level Caches Vittorio Zaccaria. Preview What you have seen: Data organization, Associativity, Cache size Policies -- how to manage the data once.
A KTEC Center of Excellence 1 Cooperative Caching for Chip Multiprocessors Jichuan Chang and Gurindar S. Sohi University of Wisconsin-Madison.
Microprocessors VLIW Very Long Instruction Word Computing April 18th, 2002.
Introduction Companion slides for
Parallel Processing (CS526) Spring 2012(Week 6).  A parallel algorithm is a group of partitioned tasks that work with each other to solve a large problem.
Prof. Srinidhi Varadarajan Director Center for High-End Computing Systems.
Transactional Memory (TM) Evan Jolley EE 6633 December 7, 2012.
Progress Guarantee for Parallel Programs via Bounded Lock-Freedom Erez Petrank – Technion Madanlal Musuvathi- Microsoft Bjarne Steensgaard - Microsoft.
SYNAR Systems Networking and Architecture Group CMPT 886: Special Topics in Operating Systems and Computer Architecture Dr. Alexandra Fedorova School of.
It Ain’t the Meat, it’s the Notion Why Theory is Essential to Teaching Concurrent Programming Maurice Herlihy Brown University.
1 Lecture 21: Transactional Memory Topics: consistency model recap, introduction to transactional memory.
The Performance of Spin Lock Alternatives for Shared-Memory Microprocessors Thomas E. Anderson Presented by David Woodard.
1 Concurrent and Distributed Systems Introduction 8 lectures on concurrency control in centralised systems - interaction of components in main memory -
CS252/Patterson Lec /23/01 CS213 Parallel Processing Architecture Lecture 7: Multiprocessor Cache Coherency Problem.
The Future of Distributed Computing Renaissance or Reformation? Maurice Herlihy Brown University.
1 New Architectures Need New Languages A triumph of optimism over experience! Ian Watson 3 rd July 2009.
Introduction Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit Modified by Rajeev Alur for CIS 640 at Penn, Spring.
Joram Benham April 2,  Introduction  Motivation  Multicore Processors  Overview, CELL  Advantages of CMPs  Throughput, Latency  Challenges.
1 © R. Guerraoui Seth Gilbert Professor: Rachid Guerraoui Assistants: M. Kapalka and A. Dragojevic Distributed Programming Laboratory.
Multi-Threading and Load Balancing Compiled by Paul TaylorCSE3AGR Stolen mainly from Orion Granatir
Programming Paradigms for Concurrency Part 2: Transactional Memories Vasu Singh
Art of Multiprocessor Programming 1 Transactional Memory Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit.
Transactional Memory Companion slides for The Art of Multiprocessor Programming by Maurice Herlihy & Nir Shavit TexPoint fonts used in EMF. Read the TexPoint.
Parallel and Distributed Systems Instructor: Xin Yuan Department of Computer Science Florida State University.
Multi-Core Architectures
Multi-core Programming Introduction Topics. Topics General Ideas Moore’s Law Amdahl's Law Processes and Threads Concurrency vs. Parallelism.
Lecture 1: Performance EEN 312: Processors: Hardware, Software, and Interfacing Department of Electrical and Computer Engineering Spring 2013, Dr. Rozier.
Transactional Memory The Art of Multiprocessor Programming Herlihy and Shavit.
Håkan Sundell, Chalmers University of Technology 1 NOBLE: A Non-Blocking Inter-Process Communication Library Håkan Sundell Philippas.
1 © R. Guerraoui Concurrent Algorithms (Overview) Prof R. Guerraoui Distributed Programming Laboratory.
1 Computer Architecture Research Overview Focus on: Transactional Memory Rajeev Balasubramonian School of Computing, University of Utah
Operating Systems CSE 411 Multi-processor Operating Systems Multi-processor Operating Systems Dec Lecture 30 Instructor: Bhuvan Urgaonkar.
Parallel Processing Sharing the load. Inside a Processor Chip in Package Circuits Primarily Crystalline Silicon 1 mm – 25 mm on a side 100 million to.
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.
WG5: Applications & Performance Evaluation Pascal Felber
Accessing I/O Devices Processor Memory BUS I/O Device 1 I/O Device 2.
Chapter 1 Performance & Technology Trends Read Sections 1.5, 1.6, and 1.8.
Dr. Alexandra Fedorova School of Computing Science SFU
Kernel Locking Techniques by Robert Love presented by Scott Price.
On the Performance of Window-Based Contention Managers for Transactional Memory Gokarna Sharma and Costas Busch Louisiana State University.
Shared Memory Consistency Models. SMP systems support shared memory abstraction: all processors see the whole memory and can perform memory operations.
Transactional Memory R. Guerraoui, EPFL. Locking is ’’history’’ Lock-freedom is difficult.
CS162 Week 5 Kyle Dewey. Overview Announcements Reactive Imperative Programming Parallelism Software transactional memory.
Caches Where is a block placed in a cache? –Three possible answers  three different types AnywhereFully associativeOnly into one block Direct mappedInto.
1 Lecture #21 Shared Objects and Concurrent Programming This material is not available in the textbook. The online powerpoint presentations contain the.
CS 3204 Operating Systems Godmar Back Lecture 7. 12/12/2015CS 3204 Fall Announcements Project 1 due on Sep 29, 11:59pm Reading: –Read carefully.
CS510 Concurrent Systems Jonathan Walpole. RCU Usage in Linux.
Lecture 27 Multiprocessor Scheduling. Last lecture: VMM Two old problems: CPU virtualization and memory virtualization I/O virtualization Today Issues.
Parallel Data Structures. Story so far Wirth’s motto –Algorithm + Data structure = Program So far, we have studied –parallelism in regular and irregular.
Hardware Trends CSE451 Andrew Whitaker. Motivation Hardware moves quickly OS code tends to stick around for a while “System building” extends way beyond.
Hardware Trends CSE451 Andrew Whitaker. Motivation Hardware moves quickly OS code tends to stick around for a while “System building” extends way beyond.
Commutativity and Coarse-Grained Transactions Maurice Herlihy Brown University Joint work with Eric Koskinen and Matthew Parkinson (POPL 10)
Mutual Exclusion -- Addendum. Mutual Exclusion in Critical Sections.
Novel Paradigms of Parallel Programming Prof. Smruti R. Sarangi IIT Delhi.
Transactional Memory Companion slides for
Conclusions on CS3014 David Gregg Department of Computer Science
Multiprocessor Programming
PHyTM: Persistent Hybrid Transactional Memory
Transactional Memory Companion slides for
Challenges in Concurrent Computing
Transactional Memory Companion slides for
Erlang Multicore support
CSE 153 Design of Operating Systems Winter 19
Programming with Shared Memory Specifying parallelism
I, for one, Welcome our new Multicore Overlords …
Parallel Data Structures
Presentation transcript:

The Future of Concurrency Theory Renaissance or Reformation? (Met dank aan Maurice Herlihy) Frits Vaandrager

Intreedag Le Quatorze Juillet SAN FRANCISCO, May Intel said on Friday that it was scrapping its development of two microprocessors, a move that is a shift in the company's business strategy…. New York Times

Intreedag Moore’s Law Clock speed flattening sharply Transistor count still rising

Intreedag Still on some of your desktops: The Uniprocesor memory cpu

Intreedag In the Enterprise: The Shared Memory Multiprocessor (SMP) cache Bus shared memory cache

Intreedag Your New Desktop: The Multicore Processor (CMP) cache Bus shared memory cache All on the same chip Sun T2000 Niagara

Intreedag Multicores are Here “Learn how the multi-core processor architecture plays a central role in Intel's platform approach. ….” “AMD is leading the industry to multi- core technology for the x86 based computing market …” “Sun's multicore strategy centers around multi-threaded software.... “

Intreedag Renaissance? World (re)discovers Concurrency Theory achievements This has already happened (sort-of) World learns of concurrency results

Intreedag Reformation? Can we respond to the Real World’s challenges? Are we working on problems that matter? Can we recognize what’s going to be important? Bonfire of the Vanities

Intreedag In Classic Antiquity Time cured software bloat Double your path length? –Wait 6 months, until –Processor speed catches up

Intreedag Multiprocessor companies failed in 80s Outstripped by sequential processors Field respected, but not taken seriously Parallelism Didn’t Matter

Intreedag The Old Order Lies in Ruins Six months means more cores, same clock speed Must exploit more parallelism No one really knows how to do this

Intreedag What Keeps Microsoft and Intel awake at Night? If more cores does not deliver more value … Then why upgrade? ?

Intreedag Washing Machine Science? Computers could become like washing machines You don’t trade it in every 2 years for a cooler model You keep it until it breaks

Intreedag No Cores Please, we’re Theorists! Computer Science is driven by Moore’s law Each year we can do things we couldn’t do last year Means funding, students, excitement !

Intreedag With Sudden Relevance Comes Great Responsibility Many challenges involve –Concurrent algorithms –Data structures –Formal models –Complexity & lower bounds, –…–… Stuff we’re good at.

Intreedag Concurrent Programming Today

Intreedag Coarse-Grained Locking Easily made correct … But not scalable.

Intreedag Fine-Grained Locking Here comes trouble …

Intreedag Locks are not Robust If a thread holding a lock is delayed … No one else can make progress

Intreedag

Intreedag Locking Relies on Conventions Relation between –Lock bit and object bits –Exists only in programmer’s mind /* * When a locked buffer is visible to the I/O layer * BH_Launder is set. This means before unlocking * we must clear BH_Launder,mb() on alpha and then * clear BH_Lock, so no reader can see BH_Launder set * on an unlocked buffer and then risk to deadlock. */ Actual comment from Linux Kernel (hat tip: Bradley Kuszmaul)

Intreedag Sadistic Homework enq(x) deq(y) FIFO queue No interference if ends “far enough” apart

Intreedag Sadistic Homework enq(x) deq(y) FIFO queue Interference OK if ends “close enough” together

Intreedag You Try It … One lock? –Too Conservative Locks at each end? –Deadlock, too complicated, etc Publishable result? –Once, maybe still?

Intreedag Downey’s Room Party Problem “A dean of students should keep order in the students' house. In order to do this, he can enter a room with too many students (in order to break up a too large party) or he can enter an empty room to conduct a search. Otherwise, the dean may not enter a room. If the dean is in a room, no additional students may enter, but students may leave. In that case, the dean has to stay until all students have left. There is only one dean, and no limitation on the number of students in one room.”

Intreedag Don’t be Shy Marc Schoolderman (first year CS student from Nijmegen) discovered bugs in published “solution” of Downey using a model checker

Intreedag The Transactional Manifesto What we do now is inadequate to meet the multicore challenge Research Agenda –Replace locking with a transactional API –Design languages to support this model –Implement the run-time to be fast enough

Intreedag Public void enq(item x) { Qnode q = new Qnode(x); q.next = this.tail; this.tail.next = q; } Sadistic Homework Revisited (1) Write sequential Code

Intreedag Public void LeftEnq(item x) { atomic { Qnode q = new Qnode(x); q.next = this.tail; this.tail.next = q; } Sadistic Homework Revisited (1)

Intreedag Public void LeftEnq(item x) { atomic { Qnode q = new Qnode(x); q.next = this.tail; this.tail.next = q; } Sadistic Homework Revisited (1) Enclose in atomic block

Intreedag Warning Not always this simple –Conditional waits –Enhanced concurrency –Complex patterns But often it is –Works for sadistic homework

Intreedag Public void Transfer(Queue q1, q2) { atomic { T x = q1.deq(); q2.enq(x); } Composition (1) Trivial or what?

Intreedag Not All Skittles and Beer Algorithmic choices –Lower bounds –Better algorithms Language design Semantic issues –Like memory models –Atomicity checking

Intreedag Contention Management & Scheduling How to resolve conflicts? Who moves forward and who rolls back? Lots of empirical work but formal work in infancy Judgment of Solomon

Intreedag Strong vs Weak Isolation How do transactional & non-transactional threads synchronize? Similar to memory- model theory? Efficient algorithms?

Intreedag Single Global Lock Semantics? Transactions act as if it acquires SGL Good: –Intuitively appealing Bad: –What about aborted transactions? –Expensive? Need better models

Intreedag Formal Models of Performance Asynchrony

Intreedag Formal Models of Performance Asynchrony Multi-level Memory

Intreedag Formal Models of Performance Asynchrony Multi-level Memory Contention

Intreedag Formal Verification Concurrent algorithms are hard Need routine verification of real algorithms Model checking? Theorem proving? Probably both

Intreedag An Insurmountable Opportunity! Multicore forces us to rethink almost everything

Intreedag An Insurmountable Opportunity! Multicore forces us to rethink almost everything The fate of CS as a vibrant field depends on our success

Intreedag An Insurmountable Opportunity! Multicore forces us to rethink almost everything The fate of CS as a vibrant field depends on our success Concurrency theory has unique insights & advantages

Intreedag An Insurmountable Opportunity! Multicore forces us to rethink almost everything The fate of CS as a vibrant field depends on our success Concurrency theory has unique insights & advantages Are we equal to the task?