Multicore Programming Final Review

Slides:



Advertisements
Similar presentations
1 Interprocess Communication 1. Ways of passing information 2. Guarded critical activities (e.g. updating shared data) 3. Proper sequencing in case of.
Advertisements

Ordered linked list implementation of a set
50.003: Elements of Software Construction Week 6 Thread Safety and Synchronization.
CS492B Analysis of Concurrent Programs Lock Basics Jaehyuk Huh Computer Science, KAIST.
Concurrent Programming Problems OS Spring Concurrency pros and cons Concurrency is good for users –One of the reasons for multiprogramming Working.
Concurrent Programming James Adkison 02/28/2008. What is concurrency? “happens-before relation – A happens before B if A and B belong to the same process.
1 Concurrency Specification. 2 Outline 4 Issues in concurrent systems 4 Programming language support for concurrency 4 Concurrency analysis - A specification.
Lock-free Cache-friendly Software Queue for Decoupled Software Pipelining Student: Chen Wen-Ren Advisor: Wuu Yang 學生 : 陳韋任 指導教授 : 楊武 Abstract Multicore.
It Ain’t the Meat, it’s the Notion Why Theory is Essential to Teaching Concurrent Programming Maurice Herlihy Brown University.
CS533 Concepts of Operating Systems Class 3 Monitors.
1 L49 Multithreading (1). 2 OBJECTIVES  What threads are and why they are useful.  How threads enable you to manage concurrent activities.  The life.
CS533 Concepts of Operating Systems Class 3 Monitors.
OS Spring’04 Concurrency Operating Systems Spring 2004.
Concurrency CS 510: Programming Languages David Walker.
CMPT 300: Operating Systems Review THIS REIVEW SHOULD NOT BE USED AS PREDICTORS OF THE ACTUAL QUESTIONS APPEARING ON THE FINAL EXAM.
Distributed Systems Fall 2009 Replication Fall 20095DV0203 Outline Group communication Fault-tolerant services –Passive and active replication Highly.
CS533 - Concepts of Operating Systems 1 Class Discussion.
02/17/2010CSCI 315 Operating Systems Design1 Process Synchronization Notice: The slides for this lecture have been largely based on those accompanying.
SUPPORTING LOCK-FREE COMPOSITION OF CONCURRENT DATA OBJECTS Daniel Cederman and Philippas Tsigas.
Academic Year 2014 Spring Academic Year 2014 Spring.
Operating Systems CSE 411 CPU Management Oct Lecture 13 Instructor: Bhuvan Urgaonkar.
Synchronization Methods for Multicore Programming Brendan Lynch.
Discussion Week 3 TA: Kyle Dewey. Overview Concurrency overview Synchronization primitives Semaphores Locks Conditions Project #1.
CS4231 Parallel and Distributed Algorithms AY 2006/2007 Semester 2 Lecture 2 (19/01/2006) Instructor: Haifeng YU.
Simple Wait-Free Snapshots for Real-Time Systems with Sporadic Tasks Håkan Sundell Philippas Tsigas.
View-Oriented Parallel Programming for multi-core systems Dr Zhiyi Huang World 45 Univ of Otago.
Oct Multi-threaded Active Objects Ludovic Henrio, Fabrice Huet, Zsolt Istvàn June 2013 –
Programming Paradigms for Concurrency Part 2: Transactional Memories Vasu Singh
Art of Multiprocessor Programming 1 Programming Paradigms for Concurrency Pavol Černý, Vasu Singh, Thomas Wies.
6.3 Peterson’s Solution The two processes share two variables: Int turn; Boolean flag[2] The variable turn indicates whose turn it is to enter the critical.
XOberon Operating System CLAUDIA MARIN CS 550 Fall 2005.
CSC321 Concurrent Programming: §5 Monitors 1 Section 5 Monitors.
More on Semaphores Andy Wang Operating Systems COP 4610 / CGS 5765.
Wait-Free Multi-Word Compare- And-Swap using Greedy Helping and Grabbing Håkan Sundell PDPTA 2009.
1 Condition Variables CS 241 Prof. Brighten Godfrey March 16, 2012 University of Illinois.
HXY Debugging Made by Contents 目录 History of Java MT Sequential & Parallel Different types of bugs Debugging skills.
Debugging Threaded Applications By Andrew Binstock CMPS Parallel.
Thread Synchronization including Mutual Exclusion In Java synchronized keyword Monitor or Lock with conditions Semaphore.
Homework-6 Questions : 2,10,15,22.
Concurrency Idea. 2 Concurrency idea Challenge –Print primes from 1 to Given –Ten-processor multiprocessor –One thread per processor Goal –Get ten-fold.
OS Winter’03 Concurrency. OS Winter’03 Bakery algorithm of Lamport  Critical section algorithm for any n>1  Each time a process is requesting an entry.
Lecture 20: Consistency Models, TM
Prepared by Oussama Jebbar
Multithreading / Concurrency
Håkan Sundell Philippas Tsigas
Lecture 19: Coherence and Synchronization
Critical sections, locking, monitors, etc.
Section 10: Last section! Final review.
Challenges in Concurrent Computing
Anders Gidenstam Håkan Sundell Philippas Tsigas
Definitions Concurrent program – Program that executes multiple instructions at the same time. Process – An executing program (the running JVM for Java.
CSE332: Data Abstractions About the Final
Designing Parallel Algorithms (Synchronization)
Kernel Synchronization II
Lecture 6: Transactions
Yiannis Nikolakopoulos
Shared Memory Programming
Lecture 22: Consistency Models, TM
Lecture: Coherence and Synchronization
Operating Systems Lecture 1.
A Concurrent Lock-Free Priority Queue for Multi-Thread Systems
Kernel Synchronization II
Lecture: Coherence and Synchronization
Lecture: Consistency Models, TM
Monitors and Inter-Process Communication
EECE.4810/EECE.5730 Operating Systems
CSE 542: Operating Systems
Ch 3.
Parallel Programming Exercise Session 11
Synchronization and liveness
Presentation transcript:

Multicore Programming Final Review

Outline Intro to Parallelism and Concurrency Parallel Programming Algorithms and Analysis Concurrent Programming Mutual Exclusion and Linearizability Spin Locks Monitors Concurrent Data Structures

Intro to Parallelism and Concurrency Java Multi-thread Programming Start() Join() Parallelism vs. Concurrency Different concerns

Parallel Programming Sum Array Algorithms Work 、Span and Parallelism start(); join(); fork-join framework;Dag Divide and Conquer Algorithms Prefix-sum, Filter, Parallel Sorting Work 、Span and Parallelism Programming with Divide and Conquer to solve some practical problems

Concurrent Programming Multi-threads access the shared resources Correctness and Efficiency How to describe the correctness of concurrent programs Mutual exclusion Linearizability Deadlock-free Starvation-free Lock-free Wait-free

Mutual Exclusion What is mutual exclusion? How to prove mutual exclusion? Peterson lock guarantees mutual exclusion, starvation-free and dead-lock free

Linearizability Why do we need Linearizability? What is Linearizability? How to decide a linearizable execution history? What is Sequential Consistency? What is the difference and relationship between SC and Lin?

Spin Locks Ideal lock implementations are inefficient What is spin? Spin locks implementation depends on the low-level Archi. Local spin is good for cache hit. TAS, TTAS, CLH, MCS etc.

Monitor Spin wait and blocking Condition await(),signal(),signalAll() Re-check is necessary after being waken. While(B) {x.await()} To avoid lost-wake-up Using signalAll() instead of signal() Programming with monitors.

Concurrent Data Structures Linked-list Set Coarse-grained Synchronization Fine-grained Synchronization Optimistic Lazy Lock-free Hand-over-hand Locking

考试时间和方式 考试时间:6月27日 19:00 – 21:00 考试方式:开卷 参考资料:上课课件、教材、课堂练习和平时作业

考试题型 选择题20题,共40分 简答题 8题,共40分 编程题 (2题 共30分) Fork-Join Framework 求解具体问题 编程题 (2题 共30分) Fork-Join Framework 求解具体问题 使用锁和条件对象实现具体的共享访问协议

Thanks for learning this course Thanks for learning this course! Hoping it is helpful for your future career!