4.69 out of 5
4.69
43 reviews on Udemy

Learn Parallel Computing in Python

Discover Multithreading, Multiprocessing, Concurrency & Parallel programming with practical and fun examples in Python
Instructor:
James Cutajar
335 students enrolled
English [Auto]
Discover how to create responsive and high performance software.
See how to use multithreading and multiprocessing for modeling certain types of problems.
Develop programs with Python that are highly Concurrent and Parallel.
Understand the advantages, limits and properties of Parallel computing.
Improve your programming skills in Python with more advanced, mulithreading and multiprocessing topics.
Learn about threads, processes, mutexes, barriers, waitgroups, queues, pipes, condition variables, deadlocks and more.

The mood in the meeting on the 12th floor of an international investment bank was as bleak as it gets. The developers of the firm met to discuss the best way forward after a critical core application failed and caused a system wide outage.

“Guys, we have a serious issue here. I found out that the outage was caused by a race condition in our code, introduced a while ago and triggered last night.” says Mark Adams, senior developer.

The room goes silent. The cars outside the floor to ceiling windows slowly and silently creep along in the heavy city traffic. The senior developers immediately understand the severity of the situation, realizing that they will now be working around the clock to fix the issue and sort out the mess in the datastore. The less experienced developers understand that a race condition is serious but don’t know exactly what causes it and therefore keep their mouths shut.

Eventually Brian Holmes, delivery manager, breaks the silence with “The application has been running for months without any problems, we haven’t released any code recently, how is it possible that the software just broke down?!”

Everyone shakes their heads and goes back to their desk leaving Brian in the room alone, puzzled. He takes out his phone and googles “race condition”.

Sound familiar? How many times have you heard another developer talking about using threads and concurrent programming to solve a particular problem but out of fear you stayed out of the discussion?

Here’s the little secret that senior developers will never share… Multithreading and Multiprocessing programming is not much harder than normal programming. Developers are scared of concurrent programming because they think it is an advanced topic that only highly experienced developers get to play with.

This is far from the truth. Our minds are very much used to dealing with concurrency. In fact we do this in our everyday life without any problem but somehow we struggle to translate this into our code. One of the reasons for this is that we’re not familiar with the concepts and tools available to us to manage this concurrency. This course is here to help you understand how to use multithreading and multiprocessing tools and concepts to manage your parallel programming. It is designed to be as practical as possible. We start with some theory around parallelism and then explain how the operating system handles multiple processes and threads. Later we move on to explain the multiple tools available by solving example problems using concurrent programming.

In this course we use the Python language, however the concepts learned here can be applied to most programming languages.

All code in this course can be found on github, username/project: cutajarj/multithreadinginpython

Introduction

1
Understanding Parallel Computing
2
More on Parallel Computing
3
Links and Resources for this course

Creating Threads and Processes

1
Processes and Threads
2
Threads in Python and the GIL (Global Interpreter Lock)
3
Creating our first Thread
4
Processes in Python
5
Creating our first Processes

Memory Sharing between Threads

1
Memory Sharing
2
Letter count Implementation
3
Letter count using Memory Sharing

Thread Synchronization with Mutexes

1
Why do we need Synchronization?
2
Adding Mutexes to Letter Count
3
Adding Mutexes to Letter Count Implementation

Waiting for Completed tasks using Joins

1
Understanding Joins
2
File Search Example
3
Concurrent File Search

Synchronization using Condition Variables

1
Introduction to Condition Variables
2
Condition Variables for Wait Groups
3
Implementing Wait Groups with Condition Variables
4
Using Wait Groups

Barriers Explained

1
What’s a Barrier?
2
Example Barrier Application: Matrix Multiplication
3
Matrix Multiplication Implementation
4
Multi Threaded Matrix Multiplication with Barriers
5
Multi Threaded implementation with Barriers

Memory Sharing between Processes

1
How can Processes share Memory?
2
Using Process Memory Sharing
3
Process Memory Sharing in Practice

Communication using Message passing

1
Communication with Pipes and Queues
2
Examples of using Pipes and Queues
3
Pipelining Example
4
Single Process implementation
5
Multi Process implementation
6
Thread and Process Pools
7
Process Pool Example Part 1
8
Process Pool Example Part 2
9
Shoelace algorithm explained (optional)

Avoiding Deadlocks

1
Deadlocking Robots, Philosophers and Trains
2
Simple Deadlock Example
3
Train Deadlock Example Part 1
4
Train Deadlock Example Part 2
5
Solving Deadlocks using Resource Hierarchy
6
Implementing Resource Hierarchy Solution
7
Solving Deadlocks using an Arbitrator
8
Implementing Arbitrator Solution
You can view and review the lecture materials indefinitely, like an on-demand channel.
Definitely! If you have an internet connection, courses on Udemy are available on any device at any time. If you don't have an internet connection, some instructors also let their students download course lectures. That's up to the instructor though, so make sure you get on their good side!
4.7
4.7 out of 5
43 Ratings

Detailed Rating

Stars 5
30
Stars 4
11
Stars 3
1
Stars 2
1
Stars 1
0
30-Day Money-Back Guarantee

Includes

5 hours on-demand video
2 articles
Full lifetime access
Access on mobile and TV
Certificate of Completion
Learn Parallel Computing in Python
Price:
$218.98 $169

Community

For Professionals

For Businesses

We support Sales, Marketing, Account Management and CX professionals. Learn new skills. Share your expertise. Connect with experts. Get inspired.

Community

Partnership Opportunities

Layer 1
samcx.com
Logo
Register New Account
Compare items
  • Total (0)
Compare
0