Load-link/store-conditional

来自维基百科,自由的百科全书

在電腦科學中,load-linked/store-conditional(LL/SC),也會被稱作load-reserved/store-conditional (LR/SC)load-linkstore-conditional (LL/SC)是一對用於並行同步訪問主記憶體的CPU指令。Load-link返回主記憶體位置處的當前值,隨後的store-conditional在該主記憶體位置處儲存新值(如果從load-link後沒有被修改)。這被用於實現無鎖演算法英語Non-blocking_algorithmread-modify-write原子操作。

歷史

LL/SC最初是Jensen, Hagensen, Broughton在勞倫斯利佛摩國家實驗室S-1 AAP multiprocessor頁面存檔備份,存於網際網路檔案館)而設計。

實現

LL/SC指令被下述架構支援:

LL/SC的硬體實現典型地不允許巢狀LL/SC對。[1] 巢狀的LL/SC機制用於提供MCAS原語(多字Compare-And-Swap,字可以是分布的)。[2] 2013年Trevor Brown, Faith Ellen, Eric Ruppert軟體實現了多位址LL/SC擴充。[3]這被用來最佳化二元搜尋樹。[4]

參見

參考文獻

Loading related searches...

Wikiwand - on

Seamless Wikipedia browsing. On steroids.