It will be seen that the large buffers in UNIX are manipulated in a way which is analogous to the operation of hardware cache attached to the main memory of a computer e.g. the PDP11/70.
Buffers are not assigned to any particular program or file, except for very short intervals at a time. In this way a relatively small number of buffers can be shared effectively amongst a large number of programs and files.
Information is left in the buffers until the buffer is needed i.e. immediate “write through” is avoided if only part of the buffer has recently been changed. Programs which read or write records which are small compared with the buffer size are then not penalised unduly.
Finally when programs are terminated and files are closed, the problems of ensuring that the program’s buffers are flushed properly (problems which have plagued other operating systems) have largely disappeared.
There is one area of practical concern: if the decision “when to write” is left to the operating system alone, then some buffers may not be written out for a very long time. Accordingly there is a utility program which runs twice per minute and forces all such buffers to be written out unconditionally. This limits the likely amount of damage that a sudden system crash may cause.