Friday 12 May 2017

Linux Kernel

The fundamental architecture of the GNU/Linux operating system

There is also the GNU C Library (glibc). This provides the system call interface that connects to the kernel and provides the mechanism to transition between the user-space application and the kernel.

This is important because the kernel and user application occupy different protected address spaces.And while each user-space process occupies its own virtual address space, the kernel occupies a single address space.

The Linux kernel can be further divided into three gross levels. At the top is the system call interface, which implements the basic functions such as read and write. Below the system call interface is the kernel code, which can be more accurately defined as the architecture-independent kernel code. This code is common to all of the processor architectures supported by Linux.
Below this is the architecture-dependent code, which forms what is more commonly called a BSP (Board Support Package).

Linux can also be considered monolithic because it lumps all of the basic services into the kernel. This differs from a microkernel architecture where the kernel provides basic services such as communication, I/O, and memory and process management, and more specific services are plugged in to the microkernel layer. Each has its own advantages.
 The Linux kernel has become efficient in terms of both memory and CPU usage, as well as extremely stable.

One architectural perspective of the Linux kernel 

 
 SCI

 System call interface provides the means to perform functions calls from user space in to kernel.


PM
Process management is focused on the execution of processes. In the kernel, these are called threads. The kernel provides an application program interface (API) through the SCI to create a new process (fork, exec, or Portable Operating System Interface [POSIX] functions)
and synchronize between them (signal, or POSIX mechanisms)...etc.
Also in process management is the need to share the CPU between the active threads.

MM
memory is managed in what are called pages (4KB in size for most architectures).
Linux includes the means to manage the available memory, as well as the hardware mechanisms for physical and virtual mappings.
This memory management scheme uses 4KB buffers as its base, but then allocates structures from within, keeping track of which pages are full, partially used, and empty.
 The process is called swapping because the pages are swapped from memory onto the hard disk. 

VFS
 Virtual file system provides a common interface abstraction for file systems. The VFS provides a switching layer between the SCI and the file systems supported by the kernel.

The VFS provides a switching fabric between users and file systems 

Device Drivers
Linux kernel exists in device drivers that make a particular hardware device usable. 
the various devices that are supported, such as Bluetooth, I2C, serial, and so on. You can find the device driver sources in ./linux/drivers.

Architecture-dependent code 
The architecture-dependent portion of the kernel source contained in a number of subdirectories that are specific to the architecture (collectively forming the BSP).
    
  


 




 

   

No comments:

Post a Comment