|
|
The UNIX operating systems were originally implemented for uniprocessor machines, so a number of kernel changes were required to support multiprocessors. These changes are implemented in all SCO OpenServer 5 Release 5 kernels as well as all Open Desktop Release 3.0 systems and the SCO UNIX Release 3.2v4.2 kernel:
Multithreaded drivers must use these locking functions to protect critical code; see ``Protecting critical code''.
System calls such as read(SS) and write(SS) include locking functions around resource access such as updating an inode. In some cases, algorithms were modified to reduce the amount of time that a lock is held, which is critical for good scaling across multiple processors.
Processes that require special device access, such as writing directly to video memory, are restricted to the default processor. The default processor is the CPU that can currently support a given operation. Operations that have not been multithreaded are also restricted to the default processor for the duration of the operation.
All main memory can be accessed by all processors. Cache coherency is maintained by the hardware so that the cache is transparent to the kernel. Mutual exclusion functions such as lockb(D3oddi) and unlockb(D3oddi) are used to ensure that page tables and directories, memory free lists, and other associated structures are not modified simultaneously by different processors.