</p>
<p>There are two types of locking mechanisms: mandatory and advisory. Mandatory systems will actually prevent <code>read()</code>s and <code>write()</code>s to file. Several Unix systems support them. Nevertheless, I’m going to ignore them throughout this document, preferring instead to talk solely about advisory locks. With an advisory lock system, processes can still read and write from a file while it’s locked. Useless? Not quite, since there is a way for a process to check for the existence of 