Course description
Multithreading is a critical aspect of modern programming, allowing developers to create efficient and responsive applications. This course delves into the core concepts and techniques of multithreading in C++, covering essential topics such as multitasking, processes and threads, synchronization problems, memory models, bottlenecks, deadlocks, atomics, and non-blocking algorithms. Through a combination of lectures, hands-on exercises, and real-world examples, students will gain a comprehensive understanding of multithreading principles and best practices.
Course Objectives:
- Understanding Multitasking: Explore the concept of multitasking and its importance in modern computing. Learn how operating systems manage concurrent execution and how C++ facilitates multitasking through processes and threads.
- Processes and Threads: Differentiate between processes and threads and understand their respective advantages and limitations. Learn how to create, manage, and synchronize threads in C++ using standard library facilities.
- Synchronization Problems: Investigate common synchronization problems encountered in multithreaded applications, including the reader-writer problem, producer-consumer problem, dining philosophers problem, bottlenecks, and deadlocks. Implement solutions using synchronization primitives such as mutexes, condition variables, and semaphores.
- Memory Model: Gain insight into the C++ memory model and its implications for multithreaded programming. Explore concepts such as memory ordering, data races, and thread safety, and learn how to write robust and thread-safe code.
- Atomics and Non-blocking Algorithms: Discover the atomic operations and non-blocking algorithms in C++ and their role in writing lock-free and wait-free code. Learn how to use atomic types and operations effectively to achieve concurrency without traditional locking mechanisms.
This course combines theoretical knowledge with practical hands-on exercises to reinforce learning. Lectures will cover fundamental concepts and best practices, supplemented by coding sessions where students will implement multithreaded solutions to various synchronization problems, bottlenecks, and deadlocks.
This course is designed for beginner C++ programmers seeking to deepen their understanding of multithreading concepts and techniques. Software developers, system architects, and anyone involved in designing or maintaining multithreaded applications will benefit from the knowledge and skills gained in this course.
Upon completion of this course, students will have a solid understanding of multithreading fundamentals in C++ and will be equipped with the skills to design, implement, and debug multithreaded applications efficiently. They will be able to identify and mitigate bottlenecks and deadlocks, tackle common synchronization problems, leverage atomic operations and non-blocking algorithms, and write thread-safe and scalable code using modern C++ features.
Upcoming start dates
Who should attend?
Prerequisites
Ability to understand C++ code.
Training content
[Theory – 0.5h] Threads and processes. Concurrency, parallelism, and multithreading
How multitasking is implemented in modern operating systems. What is the difference between parallel and concurrent program execution
[Theory – 0.5h; Practice – 0.5h] Thread creation and interrupting
How to create threads of execution, basic methods of communication between threads
[Theory - 1h] Data races, deadlocks, bottlenecks.
What difficulties usually arise in writing multithreading code, and what problems can they lead to
[Theory – 1h; Practice – 0.5h] Synchronization: semaphores, mutexes and conditional variables.
Synchronizing access to shared resources with various synchronization primitives
[Theory – 3h; Practice - 6h] Classical tasks: reader-writer, producer-consumer, dining philosophers
Common tasks of multithreading programming in examples based on classical problems
[Theory – 1h; Practice – 0.5h] Atomic data types, memory model, lock-free algorithms
How to provide synchronization without mutexes. Atomic operations and memory model
[Theory – 0.5h; Practice - 1h] Thread pools.
Multithreading does not always guarantee high performance. In certain cases, additional solutions are required, such as thread pools.
[Theory – 7.5h (47%); Practice – 8.5h (53%)]
Certification / Credits
Objectives
- Understand the main difficulties in developing concurrent code and ways to overcome them;
- Learn how to use classical synchronization primitives and understand their algorithms and internal representation;
- Review solutions to fundamental problems of concurrent programming and find their analogs in real-life problems;
- Understand lock-free algorithms.
Quick stats about Luxoft Training Center?
More than 200 training courses
Conducted over 1,500 training sessions
Customized training solutions for business
Contact this provider
Luxoft Training Center
Luxoft Training Center — an essential part of the global technology leader, Luxoft, a DXC Technology Company. We play a pivotal role in propelling B2B businesses forward by delivering customized training solutions. Emphasizing the significance of learning and employee development,...