k-mer algorithms: Compare and Swap

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

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

  • @leol5910
    @leol5910 4 года назад +3

    Nice explanation

  • @oladipotimothy6007
    @oladipotimothy6007 2 года назад

    Nice approach

  • @stefansilverio245
    @stefansilverio245 3 года назад +2

    why do we return the "current_value" regardless of whether or not we reset the value at "location"? Wouldn't we want to return the value at "location" if we updated it?

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

      I think that the returned value is used to check that the CAS operation succeeded (current_value == old_value).

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

    I need more explanation, because I don't have much knowledge
    How is CAS atomic? There are multiple operations in the title itself - read, compare and set new value

    • @sas1one
      @sas1one 5 месяцев назад

      At hardware level (Intel CPU) there is an atomic instruction for the compare-and-exchange operation.
      INSTRUCTION SET REFERENCE, A-L, 3-208 Vol. 2A
      "CMPXCHG-Compare and Exchange"
      part of
      Intel® 64 and IA-32 Architectures Software Developer’s Manual
      Volume 2 (2A, 2B, 2C, & 2D): Instruction Set Reference, A-Z.

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

    Why does every thread wait for the log? Thanks !

  • @kkiranayb
    @kkiranayb 4 года назад +1

    Is data structures finished here ???? Sir

  • @pdaae
    @pdaae 5 лет назад +1

    thanks!

  • @shivangisingh2643
    @shivangisingh2643 4 года назад +4

    my whole attention was on how this amazing person is writing backwards/mirrored (whatever it is called). Good explanation though.

    • @kumarprakash8260
      @kumarprakash8260 4 года назад +1

      He's not🤣

    • @ericfricke4512
      @ericfricke4512 3 года назад +4

      He writes forwards facing us, and then it is mirrored in processing afterwards to compensate.

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

      Is this good playlist