kernel
History
▶ The Linux kernel is one component of a system, which also requires libraries and applications to provide features to end users. ▶ The Linux kernel was created as a hobby in 1991 by a Finnish student, Linus Torvalds. ▶ Linux quickly started to be used as the kernel for free software operating systems ▶ Linus Torvalds has been able to create a large and dynamic developer and user community around Linux. ▶ Nowadays, more than one thousand people contribute to each kernel release, individuals or companies big and small.
Feature
▶ Portability and hardware support. Runs on most architectures. ▶ Scalability. Can run on super computers as well as on tiny devices (4 MB of RAM is enough). ▶ Compliance to standards and interoperability. ▶ Exhaustive networking support. ▶ Security. It can't hide its flaws. Its code is reviewed by many experts. ▶ Stability and reliability. ▶ Modularity. Can include only what a system needs even at run time. ▶ Easy to program. You can learn from existing code. Many useful resources on the net.
Main roles of Kernel
▶ Manage all the hardware resources: CPU, memory, I/O. ▶ Provide a set of portable, architecture and hardware independent APIs to allow user space applications and libraries to use the hardware resources. ▶ Handle concurrent accesses and usage of hardware resources from different applications.
System Calls
▶ The main interface between the kernel and user space is the set of system calls ▶ About 300 system calls that provide the main kernel services
- File and device operations, networking operations, inter-process communication, process management, memory mapping, timers, threads, synchronization primitives, etc. ▶ This interface is stable over time: only new system calls can be added by the kernel developers ▶ This system call interface is wrapped by the C library, and user space applications usually never make a system call directly but rather use the corresponding C library function
Pseudo filesystems
▶ Linux makes system and kernel information available in user space through pseudo filesystems, sometimes also called virtual filesystems ▶ Pseudo filesystems allow applications to see directories and files that do not exist on any real storage: they are created and updated on the fly by the kernel ▶ The two most important pseudo filesystems are ▶ proc, usually mounted on /proc: Operating system related information (processes, memory management parameters...) ▶ sysfs, usually mounted on /sys: Representation of the system as a set of devices and buses. Information about these devices.
License
▶ The whole Linux sources are Free Software released under the GNU General Public License version 2 (GPL v2).
▶ For the Linux kernel, this basically implies that:
▶ When you receive or buy a device with Linux on it, you should receive the Linux sources, with the right to study, modify and redistribute them.
▶ When you produce Linux based devices, you must release the sources to the recipient, with the
same rights, with no restriction.
Supported hardware architectures
▶ See the arch/ directory in the kernel sources
▶ Minimum: 32 bit processors, with or without MMU, and gcc support
▶ 32 bit architectures (arch/ subdirectories)
Examples: arm, avr32, blackfin, c6x, m68k, microblaze, mips, score, sparc, um
▶ 64 bit architectures:
Examples: alpha, arm64, ia64, tile
▶ 32/64 bit architectures
Examples: powerpc, x86, sh, sparc
▶ Find details in kernel sources: arch/