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

Поделиться
HTML-код
  • Опубликовано: 25 окт 2024

Комментарии • 17

  • @piyushpathak1186
    @piyushpathak1186 Год назад +40

    I pay my internet bill for this type of content

  • @Sanjay-pu4sp
    @Sanjay-pu4sp Год назад +4

    You have a real gift for teaching mate. Thanks so much!

  • @adrishray9179
    @adrishray9179 Год назад +1

    Very nicely explained. Love it when when ppl use pens and drawings to teach. The internet needs this type of content

  • @prateekraj1084
    @prateekraj1084 9 месяцев назад

    Awesome explanation of such a building block concept.

  • @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 ❤

  • @divyachauhan3478
    @divyachauhan3478 Год назад +1

    I learned this coming from non cse background. So amazing content

  • @viktoreidrien7110
    @viktoreidrien7110 Год назад +1

    Superb video, thanks.

  • @princekha4540
    @princekha4540 Год назад

    Thanks for the video, bro 🙌

  • @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?

  • @yogeshedekar6078
    @yogeshedekar6078 10 месяцев назад

    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.

  • @HA-ky5vd
    @HA-ky5vd 2 месяца назад

    The name 'Asli Engineering' truly reflects the content on this channel.

  • @rahulsangvikar7973
    @rahulsangvikar7973 4 месяца назад

    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?

  • @ShubhamSharma-ky2tf
    @ShubhamSharma-ky2tf 2 месяца назад

    I wish one day I could be as smart as Arpit Bhayani

  • @anishdabhane9132
    @anishdabhane9132 3 месяца назад

    awesome

  • @rishabhsharma5050
    @rishabhsharma5050 Год назад

    So whats the solution to make it safe

    • @AsliEngineering
      @AsliEngineering  Год назад +2

      Locking - optimistic and pessimistic. Videos on those topics are already out on my channel.

    • @rajibmajumder9564
      @rajibmajumder9564 Год назад

      std::atomic count; count++;