In a Linux system. several concurrent processes attend to
different tasks. Each process asks for system resources like computing power. memory. network connectivity, or Some other resource The kernel is the big chunk of executable code in charge ofhandling all such requests Although the distinction between the different kernel tasks isn't always clearly marked. the kernel's role can be split into the following parts Kernel RoleS Process management Memory management File Systems Device control Networking
136 Split view of kernel System Call Interface
Process Memory File Device Kernel
Networking Subsyste Management Management Systems Control Concurrent Virtual Memory Features Files and dirs ofVES Ttys&Devices multitasking Access Connectivity Implement File System Network Arch Char dependen Memory types subsystem Software Manager Block Devices IF drives Support t code devices
DiSk Consoles Network Harduare
CPU Memory etc Interfaces Process management The kernel is in charge of creating and destroy1ng processes and handling their connection to the outside world (input a n output). Communication among different processes (through signals. Pipes, or inter-prOcess communication primitives) is basic to the overall system functionality and is also handled by the kernel. The scheduler, which controls hoW processes share the CPU, is= part of process management. More generally, the kernel's process management activity mplements the abstraction of Several processes on top of a single CPU or a few of them w Memory management memory is a major resource, and the The computer's with it is critical one for system policy used to deal a
kernel builds a virtual addressing
performance. The up all processes on top of the limited space for any and available resources. different parts of the kernel interact with the memory- The subsystem through a set of function calls. management pc/free pair to much more rangingfrom t complex funct Filesystems Linux is heavily based on the filesystem concept; almost everything in Linux can be treated as a file. The kernel builds a structured filesystem on top of unstructured hardware, and the result1ng file concept is heavily used throughout the whole system. In addition, Linux supports multiple filesystem types, that is. ditferent ways of organizing data on the physical medium. For example, disks may be formatted with the Linux-standard ext3 filesystem. the commonly used FAT filesystem or several others. Device control operation eventually maps to a phys1cal Almost every system and a device. With the exception of the processor, memory, device control operations very feW other entities, any and all are performed by code that is specific to the device being
addressed. That code is called a device driver.
.The kernel must have embedded in it a device driver for every peripheral present on a system. from the hard drive to the keyboard and the tape drive This aspect of the kernel's functions is our primary interest in this tutorialI Networking Networking must be managed by the operating system, because most network operations are not specific to a Tlhe process: incoming packets are asynchronous events. packets must be collected, identified, and dispatched before a process takes care of them. The system is in charge of delivering data packets across
program and network interfaces. and it must control the
execution of programs according to their network activity Additionally. all the routing and address resolution issues are implemented within the kernel.