Download presentation
Presentation is loading. Please wait.
1
Multicore Programming Final Review
2
Outline Intro to Parallelism and Concurrency Parallel Programming
Algorithms and Analysis Concurrent Programming Mutual Exclusion and Linearizability Spin Locks Monitors Concurrent Data Structures
3
Intro to Parallelism and Concurrency
Java Multi-thread Programming Start() Join() Parallelism vs. Concurrency Different concerns
4
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
5
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
6
Mutual Exclusion What is mutual exclusion?
How to prove mutual exclusion? Peterson lock guarantees mutual exclusion, starvation-free and dead-lock free
7
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?
8
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.
9
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.
10
Concurrent Data Structures
Linked-list Set Coarse-grained Synchronization Fine-grained Synchronization Optimistic Lazy Lock-free Hand-over-hand Locking
11
考试时间和方式 考试时间:6月27日 19:00 – 21:00 考试方式:开卷 参考资料:上课课件、教材、课堂练习和平时作业
12
考试题型 选择题20题,共40分 简答题 8题,共40分 编程题 (2题 共30分) Fork-Join Framework 求解具体问题
编程题 (2题 共30分) Fork-Join Framework 求解具体问题 使用锁和条件对象实现具体的共享访问协议
13
Thanks for learning this course
Thanks for learning this course! Hoping it is helpful for your future career!
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.