Mandatory locking Mandatory locking is enforced by the kernel Doesn't rely on processes checking for locks. Occur automatically when a program uses flock(), lockf(), or fcntl(). If a program puts a 'read' or 'shared' lock on a file, no other processes can write to it . If a program puts a 'write' or 'exclusive' lock on a file, no other processes can read or write to it.