Operating System Kernel
Definition
According to Wikipedia, Operating System Kernel is
a computer program that manages I/O (input/output) requests from software, and translates them into data processing instructions for the central processing unit and other electron components of a computer. The kernel is a fundamental part of a modern computer's operating system.
We will refer to operating system kernel as kernel in the rest of the book. Applications are using system call mechanism to access various kernel functions, and by doing that they transfer control to kernel routines. The current state of application including all variables and current program counter is called context. C is a programming language which is vastly used for writing Unix-like operating systems kernels such as Solaris, FreeBSD and Linux. C supports only procedural programming, but kernel developers adopted object-oriented and even functional programming.
Where can we get information on kernel? Like I said, the most reliable source of such information is source codes which contain comments. You can use cross-reference tools to navigate source codes as easy as click a hyperlink. Some of them are publicly available: like lxr.linux.no which contains Linux source and src.illumos.org which contains sources for Illumos (FOSS fork of OpenSolaris) in project illumos-gate. You can create your own cross-reference with OpenGrok tool: https://github.com/OpenGrok/OpenGrok.
Of course we have to mention textual sources of information. For Linux it is:
-
Documentation/
directory in kernel sources - Linux Kernel Mailing List
- Linux info from source
- Robert Love book "Linux Kernel Development"
- Linux Device Drivers Book
Some sources about Solaris:
- solaris.java.net –- remnants of old OpenSolaris site
- Richard McDougall and Jim Mauro book "Solaris(TM) Internals: Solaris 10 and OpenSolaris Kernel Architecture"
- Oracle course "Solaris 10 Operating System Internals"
Warning
Solaris sources was closed after Oracle acquisition of Sun in 2009 and some information on Solaris may be outdated.