Log in Sign up
Back to Discover
💻

Kernel (operating system)

technology Maturity 11-13

A kernel is a computer program.

Kernel Layout.svg
Kernel Layout.svg
It is the boss of the computer. It tells the parts how to work. It helps your apps run well. It keeps the computer safe. Do you like using computers?

38 words

A kernel is a special computer program.

Kernel Layout.svg
Kernel Layout.svg
It is the heart of the computer. It stays in the computer's memory all the time.

The kernel is like a boss. It tells the hardware how to work. It helps the parts talk to your apps.

kernel-simple.svg
kernel-simple.svg

It also keeps everything safe. It gives each app its own space. This stops one app from breaking another one.

The kernel manages the memory too. It decides which app gets to use it. It can even use the hard disk for more space.

It helps you use a mouse or a printer. The kernel makes sure these tools work well. It is a very important part of your computer.

117 words

A kernel is a core program in a computer.

Kernel Layout.svg
Kernel Layout.svg
It stays in the computer's memory all the time. The kernel acts like a boss for the system. It has complete control over everything. It manages the hardware and the software.
kernel-simple.svg
kernel-simple.svg
It helps them talk to each other.

The kernel handles many important tasks. It decides which program gets to use the processor. It also manages the memory. Memory is where a computer stores data to use right away. The kernel uses a way called virtual addressing. This makes every program feel like it is the only one running. It also keeps the kernel safe. The kernel lives in a special area called kernel space. Apps live in a separate area called user space.

Kernel-microkernel.svg
Kernel-microkernel.svg
This stops a broken app from crashing the whole system.

To use tools like a printer, an app must ask the kernel for help. It does this with a system call. This is a formal request for a service. The kernel uses device drivers to talk to hardware. A device driver is a program that controls a specific part. It helps the kernel understand how to use a mouse or a disk drive. Some kernels are monolithic. This means they run all services in one space for speed. Other kernels are microkernels. These run most services in user space to stay stable.

229 words

A kernel is the most important program in a computer's operating system.

Kernel Layout.svg
Kernel Layout.svg
It acts as the core that stays in the computer's memory at all times. This program has complete control over every part of the system. It is responsible for managing the hardware and the software. The kernel also stops different programs from fighting over the same resources. Without a kernel, the computer would not know how to function. It serves as the bridge between your apps and the physical machine.

To keep everything running smoothly, the kernel follows a specific way of working. It manages hardware like the hard disk and the central processing unit.

kernel-simple.svg
kernel-simple.svg
When a program needs to use a tool, it must make a system call. This is a formal request for a service that the program cannot do alone. The kernel then uses device drivers to talk to the hardware. A device driver is a special program that translates commands for things like printers or mice. This step-by-step process ensures that every request is handled correctly.

There are different ways to design how a kernel is built. Some are called monolithic kernels, which run all services in one single space to gain speed.

Kernel-microkernel.svg
Kernel-microkernel.svg
Other designs are known as microkernels, which run most services in a separate area to stay stable and resilient. A famous example of a microkernel design is called MINIX 3. Some systems, like the Linux kernel, are actually both monolithic and modular. This means they can add or remove parts while the computer is still running.
Kernel-hybrid.svg
Kernel-hybrid.svg
This flexibility helps different types of computers work well.

Memory management is one of the most vital jobs the kernel performs. It uses a method called virtual addressing to keep programs safe.

Unix history-simple.svg
Unix history-simple.svg
This technique makes each program feel like it is the only one running on the computer. It also creates two separate areas of memory. One area is called kernel space, which is protected from outside access. The other area is called user space, where your apps like web browsers live. This separation prevents a broken app from crashing the entire operating system.

Think of the kernel as a busy manager in a large office. The apps are the workers who need tools like paper or pens to do their jobs. The workers cannot just grab anything they want; they must ask the manager first. The manager then checks if the tools are available and hands them out. This is very similar to how a kernel manages the computer's RAM and processors. By acting as the middleman, the kernel keeps the whole office organized and productive.

439 words

A kernel is the central program at the core of a computer's operating system.

Kernel Layout.svg
Kernel Layout.svg
It maintains complete control over every part of the system. The kernel is always resident in the computer's memory. It acts as a bridge between hardware and software components. Its primary purpose is to facilitate interactions between these different layers. The kernel also prevents and mitigates conflicts between various running processes. Without this central component, a computer could not function effectively.

The kernel manages resources through a specific set of mechanisms. It controls hardware resources like input/output (I/O), memory, and cryptography. It uses device drivers to communicate with hardware components. A device driver is a program that encapsulates and controls a hardware device. It provides an API, or application programming interface, to the operating system. The driver translates abstract function calls from the OS into specific instructions for the hardware. This allows the kernel to manage diverse devices like printers, disk drives, and network adapters.

There are several distinct ways to design a kernel architecture. Monolithic kernels run entirely within a single address space. In this design, the CPU executes in supervisor mode to increase speed.

kernel-simple.svg
kernel-simple.svg
Microkernels take a different approach to design. They run most services in user space, similar to how user processes function. This design focuses on resilience and modularity. A notable example of a microkernel is MINIX 3.
Kernel-microkernel.svg
Kernel-microkernel.svg
Some systems, such as the Linux kernel, are both monolithic and modular. They can insert or remove loadable kernel modules while the system is running.
Kernel-hybrid.svg
Kernel-hybrid.svg

Memory management is a critical task performed within the kernel. The kernel has full access to the system's random-access memory (RAM). It uses virtual addressing to manage how processes access this memory. This is often achieved through techniques called paging or segmentation. Virtual addressing allows the kernel to make a physical address appear as a different virtual address. This creates a layer of indirection that benefits the entire system. Every program can behave as if it is the only one running. This prevents applications from accidentally crashing one another.

To ensure stability, the kernel divides memory into two disjoint areas. One area is reserved for the kernel, known as kernel space. The other area is for applications, known as user space.

Kernel Layout.svg
Kernel Layout.svg
The processor does not permit applications to address kernel memory. This protection prevents malfunctioning applications from affecting the entire operating system. If a program needs data not currently in the RAM, the kernel uses demand paging. The CPU signals the kernel when this happens. The kernel then moves inactive memory blocks to the hard drive to make room for the requested data.

Processes must interact with the kernel through a mechanism called a system call. A system call is how a process requests a service it lacks permission to run. These calls provide the interface between a process and the operating system. When a process makes a system call, it uses a machine-code instruction. This instruction causes the processor to change modes, such as from supervisor mode to protected mode. Most operating systems provide a library, like Glibc or the Windows API, to handle these low-level details. Common system calls include commands like open, read, write, and close.

Kernels also manage the distribution of processing power and communication. The kernel decides which running programs are allocated to the CPU or multiple processors. It also manages inter-process communication (IPC). IPC allows different processes to access facilities provided by other processes. The kernel handles context switching between processes or threads to maintain order. By managing these complex interactions, the kernel ensures that all hardware and software components work together efficiently.

Unix history-simple.svg
Unix history-simple.svg

609 words
🖼️ Images & Media (5)
File:Kernel Layout.svg
Kernel Layout.svg
File:kernel-simple.svg
kernel-simple.svg
File:Kernel-microkernel.svg
Kernel-microkernel.svg
File:Kernel-hybrid.svg
Kernel-hybrid.svg
File:Unix history-simple.svg
Unix history-simple.svg
Up Next
💻
System call
Technology
More to explore

🔬 Go deeper

More advanced topics to explore

🪜 Step back

Simpler topics to build understanding

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.