Skip to content
UdemyIT & SoftwarePaid courseBeginner levelCertificate

Part A - Multithreading & Thread Synchronization - Pthreads (Udemy.com)

Linux POSIX Threads ( Pthreads ), thread Synchronization, Operating System Concepts, C/C++ programming with Projects

Created by: Abhishek CSEPracticals

Last updated June 2025

icon
What you will learn

  • MultiThreading Fundamentals
  • Concurrency
  • Mutual Exclusion Vs Atomocity
  • Thread Synchronization Techniques
  • Writing Thread Safe Codes
  • Mutexes, Semaphores
  • Signaling and Wait
  • Interview Questions

How it compares

Against the other 1,182 rated Udemy courses in IT & Software on CourseDuck:

  • Rating4.5 out of 5higher than 45% of them
  • Reviews866#427 of 1,183 by number of reviews
  • Length16.5 hourslonger than 85% of them
  • Last updatedJune 2025more recently than 50% of them

icon
Course Description

Welcome to the Course Series on Multi-Threading - The Master Class Course on Threads.


This course is for those who want to develop fundamental concepts on Multi-threading and related concepts. In this course, we shall be going to cover Multi-threading concepts based on Pthreads (POSIX threads) on the Linux platform.

Though We use the C language to demonstrate the concepts, concepts hold good for any programming language. This course is equally valuable for C++ programmers. Other language programmers may also find this course useful as we explain Multithreading concepts close to the ground zero levels No Abstraction.

We shall discuss several concepts involved in multithreading and demonstrate each concept through a sample program. Several Important Concepts include but are not limited to - Deadlocks, Mutual Exclusion, Atomicity, Thread Synchronization, Race Conditions, Thread forking, and many more.

In the Next Installment of this course, we shall extend our knowledge of Multi-threading to Advance Concepts, including mini-projects on Multithreading and Thread Synchronization.


At each stage of this Course series, you shall be writing a lot of multi-threaded Codes. So be ready to Master the Multi-threading. Along the journey, we shall cover several interview-favorite topics and Questions to prepare you alongside for interviews.


Best of luck!


Table Of Contents:

= = = ======= = = =

1. Understanding Threads

  • Thread Creation & Termination

  • Race condition on Thread Creation

  • Passing Argument to Thread Function

  • Stack Memory Mgmt for Multi-threaded Programs

  • Thread Scheduling

2. Understanding Concurrency and Parallelism

  • Singlularism Vs Concurrency Vs Parallelism

  • Concurrent Process Design - 2 Examples

  • Threads as Light Weighted Process

  • Overlapping and Non-Overlapping Work

3. Joinable and Detached Threads

  • Joinable Vs Detached Threads

  • How to Join a thread

  • Whom to Join?

  • Sample - Map-Reduce Program

4. Inter Thread Communication

  • Understanding Callbacks and Function Pointers

  • Best way to implement ITC

  • Implementing Notification Chains

    • A Publisher Subscriber Model

    • How to Subscribe/UnSubscribe

    • How to send Notification to Subscribers               

5. Asynchronous Thread Cancellation

  • Thread Cancellation

  • Asynchronous and Deferred Thread Cancellation

  • Problem with Async Thread Cancellation

    • Resource Leaking

    • Invariants

    • Deadlocks

  • Concept of Thread Cleanup Handlers

    • Prevent Resource Leaking                                        

    • Data Structure Corruption - Invariants

    • Cancellation causing Deadlocks

6. Deferred Cancellation

  • Understanding Deferred Cancellation

  • Implementation

7. Listener Threads - Responsibility Delegation

  • Why Listener threads?

  • Designing Listener threads

  • Code Changes and Demo                               

  • Cancellation of blocked Threads

8. Thread Synchronization

  • Critical Section

  • Mutex Rules

  • Mutex Locking

    • Mutex Locking - Code Locking

    • Mutex Locking - Data Locking

  • Mutex based APIs

  • Mutexes in Action

9. Deadlocks

  • What are deadlocks and why do they happen?

  • Necessary conditions for Deadlock to happen

  • Mutex lock Ordering Causing Deadlocks                            

