Войти в систему

Home
    - Создать дневник
    - Написать в дневник
       - Подробный режим

LJ.Rossia.org
    - Новости сайта
    - Общие настройки
    - Sitemap
    - Оплата
    - ljr-fif

Редактировать...
    - Настройки
    - Список друзей
    - Дневник
    - Картинки
    - Пароль
    - Вид дневника

Сообщества

Настроить S2

Помощь
    - Забыли пароль?
    - FAQ
    - Тех. поддержка



Пишет LWN.net ([info]syn_lwnheadline)
@ 2021-03-12 14:47:00


Previous Entry  Add to memories!  Tell a Friend!  Next Entry
[$] Lockless patterns: an introduction to compare-and-swap
In the first part of this series, I showed you the theory behind
concurrent memory models and how that theory can be applied to
simple loads and stores. However, loads and stores alone are not
a practical tool for the building of higher-level synchronization primitives
such as spinlocks, mutexes, and condition variables.
Even though it is possible to synchronize two threads using the
full memory-barrier pattern that was introduced last week (Dekker's
algorithm
), modern processors provide a way that is
easier, more generic, and faster—yes, all three of them—the
compare-and-swap operation.


(Читать комментарии) (Добавить комментарий)