Peeking into assembly code to understand why count++ is not atomic

  Рет қаралды 9,529

Arpit Bhayani

Arpit Bhayani

Күн бұрын

Пікірлер: 17
@piyushpathak1186
@piyushpathak1186 Жыл бұрын
I pay my internet bill for this type of content
@Sanjay-pu4sp
@Sanjay-pu4sp Жыл бұрын
You have a real gift for teaching mate. Thanks so much!
@adrishray9179
@adrishray9179 Жыл бұрын
Very nicely explained. Love it when when ppl use pens and drawings to teach. The internet needs this type of content
@shishirchaurasiya7374
@shishirchaurasiya7374 Жыл бұрын
I am watching the series the second time, and I can't explain how much clarity in my brain these concepts are getting injected, amazing arpit sir ❤
@prateekraj1084
@prateekraj1084 Жыл бұрын
Awesome explanation of such a building block concept.
@divyachauhan3478
@divyachauhan3478 Жыл бұрын
I learned this coming from non cse background. So amazing content
@viktoreidrien7110
@viktoreidrien7110 Жыл бұрын
Superb video, thanks.
@princekha4540
@princekha4540 Жыл бұрын
Thanks for the video, bro 🙌
@yogeshedekar6078
@yogeshedekar6078 Жыл бұрын
This reminded me of my Microprocessor practiclas where we would code using JMP for loops on a set of keyboard and small monitor. Amazing though, hard to find such deapth for any of the concurrency lectures.
@rahulsangvikar7973
@rahulsangvikar7973 7 ай бұрын
Why do we need 2 mov micro instructions? Why couldn't we just use something like addl $1, %rdi as a single micro instruction? Also, adding just 1 to a number "binarily" is extremely efficient right? It's much faster than adding any other number, so why couldn't we handle this as a special case?
@MOHDSALMAN-sj2zu
@MOHDSALMAN-sj2zu Жыл бұрын
Hi Arpit, Thank you for this explanation. It was really helpful. Could you please also provide an explanation of how the count++ and ++count expressions execute in the context of multithreading?
@ShubhamSharma-ky2tf
@ShubhamSharma-ky2tf 5 ай бұрын
I wish one day I could be as smart as Arpit Bhayani
@HA-ky5vd
@HA-ky5vd 5 ай бұрын
The name 'Asli Engineering' truly reflects the content on this channel.
@rishabhsharma5050
@rishabhsharma5050 Жыл бұрын
So whats the solution to make it safe
@AsliEngineering
@AsliEngineering Жыл бұрын
Locking - optimistic and pessimistic. Videos on those topics are already out on my channel.
@rajibmajumder9564
@rajibmajumder9564 Жыл бұрын
std::atomic count; count++;
@spartans-garage
@spartans-garage 6 ай бұрын
awesome
Optimistic Locking - What, When, Why, and How?
16:34
Arpit Bhayani
Рет қаралды 16 М.
How to write efficient and fair multi-threaded programs?
19:26
Arpit Bhayani
Рет қаралды 32 М.
СИНИЙ ИНЕЙ УЖЕ ВЫШЕЛ!❄️
01:01
DO$HIK
Рет қаралды 3,3 МЛН
Quando A Diferença De Altura É Muito Grande 😲😂
00:12
Mari Maria
Рет қаралды 45 МЛН
Гениальное изобретение из обычного стаканчика!
00:31
Лютая физика | Олимпиадная физика
Рет қаралды 4,8 МЛН
IL'HAN - Qalqam | Official Music Video
03:17
Ilhan Ihsanov
Рет қаралды 700 М.
How to write a Concurrent Thread-safe Queue from scratch?
17:14
Arpit Bhayani
Рет қаралды 14 М.
Querying 100 Billion Rows using SQL, 7 TB in a single table
9:07
Arpit Agrawal (Elastiq.AI)
Рет қаралды 57 М.
Load Balancers are not Magic - Dissecting Atlassian Outage
13:07
Arpit Bhayani
Рет қаралды 40 М.
Understanding Pessimistic Locking with Mutex
10:10
Arpit Bhayani
Рет қаралды 10 М.
How to write deadlock free code?
21:11
Arpit Bhayani
Рет қаралды 9 М.
СИНИЙ ИНЕЙ УЖЕ ВЫШЕЛ!❄️
01:01
DO$HIK
Рет қаралды 3,3 МЛН