Software Lockout - Kernel-level Critical Sections

Kernel-level Critical Sections

In most multiprocessor systems, each processor schedules and controls itself, therefore there's no "supervisor" processor, and kernel data structures are globally shared; sections of code that access those shared data structures are critical sections. This design choice is made to improve scaling, reliability and modularity. Examples of such kernel data structure are ready list and communication channels.

A "conflict" happens when more than one processor is trying to access the same resource (a memory portion) at the same time. To prevent critical races and inconsistency, only one processor (CPU) at a given time is allowed to access a particular data structure (a memory portion), while other CPUs trying to access at the same time are locked-out, waiting in idle status.

Three cases can be distinguished when this idle wait is (1) necessary (2) convenient and (3) not convenient. The idle wait is necessary when the access is to a ready list for a low level scheduling operation. The idle wait is not necessary but convenient in the case of a critical section for a synchronization/IPC operations, which require less time than a context switch (executing another process to avoid idle wait). Idle wait is instead not convenient in case of a kernel critical section for device management, present in monolithic kernels only. A microkernel instead falls on just the first two of the above cases.

In a multiprocessor system, most of the conflicts are kernel-level conflicts, due to the access to the kernel level critical sections, and thus the idle wait periods generated by them have a major impact in performance degradation. This idle wait time increases the average number of idle processors and thus decreases scalability and relative efficiency.

Read more about this topic:  Software Lockout

Famous quotes containing the words critical and/or sections:

    Post-modernism has cut off the present from all futures. The daily media add to this by cutting off the past. Which means that critical opinion is often orphaned in the present.
    John Berger (b. 1926)

    I have a new method of poetry. All you got to do is look over your notebooks ... or lay down on a couch, and think of anything that comes into your head, especially the miseries.... Then arrange in lines of two, three or four words each, don’t bother about sentences, in sections of two, three or four lines each.
    Allen Ginsberg (b. 1926)