mandatory ファイルロックとは?
mandatory ファイルロックとは、OS が直接強制するロックで、アクセスするプログラムがロックを確認したかどうかに関係なく、競合するアクセスがブロックされるか失敗します。協調に依存する advisory locking とは対照的です。mandatory locking はまれで、多くの場合、特別な mount とファイルの設定を必要とし、脆弱とみなされています。
なぜ重要か
ほとんどの Unix システムは advisory lock を使うため、ロックが mandatory だと思い込むと、共有 CI ストレージで意外な data race を招きかねません。この違いを理解すれば、あるロックが実際にどれだけの保護を提供するのかがはっきりします。
関連ガイド
What Is an Advisory File Lock?An advisory file lock coordinates access only among programs that choose to check for it; the kernel does not…
What Is an Inode?An inode is the on-disk record that stores a file metadata and the location of its data blocks, while the fil…
What Is an Overlay Filesystem?An overlay filesystem stacks a writable layer on top of read-only layers, presenting a merged view while keep…