This is an old version, saved 4 Dec 2026, 21:27 by TechWritereditor. See the current version.

Kernel (operating system)

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]

Contents
  1. What it does
  2. Designs
  3. See also
  4. References

What it does

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]

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]

Designs

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]

See also

References

  1. ^ CS 321 Spring 2013: Lecture Notes for Monday, January 28, 2013 (OS structure). University of Alaska Fairbanks. 2013-01-28. cs.uaf.edu
  2. ^ What is the Linux kernel?. Red Hat. redhat.com
  3. ^ COS 318: Operating Systems — OS Structures and System Calls. Princeton University. cs.princeton.edu