Hopp til innhold

The kernel o' the operational system,

Skip to content

This be a machine-translated text that may contain errors!

The Operating System Core

When ye save a file, yer software needs access to storage. When several programs run at once, they need both processor time an’ memory. The operating system core (the kernel) be that part o’ the OS which manages such resources an’ grants programs controlled access thereto.

Here y’all shall explain what job the kernel does, an’ distinguish it from the whole of the operating system an’ from the user interface.

Place in series: This be Part 3 o’ Operating System. [[Operativsystem Level 1 - What is an operating system?|Part 1]] explains the whole; [[Operativsystem Level 2 - GUI and CLI|Part 2]] shows the interfaces. Start there if these concepts be new t’ ya. This page also serves as foundation fer virtualization an’ containers in Vg2.

The Core Be Part o’ da Ship’s Heart

Da Programs Use Da OS Services. Inside Da OS There Be System Tools an' Services, As Well As Da Core Which Handles Da CPU, Memory, Storage an' Devices. Da Hardware Be Outside Da OS.

An Operating System Hold More Than Just Da Core. It Also Have Libraries, System Services an’ Tools That Make Da Vessel Usable an’ Manageable. A Command Shell or a Graphical Deck Give Ye a User Interface to Da System.

Ye Can Therefore Remove Da Deck from a Linux Server an’ Still Have a Workin’ Operating System. Da Core an’ Other Essential Parts of Da System Are Still There, Arrr!

What does the core do?

Resource or task How the core handles it
Processor (CPU) Divides processor time between processes, that is, programs runnin’ on board.
Working memory (RAM) Manages memory regions and guards ‘em from unauthorized access by other processes.
Storage and devices Provides access through file systems and drivers, among others. A driver be software that manages a specific type of device.
Rights Controls many o’ the requests from programs against user’s an’ process rights.

When a program needs a service from the core, it uses a syscall, often via a library. The program usually runs with fewer privileges than the core. This be a crucial boundary in the ship’s riggin’.

Aye, a sample ye see here: Stowin’ yer text file like treasure

  1. Ye pick Save in yer writin’ app, matey.
  2. The app begs the operating system to write the goods into a file.
  3. The core handles the request, includin’ permissions an’ access through the filesystem an’ drivers.
  4. The app gets word on the outcome and can show if the stowage was successful or failed.

The same sort o’ service is used whether the plea starts from a graphical program or a command. GUI an’ CLI be interfaces for the crew; the core manages the ship’s resources. This example be simplified: buffering an’ all the details o’ writin’ to a physical disk be left out o’ this tale.

Linux, Debian an’ Ubuntu: What’s what, ye scallywags?

Linux be the name o’ a kernel fer yer operating system. In common parlance, that moniker be used fer whole Linux-based operating systems as well. A Linux distribution, like sayin’ Debian or Ubuntu, does assemble this Linux kernel with libraries, tools, installation programs, an’ package systems.

Term Relation to other parts
The Linux Kernel One part o’ a Linux-based OS.
Debian an’ Ubuntu Distributions built upon the Linux kernel. They may use different kernel versions an’ configurations.
GNOME an’ KDE Plasma Examples of graphical desktop environments. Ye can install ‘em or remove ‘em without changin’ your core OS.
Bash A command shell allowin’ ye touse commands. It be a program, not the kernel itself.

Investigate a Linux vessel, if ye possess one

In a Linux terminal, ye can read the name an’ version o’ the kernel that’s runnin’:

The current draft of your answer is as follows:

``markdown

# Check the ship's operating system (Linux)
uname -s
# Verify the kernel version for navigation charts
uname -r

The first command shall show ye Linux. The second reveals the kernel version upon this very ship; it need not be a match with that o’ yore matey’s vessel. These commands alter nary a thing an’ require no sudo to sail ‘em true.

To spy which flavor o’ Linux ye hoist yer colors on, read another tidbit:

cat /etc/os-release

Search fer PRETTY_NAME, like a name containin’ Debian or Ubuntu. The kernel version an’ distribution version be different tidings. Use this passage on Linux; ye needn’t install Linux t’ perform th’ self-test below.

Why does the kernel show up in VMs an’ containers?

A VM runs a guest OS with its own kernel. Linux containers share the kernel o’ the Linux system they run on. When Docker sails within a Linux-VM, the containers share the kernel of said VM.

Consult the map o’ operating systems, VMs, an’ containers fer the relations, an’ the containerization resource fer the illustrated comparison.

Check yer explanation

  1. Ye be removin’ GNOME from a Debian server. Did ye also chuck the kernel? Give me a reason fer that answer.
  2. Two programs savin’ files at the same time. Which part handles access t’ system resources?
  3. uname -r and PRETTY_NAME show different version numbers. Why might both be right?

Check yer response: Be it known, GNOME is the desktop environment, an’ shakin’ its hand do not remove the core itself. The kernel manages the ships’ access t’ system resources, alongside other parts o’ the systemd crew. uname -r shows the kernel’s age, while PRETTY_NAME describes the distribution ship.

Ye be ready to sail on when ye can explain the difference between the operating system, the heart (kernel), an’ the user interface with yer own example. If ye mix up the pieces, use the chart an’ follow the file writin’ one more time. Want ye look deeper, explain how two different Linux distributions can build upon the same type of kernel.

Sources: Red Hat: The Linux Kernel, Linux-based Operating Systems an’ uname. The illustration was drawn for this resource.