images

Mapping Filesystems to Multiprocessor Systems

Once upon a time, filesystem writers (in fact kernel writers in general) didn't have to worry about multiprocessor issues. Certain structures needed protection by locks for the case where a process went to sleep (for example, for an I/O operation) or if interrupts executed code which could attempt to access structures that were being used by the process currently running on the CPU.

All of this changed with the introduction of Symmetric Multiprocessor (SMP)-based systems, where multiple CPUs share the same memory and a single kernel runs across all of the CPUs. In this model, one must assume that threads of execution could be running within any part of the kernel and could attempt to modify any kernel structure at the same time as another thread.

This chapter follows the evolution of UNIX through the earlier Uni-Processor (UP) days through to today's highly scalable SMP-based UNIX implementations. Different types of MP locks are described, as well as how the VERITAS filesystem, VxFS, uses these locks to manage its set of in-core inodes.

Get UNIX Filesystems: Evolution, Design, and Implementation now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.