10. Condition Variables

  • Understanding CV

  • CV Vs Mutex

  • Wait( )  &  Signal( )

  • Producer-Consumer Thread Synchronization

  • Spurious Wake Ups

  • Thread Vs Resource Specific CV

  • Broadcasting a CV

  • Implement Producer-Consumer Problem           

11. Dining Philosopher Problem

  • Problem Description

  • Data Structures Setup                           

  • Assignment Program Setup

  • Flowchart/Algorithm Discussion

  • Final Implementation (Step by Step )

12. Semaphores

  • Introduction

  • Semaphores Vs Mutexes 

  • How Semaphore work 

  • Strict Alternation Problem

  • Semaphore Implementation

  • Semaphore Types

  • Strong and Weak Semaphores


Listing Upcoming Advanced Multi-Threading Topics for Sequel Course ( Under Progress )

= = = = = = = = = =  = = = = = =  = = = = = =


1. Pausing and Resuming Threads

2. Thread Pools

3. Standard Problems - Reader/Writer Problem

4. Implementing Thread Barriers

5. Implementing Thread Monitors

6. Solving Sync Problems using Monitors

7. Deadlock Detection and Prevention

8. Wait  Queues

9. Implement Timers using Threads

10. How to fork a multi-threaded process

11. Process Synchronization using Named Semaphores


Happy Learning.


Featured Review

This course is amazing. I'm so glad the instructor decided to offer courses on Udemy. First, it's very rare to find courses on more advanced subject matter. As a software developer, I love learning but am often disappointed that Udemy largely has beginner-oriented material (understandably so). Then there's the CSEPracticals courses. I learned a LOT here. This is some valuable, real world stuff. It's incredibly useful to learn how multi-threading in C is actually applied in real world use cases and to implement these use cases on your own. The instruction was clear, the information valuable. The code samples are plentiful. The instructor is clearly very knowledgeable about networking and so the course examples tend to lean in that direction. I'm very impressed and had a LOT of fun with this course. I can't wait to check out the other ones by CSEPracticals.


icon
Udemy Discount

The discount is applied through our link. Open the course from here and Udemy's current promotional price is applied at checkout on most courses, no code to type.

Some courses are excluded from Udemy's promotions. If the price does not drop, clear your browser cookies and use the button again.

icon
Instructor Details

Abhishek CSEPracticals

I have been engaged with coding and software for a decade now. I am a Networking developer at MNC. My rich working experience is backed by graduation from IIT Bombay as an MTech specialist. I am restless for more in-depth knowledge, and always working out the ways to integrate what I know in practical ways. I am always happy to train and encourage people on Udemy – the next-gen education platform.


I will help you to strengthen the networking concepts and fundamentals in a very practical way. I also hones in System Software Development, Linux System Programming and Network Software Development. I love to create courses on unique non-standard topics, and projects. Check my catalogue, you will find couple of project based courses which you can add to your resume.


You’ll complete assignments and work on a project where you’ll use all the theory. I make sure you build a proper understanding and that you’ll get all the questions and doubts answered. Let me take the privilege to guide you and bring useful additions to your resume !

icon
More courses by Abhishek CSEPracticals

$74.99

$49.99

icon
More IT & Software courses

$49.99

$10.99

$124.99

$19.99

$11.99

$19.99

icon
Reviews

4.5

866 ratings on Udemy

Select a bar to show only those reviews.Select the bar again to show every rating.

By Sachin Hosamani on 2/8/2025

Appreciate the knowledge shared by the tutor very much. Being a developer, I have learnt a lot specially about read/write locks, recursive mutex, suprious wakeup handling. All topics were valueable with hands-on coding. Thank You Abhishek Sir. P.S: The volume level sometimes was not consistent, but it was fine to adjust at times.

By Rakesh Solanki on 12/10/2024

This course is a guide that must refer before entering multi-threading. It revealed more than what I was hoping are there in pthread multi-threading library. While I have still not completed but I think I am missing, how to implement thread local storage using pthread library which is useful for those (old fashion)like me, who don't want to use latest standard of C beyond C99. I hope it will be added to this course. Still overall a lot is covered in this course. I am thankful to the "csepracticals team, specially the instructor" for providing such valuable course.

By Ahmad Saleh on 11/9/2024

Abhishek, as always, provides really valuable content. This course will take you from having no knowledge to a solid intermediate level, which is fantastic. You’ll learn a lot of topics and apply them in practical ways, coding several projects that will make you feel like an expert in threading. Very recommended ! Thanks Abhishek

