Changes to Kernel (operating system)

TechWritereditor · 5 Dec 2026, 01:53 · “Expanded with more content and sources”

+ added − removed compared with the version of 4 Dec 2026, 21:27

Article

Removed: The **kernel** is the core code of an [[Operating system]], the lowest-level software that provides the basic services other programs rely on.[^1] It sits between a computer's hardware and the programs running on it, and manages the machine's resources.[^2]
Added: The **kernel** is the core code of an [[Operating system]]: the lowest layer of software, which supplies the basic services that every other program depends on.[^1] It acts as the main go-between for a computer's hardware and the processes running on it, deciding how the machine's resources are shared out.[^2]
 
## What it does
Removed: Processors can run in a privileged "kernel mode" or a restricted "user mode". The kernel runs in kernel mode, where it can carry out privileged operations such as setting up memory mapping, changing processor modes and performing input and output, while ordinary applications run in user mode and can touch only their own memory.[^1][^3] Typical kernel jobs include managing memory, deciding which processes use the processor and for how long, handling interrupts, and running device drivers that connect programs to hardware.[^1][^2]
 
Removed: Programs request the kernel's help through system calls, which cover tasks such as creating processes, managing memory and files, and talking to devices.[^3][^2] A library routine places the request's details in processor registers and triggers a "trap" that switches the processor into kernel mode.[^3] The number of system calls varies widely: about 45 in Sixth Edition [[Unix]] and about 250 in [[Linux]].[^3]
Added: The kernel has several standing duties. It keeps track of which parts of memory are in use and what they hold, decides which processes may use the central processing unit (CPU), when and for how long, and passes messages between programs and hardware through device drivers.[^2] Course notes from the University of Alaska Fairbanks add interrupt handling and the implementation of system calls to this list for a typical kernel.[^1]
 
Added: Because a running program cannot be relied on to hand back the processor of its own accord, the kernel sets up a hardware timer when the machine starts. Each time the timer fires, control returns to the kernel, which can then pause the current process, save its state and switch to another one.[^5]
Added:  
Added: ## Kernel mode and user mode
Added:  
Added: Processors offer at least two privilege levels. In kernel mode (also called supervisor mode) code can use every feature of the processor, while user mode is limited to certain memory areas and operations.[^1] The kernel runs in kernel mode; ordinary applications run in user mode and cannot drive hardware directly.[^1][^5] Instructions reserved for kernel mode include setting up memory address mapping, changing the processor's mode, halting or resetting the processor, and carrying out input and output.[^3]
Added:  
Added: On [[Microsoft Windows]], each user-mode application gets its own private virtual address space ([[Virtual memory]]), so one program cannot alter another's data and a crashing application does not bring down the rest of the system. All kernel-mode code, by contrast, shares a single address space, so a faulty kernel-mode driver can corrupt operating-system data, and if it crashes, the whole system crashes with it.[^4]
Added:  
Added: ## System calls
Added:  
Added: Programs ask the kernel for services through system calls, such as opening files, creating processes or allocating memory.[^5][^2] A small library routine places the call's number and arguments in processor registers and executes a special "trap" instruction. This jumps into the kernel and raises the privilege level; once the work is done, a return-from-trap instruction lowers it again and resumes the program.[^3][^5] The kernel records where its handlers live in a trap table that it sets up while starting.[^5] Princeton lecture notes put the number of system calls at about 45 in Sixth Edition [[Unix]] and about 250 in [[Linux]], a figure they describe as fewer than most systems.[^3]
Added:  
## Designs
Removed: In a monolithic kernel, nearly all operating-system code runs inside the kernel as one large program. This is fast, but a bug anywhere can affect the whole system.[^1][^3] Linux, BSD Unix and [[Microsoft Windows]] are given as examples.[^3] A microkernel keeps only essentials, such as memory management, scheduling and communication between processes, inside the kernel, and runs other services as separate programs that exchange messages. This improves isolation of faults but costs performance because of frequent switching between modes.[^1][^3] The Mach kernel, developed at Carnegie Mellon University, is one example.[^1] Hybrid kernels fall between the two; examples include XNU, used in macOS, and the kernels of various Windows versions.[^1]
 
