Scheduling on Multiple CPUs

Early versions of OpenVMS supported only computers with one CPU. At that time, OpenVMS had a special process called the NULL process that ran at the lowest possible priority and did no real work. Its only purpose was to consume CPU cycles whenever the machine was otherwise idle. This provided an easy solution to an otherwise complex scheduling problem.

These early versions also synchronized access to important resources using the interrupt priority level (IPL) mechanism. Each CPU has a special register indicating its current IPL. In order to access a certain resource, the CPU has to raise its IPL to the proper level, access the data, and then lower its IPL. Interrupts of lower priorities are blocked until the CPU lowered its IPL. This technique prevented accidental damage to the data by preventing overlapping accesses.

VAX/VMS Version 5 introduced support for symmetric multiprocessing (SMP), the ability to support multiple CPUs running at once. The introduction of additional CPUs meant that the system could execute more than one process at a time, one per CPU. However, it also meant that the traditional synchronization methods would no longer be sufficient.

With multiple CPUs, IPL is no longer adequate to synchronize access to critical data structures. Since IPL is specific to each CPU, a CPU could access a critical data structure regardless of the IPL of any other CPU. To solve this problem, spinlocks were added. A spinlock is a software construct maintained by OpenVMS, with a rank correlating to the IPL level it supplements. In modern versions of OpenVMS, a CPU raises its IPL as well as acquiring the proper spinlock to access a particular data structure. A given IPL may have several associated spinlocks, each protecting a specific group of data structures.

The NULL process has also been removed. Now, when there are no ready processes, the extra CPU cycles are taken up by a routine within the scheduler code. While idle, each CPU continually checks to see whether a process has become ready.



Getting Started with OpenVMS(c) A Guide for New Users
Getting Started with OpenVMS: A Guide for New Users (HP Technologies)
ISBN: 1555582796
EAN: 2147483647
Year: 2005
Pages: 215

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net