Questions tagged [kernel]

Everything about Unix kernels: development, configuration, compilation, design, etc.

The kernel of every operating system builds the bridge between the application and the actual processing on the hardware level.

A typical Unix kernel is responsible for:

  • CPU Program execution
  • Memory Management
  • Processes (Scheduling, Synchronization, Interprocess Communication)
  • Signals (Exceptions, Interrupts)
  • Filesystems (Virtual, Block)
  • I/O Architecture (Devices, Files, Networking)

The two most common architectures for Unix kernels are:

  • Monolithic kernel: Every kernel layer is integrated in into the whole kernel and therefore runs in kernel space. Every user application has to access the kernel through a high-level interface. Most Unix(-like) kernel follow this approach.

  • Microkernel: Only the essential parts of the kernel run in kernel space. Applications are allowed to directly address different kernel layers (device drivers, filesystems, ..).

Linux

The kernel is a Unix-like kernel initially created by Linus Torvalds in 1991 and now is maintained by developers around the world.

Linux kernel compilation

Linux kernel internals

Further reading

3470 questions
389
votes
1 answer

How do you empty the buffers and cache on a Linux system?

Prior to doing some benchmarking work how would one free up the memory (RAM) that the Linux Kernel is consuming for its buffers and cache? Note that this is mostly useful for benchmarking. Emptying the buffers and cache reduces performance! If…
slm
  • 363,520
  • 117
  • 767
  • 871
315
votes
8 answers

How to reload udev rules without reboot?

How should one reload udev rules, so that newly created one can function? I'm running Arch Linux, and I don't have a udevstart command here. Also checked /etc/rc.d, no udev service there.
daisy
  • 53,527
  • 78
  • 236
  • 383
279
votes
4 answers

How does a Segmentation Fault work under-the-hood?

I can't seem to find any information on this aside from "the CPU's MMU sends a signal" and "the kernel directs it to the offending program, terminating it". I assumed that it probably sends the signal to the shell and the shell handles it by…
Braden Best
  • 2,183
  • 2
  • 12
  • 12
276
votes
2 answers

Kernel inotify watch limit reached

I'm currently facing a problem on a linux box where as root I have commands returning error because inotify watch limit has been reached. # tail -f /var/log/messages [...] tail: cannot watch '/var/log/messages': No space left on device #…
Ultraspider
  • 3,043
  • 4
  • 16
  • 9
168
votes
6 answers

How do I read from /proc/$pid/mem under Linux?

The Linux proc(5) man page tells me that /proc/$pid/mem “can be used to access the pages of a process's memory”. But a straightforward attempt to use it only gives me $ cat /proc/$$/mem /proc/self/mem cat: /proc/3065/mem: No such process cat:…
Gilles 'SO- stop being evil'
  • 807,993
  • 194
  • 1,674
  • 2,175
124
votes
3 answers

What does the Windows flag in the Linux logo of kernel 3.11 mean?

I've just installed kernel-3.11.0-1.fc20 for my Fedora 19 installation. During the rebooting progress, I saw the Linux logo with a Windows flag in it, what does it mean? The Fedora 19 is installed in an ASUS TX300CA notebook, secure boot is off,…
LiuYan 刘研
  • 3,910
  • 5
  • 31
  • 34
122
votes
3 answers

Why is swappiness set to 60 by default?

I just read some stuff about swappiness on Linux. I don't understand why the default is set to 60. According to me this parameter should be set to 10 in order to reduce swap. Swap is on my hard drives so it us much slower than my memory. Why did…
Hugo
  • 2,419
  • 7
  • 27
  • 32
121
votes
10 answers

Set the default kernel in GRUB

How can I pick which kernel GRUB 2 should load by default? I recently installed a Linux real-time kernel and now it loads by default. I'd like to load the regular one by default. So far I only managed to pick the default OS... and for some reason…
TomTom
  • 2,453
  • 6
  • 18
  • 23
118
votes
7 answers

What are high memory and low memory on Linux?

I'm interested in the difference between Highmem and Lowmem: Why is there such a differentiation? What do we gain by doing so? What features does each have?
Navaneeth Sen
  • 9,369
  • 17
  • 58
  • 65
117
votes
6 answers

If Linux is only a kernel, then how were its first versions used (without distribution)?

Linux is only a kernel, and if users want to use it, then they need a complete distribution. That being said, how were the first versions of Linux used when there were no Linux distributions?
noop
  • 1,025
  • 2
  • 8
  • 4
114
votes
13 answers

What is the benefit of compiling your own linux kernel?

What benefit could I see by compiling a Linux kernel myself? Is there some efficiency you could create by customizing it to your hardware?
jjclarkson
  • 2,147
  • 2
  • 17
  • 16
112
votes
3 answers

What is difference between User space and Kernel space?

Is Kernel space used when Kernel is executing on the behalf of the user program i.e. System Call? Or is it the address space for all the Kernel threads (for example scheduler)? If it is the first one, than does it mean that normal user program…
Poojan
  • 1,231
  • 2
  • 9
  • 6
100
votes
2 answers

What is kernel ip forwarding?

I have seen on many blogs, using this command to enable IP forwarding while using many network security/sniffing tools on linux echo 1 > /proc/sys/net/ipv4/ip_forward Can anyone explain me in layman terms, what essentially does this command do?…
Madhur Ahuja
  • 1,501
  • 3
  • 12
  • 14
95
votes
6 answers

How to cause kernel panic with a single command?

Is it possible to cause a kernel panic with a single command line? What would be the most straightforward such command for a sudoing user and what would it be for a regular user, if any? Scenarios that suggest downloading something as a part of the…
Desmond Hume
  • 2,718
  • 5
  • 21
  • 21
92
votes
6 answers

What is the difference between kernel drivers and kernel modules?

When I do a lspci -k on my Kubuntu with a 3.2.0-29-generic kernel I can see something like this: 01:00.0 VGA compatible controller: NVIDIA Corporation G86 [Quadro NVS 290] (rev a1) Subsystem: NVIDIA Corporation Device 0492 Kernel driver in…
JohnnyFromBF
  • 3,476
  • 10
  • 32
  • 42
1
2 3
99 100