© 2009 Mathew J. Sottile, Timothy G. Mattson, and Craig E Rasmussen 1 Concurrency in Programming Languages Matthew J. Sottile Timothy G. Mattson Craig.

Slides:



Advertisements
Similar presentations
© 2009 Matthew J. Sottile, Timothy G. Mattson, and Craig E Rasmussen 1 Concurrency in Programming Languages Matthew J. Sottile Timothy G. Mattson Craig.
Advertisements

March 18, 2008SSE Meeting 1 Mary Hall Dept. of Computer Science and Information Sciences Institute Multicore Chips and Parallel Programming.
SYNAR Systems Networking and Architecture Group CMPT 886: Special Topics in Operating Systems and Computer Architecture Dr. Alexandra Fedorova School of.
Parallel Programming Henri Bal Rob van Nieuwpoort Vrije Universiteit Amsterdam Faculty of Sciences.
24-January-2003cse SystemRequirements © 2003 University of Washington1 System Requirements CSE 403, Winter 2003 Software Engineering
Lecture 36: Programming Languages & Memory Management Announcements & Review Read Ch GU1 & GU2 Cohoon & Davidson Ch 14 Reges & Stepp Lab 10 set game due.
Introduction  What is an Operating System  What Operating Systems Do  How is it filling our life 1-1 Lecture 1.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. COMPSCI 125 Introduction to Computer Science I.
1 New Architectures Need New Languages A triumph of optimism over experience! Ian Watson 3 rd July 2009.
F2032 Fundamental of OS Chapter 1 Introduction to Operating System Part 4.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 1: Introduction What is an Operating System? Mainframe Systems Desktop Systems.
OPL: Our Pattern Language. Background Design Patterns: Elements of Reusable Object-Oriented Software o Introduced patterns o Very influential book Pattern.
Parallel Programming Henri Bal Vrije Universiteit Amsterdam Faculty of Sciences.
Cambodia-India Entrepreneurship Development Centre - : :.... :-:-
Computer Skills Preparatory Year Presented by: L.Obead Alhadreti.
INTEL CONFIDENTIAL Why Parallel? Why Now? Introduction to Parallel Programming – Part 1.
Contemporary Languages in Parallel Computing Raymond Hummel.
Chapter 1 Database Systems. Good decisions require good information derived from raw facts Data is managed most efficiently when stored in a database.
What is Concurrent Programming? Maram Bani Younes.
1. Human – the end-user of a program – the others in the organization Computer – the machine the program runs on – often split between clients & servers.
Ch 26 & 27 User Interfaces.
LAYING OUT THE FOUNDATIONS. OUTLINE Analyze the project from a technical point of view Analyze and choose the architecture for your application Decide.
Computer System Architectures Computer System Software
1 Programming Multicore Processors Aamir Shafi High Performance Computing Lab
© 2009 Matthew J. Sottile, Timothy G. Mattson, and Craig E Rasmussen 1 Concurrency in Programming Languages Matthew J. Sottile Timothy G. Mattson Craig.
Introduction and Overview Questions answered in this lecture: What is an operating system? How have operating systems evolved? Why study operating systems?
1 INTRODUCTION TO DATABASE MANAGEMENT SYSTEM L E C T U R E
Standard Grade Computing System Software & Operating Systems.
Logistics and Systems Rabby Q. Lavilles. Supply chain is a system of organizations, people, technology, activities, information and resources involved.
UNIT - 1Topic - 2 C OMPUTING E NVIRONMENTS. What is Computing Environment? Computing Environment explains how a collection of computers will process and.
1b.1 Types of Parallel Computers Two principal approaches: Shared memory multiprocessor Distributed memory multicomputer ITCS 4/5145 Parallel Programming,
Distributed Database Systems Overview
Frontiers in Massive Data Analysis Chapter 3.  Difficult to include data from multiple sources  Each organization develops a unique way of representing.
The Worlds of Database Systems From: Ch. 1 of A First Course in Database Systems, by J. D. Pullman and H. Widom.
Systems Software Operating Systems. What is software? Software is the term that we use for all the programs and data that we use with a computer system.
© 2009 Matthew J. Sottile, Timothy G. Mattson, and Craig E Rasmussen 1 Concurrency in Programming Languages Matthew J. Sottile Timothy G. Mattson Craig.
Memory Consistency Models. Outline Review of multi-threaded program execution on uniprocessor Need for memory consistency models Sequential consistency.
Ted Pedersen – CS 3011 – Chapter 10 1 A brief history of computer architectures CISC – complex instruction set computing –Intel x86, VAX –Evolved from.
CSC 351 FUNDAMENTALS OF DATABASE SYSTEMS. LECTURE 1: INTRODUCTION TO DATABASES.
CS4315A. Berrached:CMS:UHD1 Introduction to Operating Systems Chapter 1.
Silberschatz, Galvin and Gagne ©2009Operating System Concepts – 8 th Edition Chapter 4: Threads.
IT 5433 LM1. Learning Objectives Understand key terms in database Explain file processing systems List parts of a database environment Explain types of.
Silberschatz, Galvin and Gagne ©2009Operating System Concepts – 8 th Edition Chapter 4: Threads.
Constructing a system with multiple computers or processors 1 ITCS 4/5145 Parallel Programming, UNC-Charlotte, B. Wilkinson. Jan 13, 2016.
Database Principles: Fundamentals of Design, Implementation, and Management Chapter 1 The Database Approach.
Applied Operating System Concepts
Software Mr. Singh.
COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE
System Programming and administration
Memory Consistency Models
Memory Consistency Models
Chapter 1: Introduction
Chapter 1: Introduction
CSCI/CMPE 3334 Systems Programming
What is Concurrent Programming?
Introduction to Operating Systems
Operating Systems : Overview
Language Processors Application Domain – ideas concerning the behavior of a software. Execution Domain – Ideas implemented in Computer System. Semantic.
Multithreaded Programming
What is Concurrent Programming?
Operating Systems (CS 340 D)
Subject Name: Operating System Concepts Subject Number:
Operating Systems : Overview
Operating Systems : Overview
Operating Systems : Overview
Software - Operating Systems
Vrije Universiteit Amsterdam
Chapter 1: Introduction
Dr. Clincy Professor of CS
Presentation transcript:

