(12) Linux: What is the difference between advisory lock and mandatory lock? - Quora
Advisory Locking is a cooperative locking scheme where the participating processes need to follow/obey a locking protocol. As long as the processes follow the locking protocol/API and respect its return values, the underlying API takes care that file locking semantics work correctly.
In other words, this is not an enforced locking scheme. Let's say a process P1 has taken an advisory file read lock on file F, there is absolutely nothing done by operating system or the file locking facility to prevent any other process P2 from going ahead and concurrently modifying the file F through write system call even though it is already read locked by a different process.
Read full article from (12) Linux: What is the difference between advisory lock and mandatory lock? - Quora
No comments:
Post a Comment