Load-Link/Store-Conditional
Sign in to saveIn computer science, load-linked/store-conditional (LL/SC), sometimes known as load-reserved/store-conditional (LR/SC), are a pair of instructions used in multithreading to achieve synchronization. Load-link returns the current value of a memory location, while a subsequent store-conditional to the same memory location will store a new value only if no updates have occurred to that location since the load-link. Together, this implements a lock-free, atomic, read-modify-write operation.
Article · 日本語
load-link(ロード・リンク、LL、他に load-linked(ロードリンクト) または load and reserve(ロード・アンド・リザーヴ))と store-conditional(ストア・コンディショナル) (SC) は組み合わせて使用されるコンピュータの命令。これによりロックなしのアトミックなリード・モディファイ・ライト操作が可能となる。(リード・モディファイ・ライトとは、あるメモリ位置の内容を読み取って、変更を加えて、書き戻す一連の操作を意味する) load-link 命令は指定されたメモリ位置の現在の内容を返す。その後の store-conditional 命令は同じメモリ位置へ新たな値を書き込むが、前回の load-link 命令以降にそのメモリ位置の内容が書き換えられていないときだけ書き込みが行われる。何らかの更新がなされていたら、たとえ load-link 命令で読み取った値と同じ内容が書かれていたとしても store-conditional 命令は失敗する。従って、LL/SC命令はコンペア・アンド・スワップ (CAS) 命令のような false positive(フォールス・ポジティヴ)(偽陽性)問題を発生しない。
Abstract from DBpedia / Wikipedia · CC BY-SA