Engineers Garage

  • Projects and Tutorials
    • Electronic Projects
      • 8051
      • Arduino
      • ARM
      • AVR
      • PIC
      • Raspberry pi
      • STM32
    • Tutorials
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Products News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • EE Resources
    • DesignFast
    • LEAP Awards
    • Oscilloscope Product Finder
    • White Papers
    • Webinars
  • EE Learning Center
    • Design Guides
      • WiFi & the IOT Design Guide
      • Microcontrollers Design Guide
      • State of the Art Inductors Design Guide
  • Women in Engineering

Kernel Architecture Of Linux (Part 7/15)

By Ashish Vara

Kernel Architecture of Linux

Kernel is a small and special code which is the core component of Linux OS and directly interacts with hardware.  It is the intermediate level between software and hardware  which provides low level service to user mode’s components. It is fully developed in C language and file system architecture Moreover, it has different blocks which manage various operations. .In this tutorial we will learn about kernel architecture of Linux.

Kernel  runs a number of processes concurrently and manages the various resources. It is viewed as a resource manager when several programs run concurrently on a system. In this case, the kernel is an instance that shares available resources like CPU time, disk space, network connections etc.

Types of kernel

Kernel architecture is classified into two types:

  1. Monolithic
  2. Micro Kernel

Monolithic Kernels

In the  traditional monolithic kernel architecture, all the basic system services like process and memory management, interrupt handling etc. were packaged into a single module in kernel space. Module is an object file in which the whole code can be linked to kernel at run time. Huge space is consumed by traditional monolithic kernel and maintenance level is very low. It takes few hours for recompilation if some new feature is added because all the services are attached into one single module.

Modern monolithic kernel architecture consists of different modules which can be dynamically loaded and un-loaded. In this way maintainability is very easy because kernel needs to take care of only loaded module. Recompilation is not required upon added feature or some changes. Monolithic kernel is faster than micro kernel. 

Micro kernels

Monolithic kernel architecture supports the modular approach. All service modules are not run in kernel space as compared to monolithic kernel. Device driver management, protocol stack, file system etc are run in user space. This reduces the kernel code size and also increases the security.

Fundamental Architecture of Linux

 

Fig. 1: Image showing Fundamental Architecture of Linux

Architecture of kernel divided into main two parts:

  1. User Space
  2. Kernel Space

User Space

All user programs and applications are executed in user space. User Space cannot directly access the memory and hardware.  It accesses the hardware through kernel space. Processes or programs which are running in user space only access some part of memory by system call. Due to full protection, crashes in user mode are recoverable.

GNU C library provides the mechanism switching user space application to kernel space.

Kernel Space

All kernel programs are executed in kernel space. Kernel space accesses full part of memory and directly interacts with hardware like RAM, Hard disk etc It is divided in different blocks and modules which manage all operations (like file management, memory management, process management etc.) in kernel space and applications  running in user space. Kernel space consists of system call interface, Kernel (core component of Linux) and device module. 

System call interface is the intermediate layer between user space and kernel space. Each application which is run in user space can interface with kernel through system call interface. For example system call function on file operation are open ( ), write ( ), read ( ) etc.

Kernel is independent from hardware. It is common for all Hardware processors which are supported by Linux. You can run kernel on any processor like Intel, ARM, Atmel etc.  It acts as a resource manager in Kernel space and performs process management, file management, memory management, Interrupt handler , scheduling of process, etc.  It is a powerful structure which handles all kinds of operations.

Architecture of Kernel

Fig. 2: Image showing Full Architecture of Kernel

Kernel architecture follows modular approach. Each block in kernel (i.e. file management) is nothing but piece of code written in C language. Each block consists of powerful structure for handling various operations.

Process management

Process management is handling the management of various processes which are run at the same time. Process is an instance of ‘program in execution’ like open the file, access drive, access external resource (i.e. printer), etc.  and can be created and destroyed. Process management gives the information of what’s happening with a processand manages its priorities, such as which address should be assigned to process, file allocated to process, state of process (like running, waiting, stop) etc. I will explain in brief about process in another tutorial.