By Manoj N Chakole on 1/31/2023

So much things about multithreading I have understood in detail; just small request do not add distracting BGM(background music) in video lectures. And one reminder I have not understood, why did you added some of the lectures (such as Thread Barriers, Recursive mutexes, Read-Write locks) in this series again in Part B of this course? But keep as it will be helpful again to revise these lectures. Also please do some more understanding video lectures on Listener threads that will be helpful. And Deadlock Detection Algorithm will always be welcomed in this same multithreading series. Thank you.

By Natnael Teshome on 8/11/2022

Tutorial was going really well, i was taking my time with every section and practicing because this is a topic that i want to master. However, in section 6 when we got to notification chains and i'm looking at the source code gluethread and notif, the instructor wrote the code in a way that is not easy to understand with complex macros (which could've been easier to understand or just functions) and some syntax i have yet to see in my 3 years with C/C++ with no comments!!!! like we understand you can write complex code with complex data structure but could you at least comment your code if you are going to write it that way, this is supposed to be a tutorial, i'm sure it'll become easier to understand once i go through it a couple more times but why make the code hard to realize when it is crucial part of the notification chain. that is my complaint but i can tell the instructor is really knowledgeable of the subject and the course is full of gems.

By Ovais Anzar on 5/21/2022

I have just finished this course, and I cannot recommend it more. Its an excellent course on multi-threading and achieves exactly what it intends to from the start. Some features of this course 1) You write a lot of code, and you become more confident in using the pthread library ( along with some other things, I learned how important proper use of assert function can be). 2) Abishekh goes in depth on different synchronization method and shows you have to build them using fundamental tools like mutex and condition variables. This gives you a lot of confidence, and you can build your own in future in case your chosen OS or library does not have those built-in. This in my opinion is the biggest strength of the course. 3) The team of CSE Practicals is very responsive and you can expect to get a response on your queries within a very reasonable time-frame. Ongoing to the course sequel now. Ovais

By Paul Popovici on 12/17/2021

Very nice course like all courses from this instructor a lot of effort and detail is put into making difficult concepts clear and easy to grasp. I can't wait to start another course from this instructor. I have learnt a lot from him. I don't understand why the last section with glued linked lists was added tou it seems it would belong in another course.

By George Calin on 7/16/2021

Abhishek has that rare superpower of making complex C/C++ system programming feel like a casual chat over coffee—except the coffee is made of pure logic and efficient synchronization primitives. Once more, he shines. I recommend all his courses.

By Matthew Zito on 7/13/2021

This course is amazing. I'm so glad the instructor decided to offer courses on Udemy. First, it's very rare to find courses on more advanced subject matter. As a software developer, I love learning but am often disappointed that Udemy largely has beginner-oriented material (understandably so). Then there's the CSEPracticals courses. I learned a LOT here. This is some valuable, real world stuff. It's incredibly useful to learn how multi-threading in C is actually applied in real world use cases and to implement these use cases on your own. The instruction was clear, the information valuable. The code samples are plentiful. The instructor is clearly very knowledgeable about networking and so the course examples tend to lean in that direction. I'm very impressed and had a LOT of fun with this course. I can't wait to check out the other ones by CSEPracticals.

By Ankitaben Patel on 4/5/2021

Like the course overall. Pros: Really good coverage in terms of Content and depth of subject. Data Structure Synchronization is also nicely covered. Cons: Still two things which are creating annoyance. 1) there is continuous background piano music. It is too distracting. with good quality headphone it is so prominent. Please remove if possible. 2) Presentation is having high contrast with flashy colors. course is for ~12 hours but you cannot watch more than 2 hours due to high contrast. If possible please move to light background + dark font theme at least during explanation of subject. Update: Disappointed with the reply you get on review. Content creator is not at all inclusive. Do not waste time to give review for course.

Showing all 10 reviews on CourseDuck

Read all 866 reviews on Udemy

icon
Quality Score

No CourseDuck member has rated this course yet. Taken it? Give each part a thumbs up or down.

Content Quality
/
Video Quality
/
Qualified Instructor
/
Course Pace
/
Course Depth & Coverage
/

Overall Score : 90 / 100