Python Parallel and Concurrent Programming Part 1
2h 12mAdvanced2019-08-29
Authors

Barron Stone
Electrical Engineer

Olivia Chiu Stone
Programmer, Engineer
Course details
Parallel programming unlocks a program’s ability to execute multiple instructions simultaneously, increases the overall processing throughput, and is key to writing faster and more efficient applications. Curious about how parallel programming works in the real world? In this course, join instructors Barron and Olivia Stone as they introduce the basics of parallel programming in Python, providing the foundational knowledge you need to write more efficient, performant code. Barron and Olivia explain concepts like threading and mutual exclusion in a fun and informative way, relating them to everyday activities you perform in the kitchen. To cement the ideas, they demo them in action using Python. Each lesson is short and practical, driving home the theory with hands-on techniques.
Learning objectives
Sequential vs. parallel computing
Shared vs. distributed memory
Using multiples threads and processes
Basic stages of a thread lifecycle
Preventing data races
Enforcing mutual exclusion
Locks
Checking for liveness
Learning objectives
Sequential vs. parallel computing
Shared vs. distributed memory
Using multiples threads and processes
Basic stages of a thread lifecycle
Preventing data races
Enforcing mutual exclusion
Locks
Checking for liveness
Skills covered
Programming FoundationsPythonFoundationsProgramming LanguagesOpen SourceSoftware Development
Concepts
Introduction
- Learn parallel programming basics
- What you should know
- Exercise files
Parallel Computing Hardware
- Sequential vs. parallel computing
- Parallel computing architectures
- Shared vs. distributed memory
Threads and Processes
- Thread vs. process
- Concurrent vs. parallel execution
- Global interpreter lock - Python demo
- Multiple threads - Python demo
- Multiple processes - Python demo
- Execution scheduling
- Execution scheduling - Python demo
- Thread lifecycle
- Thread lifecycle - Python demo
- Daemon thread
- Daemon thread - Python demo
Mutual Exclusion
- Data race
- Data race - Python demo
- Mutual exclusion
- Mutual exclusion - Python demo
Locks
- Reentrant lock
- Rlock - Python demo
- Try lock
- Non-blocking acquire - Python demo
- Read-write lock
- Read-write lock - Python demo
Liveness
- Deadlock
- Deadlock - Python demo
- Abandoned lock
- Abandoned lock - Python demo
- Starvation
- Starvation - Python demo
- Livelock
- Livelock - Python demo
Conclusion
- Next steps