Oreilly - Introduction to C++ Concurrency LiveLessons (Video Training)
by | Released October 2014 | ISBN: 0134031504
Introduction to C++ Concurrency LiveLessonsintroduces the principles of concurrency by creating and running simple programs. It not only shows how to write correct code, but also discusses the dangers and pitfalls of concurrency such as data races, deadlocks, livelocks, and more. DescriptionC++ is undergoing rapid changes to support concurrent and parallel programming. The 2011 Standard introduced a new multicore memory model, atomic variables, threads, asynchronous tasks, and synchronization primitives. Work is being done to add even more support in the future. It's no longer enough to just learn some new syntax and library API. There's a need to gain a deeper understanding of the theory and mechanics of concurrency, and Bartosz leads you to that understanding in this video training. About the InstructorBartosz Milewskiis the president of Reliable Software, a company that creates high-quality productivity tools for programmers. His work has been widely published in major journals over the past several years, and he is the author of C++ In Action(Addison-Wesley, 2001). During his eight years at Microsoft, he was the development lead of the Content Index component of Windows 2000. He has taught C++ programming at the University of Wroclaw in Poland and holds a Ph.D. in theoretical physics from the University of Wroclaw. He is also involved with the University of Washington, where he participates in graduate courses and seminars in computer science. He is a member of the advisory board at UW Professional and Continuing Education, advising on C/C++ courses. Skill LevelIntermediate What You Will LearnUnderstanding the principles of concurrency and parallelismUnderstanding the principles of synchronizationWriting multithreaded codeUnderstanding common pitfalls of concurrent programming Who Should Take This CourseAny C++ programmer with some programming experience who is interested in the exciting topic of concurrency Course RequirementsFamiliarity with the C++ language Content DescriptionLesson 1, "Running an Interactive Demo," shows you the difference that concurrency can make in the behavior of an interactive application. You learn about latency and throughput and the difference between concurrency and parallelism.Lesson 2, "Starting and Joining Threads," teaches you how to start a thread and what fork/join parallelism is. It also shows you how to pass arguments to threads and talks about thread construction and destruction.Lesson 3, "Using Threads to Return Values," teaches you how to return data from threads using promises and futures. It shows you how to use async to start threads and tasks and also discusses task-based parallelism.Lesson 4, "Passing Data Between Threads," teaches you more about passing data between threads. You learn what a data race is and how to avoid it. The lesson describes different ways of passing data that don't introduce data races. This knowledge is then used to implement a program that lists directories in parallel.Lesson 5, "Working with Mutexes and Locks," demonstrates how to use a mutex and a critical section to protect shared data from races. You learn the basics of the ownership system, which is a systematic way of preventing data races in concurrent programs. You also learn about the limitations of mutexes and locks and their lack of scalability and composability. You see how easy it is to create deadlocks and how to protect your program from them.Lesson 6, "Using Condition Variables to Communicate," teaches you about the ways threads can communicate with each other. You see a polling example and the use of condition variables. The lesson discusses the client/server architecture, message passing, and the actor model. It also implements a message passing queue and talks about producers and consumers.Lesson 7, "Understanding the Dangers of Atomic Variables," teaches you about the C++ memory model. It explains what sequential consistency is and how it can be broken. You learn about atomic variables and the dangers of lock-free programming. You also see an example of atomicity violation.Lesson 8, "Looking into the Future of C++ Concurrency," teaches you about the future of C++ concurrency. It discusses the new ways of composing futures, asynchronous operations, and resumable functions. You also get a taste of programming using software transactional memory. About LiveLessons Video TrainingLiveLessons Video Training series publishes hundreds of hands-on, expert-led video tutorials covering a wide selection of technology topics designed to teach you the skills you need to succeed. This professional and personal technology video series features world-leading author instructors published by your trusted technology brands: Addison-Wesley, Cisco Press, IBM Press, Pearson IT Certification, Prentice Hall, Sams, and Que. Topics include IT Certification, Programming, Web Development, Mobile Development, Home and Office Technologies, Business and Management, and more. View all LiveLessons on InformIT at http://www.informit.com/livelessons. Show and hide more
- Introduction
- Introduction to C++ Concurrency LiveLessons: Introduction 00:03:27
- Lesson 1: Running an Interactive Demo
- Learning Objectives 00:00:22
- 1.1 Identify an unresponsive application 00:04:38
- 1.2 Observe reduced latency 00:03:27
- 1.3 Observe parallel performance 00:05:05
- Lesson 2: Starting and Joining Threads
- Learning Objectives 00:00:23
- 2.1 Run a thread 00:04:51
- 2.2 Fork multiple threads 00:13:07
- 2.3 Start a thread with arguments 00:15:40
- Lesson 3: Using Threads to Return Values
- Learning Objectives 00:00:23
- 3.1 Create a promise and a future 00:12:06
- 3.2 Start a thread with std::async 00:06:40
- 3.3 Consider using tasks instead of threads 00:04:42
- Lesson 4: Passing Data Between Threads
- Learning Objectives 00:00:30
- 4.1 Understand data races 00:05:58
- 4.2 Pass data by value and move 00:11:18
- 4.3 Pass immutable data between threads 00:08:24
- 4.4 List directories in parallel 00:13:01
- Lesson 5: Working with Mutexes and Locks
- Learning Objectives 00:00:40
- 5.1 Use mutex to protect shared data 00:19:25
- 5.2 Familiarize yourself with ownership systems 00:11:30
- 5.3 Implement a bank account object with a lock 00:08:47
- 5.4 Implement transfer between bank accounts 00:19:05
- 5.5 Discover and fix a deadlock 00:09:28
- Lesson 6: Using Condition Variables to Communicate
- Learning Objectives 00:00:33
- 6.1 Create a polling loop 00:07:05
- 6.2 Use a condition variable 00:11:38
- 6.3 Create a concurrent consumer 00:08:36
- 6.4 Implement message passing queue 00:10:42
- Lesson 7: Understanding the Dangers of Atomic Variables
- Learning Objectives 00:00:28
- 7.1 Understand sequential consistency 00:07:27
- 7.2 Get acquainted with atomic variables 00:03:31
- 7.3 Use atomic variables and run into atomicity violations 00:12:02
- Lesson 8: Looking into the Future of C++ Concurrency
- Learning Objectives 00:00:26
- 8.1 Compose futures using when_all and when_any 00:06:11
- 8.2 Compose futures using "then" and resumable functions 00:09:43
- 8.3 Learn about transactional memory 00:06:07
- Summary
- Introduction to C++ Concurrency LiveLessons: Summary 00:02:22
Show and hide more 9780134031507.introduction.to.c.OR.part1.rar
9780134031507.introduction.to.c.OR.part2.rar