In
multiprocessor
Multiprocessing is the use of two or more central processing units (CPUs) within a single computer system. The term also refers to the ability of a system to support more than one processor or the ability to allocate tasks between them. There ar ...
computer systems, software lockout is the issue of performance degradation due to the idle wait times spent by the
CPU
A central processing unit (CPU), also called a central processor, main processor or just processor, is the electronic circuitry that executes instructions comprising a computer program. The CPU performs basic arithmetic, logic, controlling, and ...
s in
kernel
Kernel may refer to:
Computing
* Kernel (operating system), the central component of most operating systems
* Kernel (image processing), a matrix used for image convolution
* Compute kernel, in GPGPU programming
* Kernel method, in machine lea ...
-level
critical section
In concurrent programming, concurrent accesses to shared resources can lead to unexpected or erroneous behavior, so parts of the program where the shared resource is accessed need to be protected in ways that avoid the concurrent access. One way ...
s. Software lockout is the major cause of
scalability
Scalability is the property of a system to handle a growing amount of work by adding resources to the system.
In an economic context, a scalable business model implies that a company can increase sales given increased resources. For example, a ...
degradation in a multiprocessor system, posing a limit on the maximum useful number of processors. To mitigate the phenomenon, the kernel must be designed to have its
critical section
In concurrent programming, concurrent accesses to shared resources can lead to unexpected or erroneous behavior, so parts of the program where the shared resource is accessed need to be protected in ways that avoid the concurrent access. One way ...
s as short as possible, therefore decomposing each
data structure
In computer science, a data structure is a data organization, management, and storage format that is usually chosen for Efficiency, efficient Data access, access to data. More precisely, a data structure is a collection of data values, the rel ...
in smaller substructures.
Kernel-level critical sections
In most multiprocessor systems, each processor schedules and controls itself, therefore there's no "supervisor" processor,
and kernel
data structure
In computer science, a data structure is a data organization, management, and storage format that is usually chosen for Efficiency, efficient Data access, access to data. More precisely, a data structure is a collection of data values, the rel ...
s are globally shared; sections of code that access those shared data structures are
critical section
In concurrent programming, concurrent accesses to shared resources can lead to unexpected or erroneous behavior, so parts of the program where the shared resource is accessed need to be protected in ways that avoid the concurrent access. One way ...
s. This design choice is made to improve scaling, reliability and modularity.
Examples of such kernel data structure are
ready list and
communication channel
A communication channel refers either to a physical transmission medium such as a wire, or to a logical connection over a multiplexed medium such as a radio channel in telecommunications and computer networking. A channel is used for inform ...
s.
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 race
A race condition or race hazard is the condition of an electronics, software, or other system where the system's substantive behavior is dependent on the sequence or timing of other uncontrollable events. It becomes a bug when one or more of t ...
s and
inconsistency, only one processor (
CPU
A central processing unit (CPU), also called a central processor, main processor or just processor, is the electronic circuitry that executes instructions comprising a computer program. The CPU performs basic arithmetic, logic, controlling, and ...
) at a given time is allowed to access a particular
data structure
In computer science, a data structure is a data organization, management, and storage format that is usually chosen for Efficiency, efficient Data access, access to data. More precisely, a data structure is a collection of data values, the rel ...
(a memory portion), while other CPUs trying to access at the same time are
locked-out, waiting in idle status.
[Madnick 1968, p.19]
Three cases can be distinguished when this idle wait is either necessary, convenient, or not convenient. The idle wait is necessary when the access is to a ready list for a low level
scheduling
A schedule or a timetable, as a basic time-management tool, consists of a list of times at which possible tasks, events, or actions are intended to take place, or of a sequence of events in the chronological order in which such things are i ...
operation. The idle wait is not necessary but convenient in the case of a critical section for
synchronization/
IPC
IPC may refer to:
Computing
* Infrastructure protection centre or information security operations center
* Instructions per cycle or instructions per clock, an aspect of central-processing performance
* Inter-process communication, the sharin ...
operations, which require less time than a
context switch
In computing, a context switch is the process of storing the state of a process or thread, so that it can be restored and resume execution at a later point, and then restoring a different, previously saved, state. This allows multiple processes ...
(executing another
process
A process is a series or set of activities that interact to produce a result; it may occur once-only or be recurrent or periodic.
Things called a process include:
Business and management
*Business process, activities that produce a specific se ...
to avoid idle wait). Idle wait is instead not convenient in case of a kernel critical section for
device management, present in
monolithic kernel
A monolithic kernel is an operating system architecture where the entire operating system is working in kernel space. The monolithic model differs from other operating system architectures (such as the microkernel architecture) in that it alone d ...
s only. A
microkernel
In computer science, a microkernel (often abbreviated as μ-kernel) is the near-minimum amount of software that can provide the mechanisms needed to implement an operating system (OS). These mechanisms include low-level address space management, ...
instead falls on just the first two of the above cases.
In a multiprocessor system, most of the conflicts are
kernel
Kernel may refer to:
Computing
* Kernel (operating system), the central component of most operating systems
* Kernel (image processing), a matrix used for image convolution
* Compute kernel, in GPGPU programming
* Kernel method, in machine lea ...
-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
Scalability is the property of a system to handle a growing amount of work by adding resources to the system.
In an economic context, a scalable business model implies that a company can increase sales given increased resources. For example, a ...
and
relative efficiency
In statistics, efficiency is a measure of quality of an estimator, of an experimental design, or of a hypothesis testing procedure. Essentially, a more efficient estimator, needs fewer input data or observations than a less efficient one to achi ...
.
Analytical studies
Taking as parameters the average time interval spent by a
processor in kernel level critical sections (''L'', for time in locked state), and the average time interval spent by a processor in tasks outside critical sections (''E''),
the ratio ''L/E'' is crucial in evaluating software lockout.
Typical values for ''L/E'' range from 0.01 to 0.1.
In a system with a ''L/E'' ratio of 0.05, for instance, if there are 15 CPUs, it is expected that on average 1 CPU will always be idle;
[Madnick 1968, p.20] with 21 CPUs, 2.8 will be idle;
[Raynor 76, p.62] with 40 CPUs, 19 will be idle; with 41 CPUs, 20 will be idle.
Therefore, adding more than 40 CPUs to that system would be useless. In general, for each ''L/E'' value, there's a threshold for the maximum number of useful CPUs.
Software lockout mitigation
To reduce the performance degradation of software lockout to reasonable levels (''L/E'' between 0.05 and 0.1), the kernel and/or the operating system must be designed accordingly. Conceptually, the most valid solution is to decompose each kernel data structure in smaller independent substructures, having each a shorter elaboration time. This allows more than one CPU to access the original data structure.
Many
uniprocessor
A uniprocessor system is defined as a computer system that has a single central processing unit that is used to execute computer tasks. As more and more modern software is able to make use of multiprocessing architectures, such as SMP and MPP, t ...
systems with
hierarchical protection domains have been estimated to spend up to 50% of the time performing "supervisor mode" operations. If such systems were adapted for
multiprocessing
Multiprocessing is the use of two or more central processing units (CPUs) within a single computer system. The term also refers to the ability of a system to support more than one processor or the ability to allocate tasks between them. There ar ...
by setting a lock at any access to "supervisor state", ''L/E'' would easily be greater than 1,
resulting in a system with the same throughput as the uniprocessor despite the number of CPUs.
See also
*
Amdahl's law
* Dependency issues on
Superscalar
A superscalar processor is a CPU that implements a form of parallelism called instruction-level parallelism within a single processor. In contrast to a scalar processor, which can execute at most one single instruction per clock cycle, a sup ...
architectures
*
*
*
Serializability
Notes
References
Madnick, Stuart Elliot
(1968)
Multi-processor software lockout
Proceedings of the 1968 23rd ACM national conference, pp. 19 – 24
* M. Dubois, F. Briggs
The run-time efficiency of parallel asynchronous algorithms
' IEEE Transactions on Computers, November 1991 (Vol. 40, No. 11) pp. 1260–1266
* Randy J. Raynor, John M. Gwynn, Jr.
Minimization of supervisor conflict for multiprocessor computer systems
' ACM SIGSIM Simulation Digest. Volume 7, Issue 4 (July 1976). pp. 61 – 69
Further reading
* Rodgers, David P. (1985)
Improvements in multiprocessor system design' ACM SIGARCH Computer Architecture News archive Volume 13, Issue 3 (June 1985) table of contents Special Issue: Proceedings of the 12th annual
International Symposium on Computer Architecture
The International Symposium on Computer Architecture (ISCA) is an annual academic conference on computer architecture, generally viewed as the top-tier in the field. Association for Computing Machinery's Special Interest Group on Computer Archi ...
(ISCA '85) Pages: 225 - 231 Year of Publication: 1985 . Also published in International Symposium on Computer Architecture, Proceedings of the 12th annual international symposium on Computer architecture, 1985, Boston, Massachusetts, United States
* Jörg Cordsen, Wolfgang Schröder-Preikschat
Towards a Scalable Kernel Architecture' In: Proceedings of the Autumn 1992 Openforum Technical Conference. pp. 15–33, Utrecht, The Netherlands, November 23–27, 1992.
{{DEFAULTSORT:Software Lockout
Computer performance
Concurrency control
Operating system kernels