© 2009 Mathew J. Sottile, Timothy G. Mattson, and Craig E Rasmussen 1 Concurrency in Programming Languages Matthew J. Sottile Timothy G. Mattson Craig E Rasmussen

© 2009 Mathew J. Sottile, Timothy G. Mattson, and Craig E Rasmussen 2 Chapter 1 Objectives Introduce the topic of concurrency and the current relevance of the topic.

Outline Motivation Where does concurrency appear? Real-world concurrency Timeliness of the topic © 2009 Mathew J. Sottile, Timothy G. Mattson, and Craig E Rasmussen 3

Motivation Concurrency and parallelism have traditionally existed in niche applications. Multicore CPUs and novel architectures (such as GPUs) are bringing the topic to a wider audience. Learning how to deal with widespread and pervasive concurrency is critical for being able to program modern computers. © 2009 Mathew J. Sottile, Timothy G. Mattson, and Craig E Rasmussen 4

Motivation Traditional languages and methods for concurrent programming are: –Awkward: explicit thread management –Error prone: easy to create correctness problems –Difficult for compilation: common language features prohibit automatic parallelization (e.g.: pointers) Languages that are concurrency-aware address these issues for programmers. © 2009 Mathew J. Sottile, Timothy G. Mattson, and Craig E Rasmussen 5

Traditional areas Operating systems –The most common topic where concurrency is taught and addressed is in the context of operating systems design and implementation. Scientific and high-performance computing –For many decades, the HPC and scientific computing areas were the primary source of work on parallelism. Databases and servers –Server-side applications that needed to handle multiple concurrent users. © 2009 Mathew J. Sottile, Timothy G. Mattson, and Craig E Rasmussen 6

Modern areas Any application that is run on a laptop or desktop system with multiple cores can use concurrency for performance gains. –Games –Desktop applications –Development tools –Image and data processing © 2009 Mathew J. Sottile, Timothy G. Mattson, and Craig E Rasmussen 7

Outline Motivation Where does concurrency appear? Real-world concurrency Timeliness of the topic © 2009 Mathew J. Sottile, Timothy G. Mattson, and Craig E Rasmussen 8

Operating systems Managing concurrently operating hardware devices. Multitasking support. Sharing of resources between multiple programs. © 2009 Mathew J. Sottile, Timothy G. Mattson, and Craig E Rasmussen 9