Added: - **Monolithic kernels** keep almost all non-application code inside the kernel at high privilege, built as one large program. Sharing one space gives good performance, but makes the system harder to maintain and less robust. Linux, BSD Unix and Windows have been given as examples.[^1][^3]
Added: - **Layered designs** split the system into levels, each hiding its details from the one above. Princeton's notes cite [[MS-DOS]] as a four-layer example.[^3]
Added: - **Microkernels** keep the kernel very small, usually handling only memory, scheduling and communication between processes. Other services, including device drivers, run as ordinary processes that the kernel contacts by message. This improves flexibility and isolates faults, but frequent crossings between modes have historically cost performance.[^1][^3]
Added: - **Hybrid kernels** draw the boundary between kernel and user code somewhere between these two extremes. The kernels of the various Windows systems and Apple's XNU are often placed in this group, though sources do not all classify them the same way.[^1][^3]
Added:  
Added: ## Loadable modules and drivers
Added:  
Added: Many kernels can be extended while running. In Red Hat Enterprise Linux, only a minimal resident kernel is loaded at start-up, and extra features, often device drivers, are loaded as modules when needed; tools such as `lsmod`, `modprobe` and `rmmod` list, load and remove them.[^6] Apple's kernel offers a similar mechanism called kernel extensions (KEXTs), which load code into kernel space without recompiling the kernel and are used for device drivers.[^7] Windows lets many drivers run in kernel mode, though some can run in user mode.[^4]
Added:  
Added: ## Notable kernels
Added:  
Added: - **Mach** was a research project at Carnegie Mellon University, begun in 1985, and is a well-known microkernel. Parts of it later went into commercial operating systems, and further work passed to the Open Software Foundation.[^8][^1]
Added: - **Linux** was begun in early 1991 by [[Linus Torvalds]], a student in Helsinki, who announced it in August 1991 to users of the Minix system, calling it "just a hobby". It switched to the GNU General Public Licence in early 1992 and is now also the basis of Android.[^9][^1]
Added: - **XNU**, the kernel of macOS (formerly OS X) and Darwin, is derived from Mach.[^1] Apple describes it as combining Mach, which handles CPU use, memory, scheduling and messaging, with a BSD layer, largely drawn from FreeBSD, that supplies file systems, networking and the Unix security model, plus the I/O Kit driver framework.[^7]
Added:  
## See also
- [[Operating system]]
- [[Linux]]
Added: - [[Virtual memory]]
- [[Unix]]
Removed: - [[Microsoft Windows]]

Sources

… 1 unchanged line …
What is the Linux kernel? | https://www.redhat.com/en/topics/linux/what-is-the-linux-kernel | Red Hat
COS 318: Operating Systems — OS Structures and System Calls | https://www.cs.princeton.edu/courses/archive/fall14/cos318/lectures/3.OSStructure.pdf | Princeton University
Added: User mode and kernel mode | https://learn.microsoft.com/windows-hardware/drivers/gettingstarted/user-mode-and-kernel-mode | Microsoft Learn
Added: Mechanism: Limited Direct Execution (OSTEP educator slides) | https://pages.cs.wisc.edu/~remzi/OSTEP/Educators-Slides/Youjip/Part1.Virtualization/pdf/06.Mechanism_Limieted_Direct_Execution.pdf | University of Wisconsin–Madison
Added: Kernel Modules (Red Hat Enterprise Linux 4 System Administration Guide) | https://docs.redhat.com/en/documentation/Red_Hat_Enterprise_Linux/4/html/system_administration_guide/Kernel_Modules | Red Hat
Added: Kernel Architecture Overview (Kernel Programming Guide) | https://developer.apple.com/library/content/documentation/Darwin/Conceptual/KernelProgramming/Architecture/Architecture.html | Apple Developer
Added: Mach Project Overview | https://www.cs.cmu.edu/afs/cs.cmu.edu/project/mach/public/www/overview.html | Carnegie Mellon University
Added: Linux at 25: Why It Flourished While Others Fizzled | https://spectrum.ieee.org/linux-at-25-why-it-flourished-while-others-fizzled | IEEE Spectrum | 2016