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.
Пікірлер: 11
@leol59103 жыл бұрын
Nice explanation
@oladipotimothy6007 Жыл бұрын
Nice approach
@pdaae5 жыл бұрын
thanks!
@lucasqwert18 ай бұрын
Why does every thread wait for the log? Thanks !
@stefansilverio2453 жыл бұрын
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 Жыл бұрын
I think that the returned value is used to check that the CAS operation succeeded (current_value == old_value).
@chronewhite4197 Жыл бұрын
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
@kkiranayb4 жыл бұрын
Is data structures finished here ???? Sir
@shivangisingh26434 жыл бұрын
my whole attention was on how this amazing person is writing backwards/mirrored (whatever it is called). Good explanation though.
@kumarprakash82603 жыл бұрын
He's not🤣
@ericfricke45123 жыл бұрын
He writes forwards facing us, and then it is mirrored in processing afterwards to compensate.