Process management (computing): Difference between revisions

Content deleted Content added
m Gramatical Change: Change to capitalisation and plural words
Nash48 (talk | contribs)
copy editing
Line 115:
 
== The Kernel system concept ==
 
{{Repetition section|date=November 2023}}<!-- This appears to be a second section in a row describing CPU modes. -->
 
The parts of the [[operating system|OS]] that are critical to its correct operation execute in [[kernel mode]], while other [[software]] (such as generic system software) and all application programs execute in [[user mode]]. This serves as the fundamental distinction between the operating system and other [[system software]]. The part of the system executing in the kernel supervisor state is called the [[kernel (computer science)|kernel]], or nucleus, of the [[operating system]]. The kernel operates as trusted software, meaning that when it was designed and implemented, it was intended to implement protection mechanisms that could not be covertly changed through the actions of untrusted software executing in user space. Extensions to the OS execute in [[user mode]], so the OS does not rely on the correctness of those parts of the system software for the correct operation of the OS. Hence, a fundamental design decision for any function to be incorporated into the OS is whether it needs to be implemented in the kernel. If it is implemented in the kernel, it will execute in kernel (supervisor) space, and have access to other parts of the kernel. It will also be trusted software by the other parts of the kernel. If the function is implemented to execute in [[user mode]], it will have no access to kernel data structures. However, the advantage is that it will normally require very limited effort to invoke the function. While kernel-implemented functions may be easy to implement, the trap mechanism and authentication at the time of the call are usually relatively expensive. The kernel code runs fast, but there is a large performance overhead in the actual call. This is a subtle, but important point.
The critical parts of the [[operating system|OS]] run in [[kernel mode]], while other [[software]] (such as system utilities and application programs) run in [[user mode]]. This serves as the fundamental distinction between the OS and other [[system software]]. The part of the system executing in the kernel mode is called the [[kernel (computer science)|kernel]], or nucleus, of the OS. The kernel is designed as trusted software, meaning it implements protection mechanisms that cannot be covertly modified by untrusted software running in user mode. Extensions to the OS operate in [[user mode]], so the core functionality of the OS does not depend on these extensions for its correct operation.
 
A key design decision for any OS function is determining whether it should be implemented in the kernel. If implemented in the kernel, it operates in kernel mode, gaining access to other parts of the kernel and being trusted by them. Conversely, if the function executes in [[user mode]], it lacks access to kernel data structures but requires minimal effort to invoke. Although functions implemented in the kernel can be straightforward, the [[trap (computing)|trap mechanism]] and authentication process required during the call can be relatively resource-intensive. While the kernel code itself runs efficiently, the overhead associated with the call can be significant. This is a subtle but important distinction.
 
== Requesting system services ==