Threading (Part 9): Selecting different methods

  Рет қаралды 186

Dhananjai Rao

Dhananjai Rao

Күн бұрын

This video is part of a series of presentations covering the
key concepts of multithreading and synchronization. This
presentation, provides a summary of the different approaches and provides suggestions for selecting one of the many different approaches for multithreading an algorithm. This presentation first reviews synchronization-free approaches using std::async, data parallel approaches, and using reduction. Next, the presentation provides suggestions for selecting approaches that involve synchronization. First it covers approaches requiring the use of only 1 shared resource using either std::atomic or std::mutex + std::lock_guard. Next it suggests using the producer-consumer model for situations where threads are performing very diverse operations. For the producer-consumer model it summarizes busy-wait vs. sleep-wakeup approaches for implementation. Finally it covers scenarios where multiple mutex need to be locked simultaneously, reminding us of the Dining philosopher's model.

Пікірлер
Smart Sigma Kid #funny #sigma #comedy
00:25
CRAZY GREAPA
Рет қаралды 38 МЛН
LOVE LETTER - POPPY PLAYTIME CHAPTER 3 | GH'S ANIMATION
00:15
HAPPY BIRTHDAY @mozabrick 🎉 #cat #funny
00:36
SOFIADELMONSTRO
Рет қаралды 17 МЛН
Smart Sigma Kid #funny #sigma #comedy
00:25
CRAZY GREAPA
Рет қаралды 38 МЛН