Distributed systems Network-based systems. Servers providing services to multiple clients simultaneously. © 2009 Mathew J. Sottile, Timothy G. Mattson, and Craig E Rasmussen 10

User interfaces Multiple programs running concurrently in a graphical environment. Applications must support both application logic at the same time as handling user interactions. © 2009 Mathew J. Sottile, Timothy G. Mattson, and Craig E Rasmussen 11

Databases Supporting multiple simultaneous accesses to a shared data store. Transactional systems for providing atomic operations. © 2009 Mathew J. Sottile, Timothy G. Mattson, and Craig E Rasmussen 12

Scientific computing Parallel computing: implementing algorithms that use many processors in concert to solve a single problem. Commonly focus on very large data sets that cannot fit in a single computer. © 2009 Mathew J. Sottile, Timothy G. Mattson, and Craig E Rasmussen 13

Outline Motivation Where does concurrency appear? Real-world concurrency Timeliness of the topic © 2009 Mathew J. Sottile, Timothy G. Mattson, and Craig E Rasmussen 14

Is concurrency really “hard”? Concurrent and parallel computing has a reputation of being difficult or confusing. This is a misconception. –In our daily lives outside computers, we are very used to concurrency. We live in a world where multiple activities are always happening at the same time. –The reputation likely comes from the difficulty of traditional tools for dealing with concurrency in a programming context. © 2009 Mathew J. Sottile, Timothy G. Mattson, and Craig E Rasmussen 15

Is concurrency really “hard”? © 2009 Mathew J. Sottile, Timothy G. Mattson, and Craig E Rasmussen 16 “There is therefore nothing new in the basic idea of parallel programming, but only in its application to computers.” S. Gill, 1958

Real world example Everyone has likely cooked a meal at some point. Very often the act of cooking even the simplest of meals involves some degree of concurrency. Let’s consider a simple Italian dish – pasta with sauce. © 2009 Mathew J. Sottile, Timothy G. Mattson, and Craig E Rasmussen 17

Steps in cooking a pasta meal © 2009 Mathew J. Sottile, Timothy G. Mattson, and Craig E Rasmussen 18

Cooking a meal Concurrency is present in a simple cooking activity. Parts of the dish are prepared at the same time as others. –Boiling water and cooking pasta can take place while preparing a tomato sauce. © 2009 Mathew J. Sottile, Timothy G. Mattson, and Craig E Rasmussen 19

Real-world concurrency We perform many day-to-day activities like cooking, where we “multitask” instead of doing everything in a single sequence of activities. It isn’t intimidating to think about multitasking real- world tasks. © 2009 Mathew J. Sottile, Timothy G. Mattson, and Craig E Rasmussen 20

Real-world concurrency The challenge is how to translate this natural way of thinking concurrently into the context of building programs. Can we easily design programs that exploit the same degrees of concurrency as the real world activities that we are comfortable with? © 2009 Mathew J. Sottile, Timothy G. Mattson, and Craig E Rasmussen 21

Outline Motivation Where does concurrency appear? Real-world concurrency Timeliness of the topic © 2009 Mathew J. Sottile, Timothy G. Mattson, and Craig E Rasmussen 22

Concurrency is here Concurrency is unavoidable with modern computers. Nearly all laptops, desktops, and even handheld systems today are based on parallel computing hardware. –Programming them requires addressing issues of concurrency. Concurrency is no longer a niche topic – it touches nearly every area of computing today. © 2009 Mathew J. Sottile, Timothy G. Mattson, and Craig E Rasmussen 23

Approach This book approaches the problem of concurrency at the language level. How does concurrency impact the languages we use to build programs? © 2009 Mathew J. Sottile, Timothy G. Mattson, and Craig E Rasmussen 24

Approach Start with fundamentals: what are the core issues that arise when dealing with concurrency. –Concurrency control –Correctness issues Examine the state of the art Look at history and see how the topic of concurrency has been addressed –Hardware level –Software level © 2009 Mathew J. Sottile, Timothy G. Mattson, and Craig E Rasmussen 25

Approach Look deeper at how concurrency has impacted language development. Consider performance implications of concurrency. Examine design patterns for parallel programming in the context of concurrent programming languages. –In this text, we choose three specific languages to motivate the discussion. OpenMP extensions to C/C++/Fortran The Cilk derivative of C The declarative language Erlang © 2009 Mathew J. Sottile, Timothy G. Mattson, and Craig E Rasmussen 26