Memory management

Memory management is the most important part of kernel which  handles assignment of address space to process and application. Basically memory management assigns virtual memory instead of physical memory,whereby latter is the actual address space in RAM.  Don’t be confused between physical and virtual memory. Assignment of virtual address overcomes the limitation of assignment of physical memory. Conversion from physical address to virtual address is performed by MMU (Memory Management Unit which provides the protection of memory interference, sharing of memory and allocation of virtual memory. Physical address space is divided into some block of memory called frame thatcontains a number of pages.

Linux File System

The Linux file system is a hierarchically data structured tree which organizes the file system. File is simple data structure (in form of some byte of memory) which can store any kind of data like text, image, video, music and whatever you want in computer. Linux file system is organized as a directory in tree form. Directory is a collection or group of files. Two types of directory are available in Linux system: 1) root 2) Sub directory. Root is main directory and cannot be accessed without permission of super user. It is the parent and main directory in file system denoted as forward slash ( / ). Sub directory is under the root directory which can be created or renamed by user. Linux supports number of file types like ext2, ext3, device file, block file, networking file system etc. Each file system is stored in different a disk partition.


Filed Under: Tutorials

 

Questions related to this article?
👉Ask and discuss on EDAboard.com and Electro-Tech-Online.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


Featured Tutorials

  • Introduction to Brain Waves & its Types (Part 1/13)
  • Understanding NeuroSky EEG Chip in Detail (Part 2/13)
  • Performing Experiments with Brainwaves (Part 3/13)
  • Amplification of EEG Signal and Interfacing with Arduino (Part 4/13)
  • Controlling Led brightness using Meditation and attention level (Part 5/13)
  • Control Motor’s Speed using Meditation and Attention Level of Brain (Part 6/13)

Stay Up To Date

Newsletter Signup

Sign up and receive our weekly newsletter for latest Tech articles, Electronics Projects, Tutorial series and other insightful tech content.

EE Training Center Classrooms

EE Classrooms

Recent Articles

  • What are the battery-selection criteria for low-power design?
  • Key factors to optimize power consumption in an embedded device
  • EdgeLock A5000 Secure Authenticator
  • How to interface a DS18B20 temperature sensor with MicroPython’s Onewire driver
  • Introduction to Brain Waves & its Types (Part 1/13)

Most Popular

5G 555 timer circuit 8051 ai Arduino atmega16 automotive avr bluetooth dc motor display Electronic Part Electronic Parts Fujitsu ic infineontechnologies integratedcircuit Intel IoT ir lcd led maximintegratedproducts microchip microchiptechnology Microchip Technology microcontroller microcontrollers mosfet motor powermanagement Raspberry Pi remote renesaselectronics renesaselectronicscorporation Research samsung semiconductor sensor software STMicroelectronics switch Technology vishayintertechnology wireless

RSS EDABOARD.com Discussions

  • Op amp non inverting amplifier not working
  • Measure AC current accurateley (100mA to 10A)
  • Avalanche Pulser
  • Fpga wake up
  • RCF Subwoofer Amplifier PIC16F870-I/SP please help me about hex code

RSS Electro-Tech-Online.com Discussions

  • How to search component to replace my burn RF inductor?
  • Need a ducted soldering fan for solder smoke extraction
  • Someone please explain how this BMS board is supposed to work?
  • bluetooth jammer
  • Disabled son needs advice please
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • About Us
  • Contact Us
  • Advertise

Copyright © 2022 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Projects and Tutorials
    • Electronic Projects
      • 8051
      • Arduino
      • ARM
      • AVR
      • PIC
      • Raspberry pi
      • STM32
    • Tutorials
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Products News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • EE Resources
    • DesignFast
    • LEAP Awards
    • Oscilloscope Product Finder
    • White Papers
    • Webinars
  • EE Learning Center
    • Design Guides
      • WiFi & the IOT Design Guide
      • Microcontrollers Design Guide
      • State of the Art Inductors Design Guide
  • Women in Engineering