Are POSIX' read() and write() system calls atomic?
I am trying to implement a database index based on the data structure (B link tree) and algorithms suggested by Lehman and Yao in this paper . In page 2, the authors state that: The disk is partitioned in sections of fixed size (physical pages; in this paper, these correspond to the nodes of the tree). These are the only units that can be read or written by a process. [emphasis mine] (...) (...) a process is allowed to lock and unlock a disk page. This lock gives that process exclusive modification rights to that page; also, a process must have a page locked in order to modify that page. (...)