O Que É um Advisory File Lock?
Um advisory file lock é um lock cooperativo sobre um arquivo que funciona somente se todos os programas participantes testarem e respeitarem voluntariamente o lock antes de acessar o arquivo. O sistema operacional rastreia o lock, mas não bloqueia um processo que simplesmente o ignora e escreve mesmo assim. É o estilo de locking mais comum nos sistemas Unix.
Por que isso importa
Ferramentas que protegem um cache compartilhado ou um lockfile no CI dependem de advisory locks, então um processo que não os honra ainda pode corromper o estado compartilhado. Saber que os locks são advisory explica por que um lockfile só ajuda quando todo escritor coopera.
Guias relacionados
What Is a Mandatory File Lock?A mandatory file lock is enforced by the kernel, blocking conflicting reads or writes even from programs that…
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 the Sticky Bit?The sticky bit on a directory restricts file deletion so users can remove only their own files, even in a dir…