k-mer algorithms: Compare and Swap

Поделиться
HTML-код
  • Опубликовано: 30 июл 2024
  • Dr. Rob Edwards from San Diego State University describes how the compare and swap algorithm works. This is widely used in counting k-mers since it provides a lock-free hashing method.

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

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

    Nice explanation

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

    Nice approach

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

    thanks!

  • @lucasqwert1
    @lucasqwert1 11 месяцев назад

    Why does every thread wait for the log? Thanks !

  • @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).

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

    Is data structures finished here ???? Sir

  • @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 2 месяца назад

      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.

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

    • @Coder_Minds
      @Coder_Minds 23 дня назад

      Is this good playlist