Skip to main content

Kernel

In Turkish
çekirdek
Updated 2 min read

Share this page

Send the link, quote the definition with a link back, or show it as a card on your own site.

https://softwaredictionary.org/terms/kernel

In short

A kernel is the core part of an operating system that manages the CPU, memory, and hardware devices and controls how programs get access to those resources.

What is an operating system kernel?

The kernel is the central program of an operating system and one of the first things loaded when a computer boots. It stays in memory the whole time the machine runs and acts as the bridge between applications and hardware, deciding which program gets the CPU, how memory is divided, and how data moves to and from disks, networks, and other devices.

The kernel runs in a privileged CPU mode called kernel mode, where it can execute any instruction and access any memory. Regular applications run in a restricted user mode and must ask the kernel for help through system calls whenever they need to read a file, open a network connection, or start a new process. This separation protects the system, because a buggy application cannot directly damage the hardware or other programs' memory.

A good analogy is the front desk of a busy hotel. Guests (programs) cannot walk into the boiler room or make their own room keys; they ask the front desk, which checks permissions and handles the request safely. Well-known kernels include Linux, the Windows NT kernel, and XNU, the kernel behind macOS and iOS.

People often mix up the kernel with the whole operating system or with the shell. The operating system includes the kernel plus tools, libraries, and user interfaces, while the shell is just a program that takes your commands and asks the kernel to carry them out. Kernel designs also differ: monolithic kernels such as Linux run most services in kernel mode, while microkernels keep only the essentials there and move drivers and other services into user space.

At a glance

The kernel sits between programs and hardware: applications run in restricted user mode and ask for anything they need through system calls such as read or write; the kernel, in privileged kernel mode, schedules the CPU, manages memory, runs the file systems and drives the devices.user modekernel modehardwareBrowserread()Editorwrite()Gamefork()system callsKernelCPU schedulermemoryfile systemsdriversCPURAMDiskNetwork
Programs never touch the hardware directly. A crash in one app stays in that app, while a bug in the kernel can bring down the whole machine.

Key takeaways

  • The kernel is the core of the operating system and runs the entire time the computer is on.
  • It manages the CPU, memory, devices, and file systems.
  • The kernel runs in privileged kernel mode; applications run in restricted user mode.
  • Applications request kernel services through system calls.
  • Common designs include monolithic kernels and microkernels.

Example

Inspecting the running kernel on Linuxbash
# Print the name and version of the running kernel
uname -sr

# Show the most recent kernel log messages (may require sudo)
sudo dmesg | tail -n 5

# List a few kernel modules (such as drivers) currently loaded
lsmod | head -n 5

Readers ask

Is Linux an operating system or a kernel?

Strictly speaking, Linux is a kernel. Complete operating systems built on it, called Linux distributions, combine the kernel with system tools, libraries, and package managers.

What is the difference between kernel mode and user mode?

Kernel mode is a privileged CPU mode where code can access all hardware and memory, and it is reserved for the kernel. User mode is restricted, so applications must use system calls to ask the kernel to perform privileged actions for them.

What is a kernel panic?

A kernel panic is a fatal error that the kernel cannot safely recover from, so it halts the system to prevent data corruption. On Windows the equivalent is usually called a stop error or blue screen.

See also

Spotted a mistake or something missing on this page?Suggest an edit

Read a random page
Open today's review
Switch to the dark theme
Read this page in Türkçe

More

Settings