SlideShare ist ein Scribd-Unternehmen logo
1 von 17
Downloaden Sie, um offline zu lesen
Architecture of the Linux Kernel


                 by Dominique Gerald M Cimafranca
                       dominique.cimafranca@gmail.com




This work is licensed under the Creative Commons Attribution-Share Alike 3.0 Philippines License. To view a copy of this
license, visit http://creativecommons.org/licenses/by-sa/3.0/ph/ or send a letter to Creative Commons, 171 Second Street,
Suite 300, San Francisco, California, 94105, USA.
Fundamental Architecture

             User Applications
                                          User Space

                GNU C Library (glibc)



           System Call Interface



                  Kernel

                                          Kernel Space

     Architecture Dependent Kernel Code



             Hardware Platform
User Space Components
●   User applications
●   glibc
    ●   Provides the system call interface that connects to
        the kernel
    ●   Provides the mechanism to transition between user-
        space application and kernel
●   Each user space process occupies its own
    virtual address space (vs the kernel which runs
    on the single address space)
Kernel Space Components
●   System Call Interface
    ●   Provides the basic functions such as read() and
        write()
●   Kernel
    ●   Architecture-independent kernel code
    ●   Common to all processor architectures supported by
        Linux
●   Architecture-Dependent Code
    ●   Processor- and platform-specific code
    ●   Also known as Board Support Package
Kernel Subsystems

               System Call Interface




Process Management                Virtual File System




Memory Management                      Network Stack




   Arch                         Device Drivers
System Call Interface
●   Provides the means to perform function calls
    from user space into the kernel.
●   This interface can be architecture dependent,
    even within the same processor family.
●   Can be found in
    ●   ./linux/kernel
    ●   ./linux/arch
Process Management
●   Focused on the execution of processes
●   Each has an individual virtualization of the
    processor (thread code, data, stack, and
    registers)
●   Kernel provides API through SCI to start, stop,
    and communicate with processes
●   Processes are managed by a scheduler
Scheduler
●   Kernel implements a scheduling algorithm
    ●   Operates in constant time, regardless of threads
    ●   O(1), meaning, same time to schedule one thread
        or many threads
●   Can be found in
    ●   ./linux/kernel
    ●   ./linux/arch
Memory Management
●   Memory is managed in pages
    ●   Typically 4KB per page for most architectures
    ●   Can be adjusted
●   Support for hardware mechanisms for physical
    and virtual mappings, e.g. MMU on Pentium
●   Keeps tracks of which pages are full, partially
    used, or empty
●   Or if physical memory runs out, swap to disk
●   Can be found in ./linux/mm
Virtual File System
        Virtual File System



ext3       ...         FAT32   /proc



       Buffer Cache




          Device Drivers



         Physical Devices
Virtual File System
●   Presents a common API abstraction of
    functions such as open, close, read, and write
●   Translates to abstractions specific to a file
    system
●   Support for over 50 different file systems
●   Can be found in ./linux/fs
Buffer Cache
●   Caching layer that optimizes access to the
    physical devices by keeping data around for a
    short time
●   Provides a common set of functions to the file
    system layer (independent of any particular file
    system)
Network Stack
●   Follows a layered architecture modeled after
    the TCP/IP protocols
●   TCP layer communicates with SCI via sockets
●   Sockets provide a standard API to the
    networking subsystem
    ●   Manage connections
    ●   Move data between endpoints
●   Can be found in ./linux/net
Device Drivers and Architecture-
           Dependent Code
●   Most of the Linux kernel source code consists
    of device drivers
    ●   Can be found in ./linux/drivers
●   While Linux kernel is mostly architecture
    ●   Can be found in ./linux/arch
Questions?
References
●   Anatomy of the Linux Kernel, M. Tim Jones, IBM Developerworks
    (http://www.ibm.com/developerworks/linux/library/l-linux-kernel/)
Architecture of the Linux Kernel


                 by Dominique Gerald M Cimafranca
                       dominique.cimafranca@gmail.com




This work is licensed under the Creative Commons Attribution-Share Alike 3.0 Philippines License. To view a copy of this
license, visit http://creativecommons.org/licenses/by-sa/3.0/ph/ or send a letter to Creative Commons, 171 Second Street,
Suite 300, San Francisco, California, 94105, USA.

Weitere ähnliche Inhalte

Was ist angesagt?

Linux Kernel Image
Linux Kernel ImageLinux Kernel Image
Linux Kernel Image
艾鍗科技
 
Linux internal
Linux internalLinux internal
Linux internal
mcganesh
 

Was ist angesagt? (20)

Linux Kernel Image
Linux Kernel ImageLinux Kernel Image
Linux Kernel Image
 
Linux kernel Architecture and Properties
Linux kernel Architecture and PropertiesLinux kernel Architecture and Properties
Linux kernel Architecture and Properties
 
Embedded Android : System Development - Part II (Linux device drivers)
Embedded Android : System Development - Part II (Linux device drivers)Embedded Android : System Development - Part II (Linux device drivers)
Embedded Android : System Development - Part II (Linux device drivers)
 
Linux
Linux Linux
Linux
 
LCA14: LCA14-306: CPUidle & CPUfreq integration with scheduler
LCA14: LCA14-306: CPUidle & CPUfreq integration with schedulerLCA14: LCA14-306: CPUidle & CPUfreq integration with scheduler
LCA14: LCA14-306: CPUidle & CPUfreq integration with scheduler
 
Linux device drivers
Linux device drivers Linux device drivers
Linux device drivers
 
Linux kernel
Linux kernelLinux kernel
Linux kernel
 
Linux internal
Linux internalLinux internal
Linux internal
 
Linux Internals - Part II
Linux Internals - Part IILinux Internals - Part II
Linux Internals - Part II
 
Linux-Internals-and-Networking
Linux-Internals-and-NetworkingLinux-Internals-and-Networking
Linux-Internals-and-Networking
 
Course 102: Lecture 26: FileSystems in Linux (Part 1)
Course 102: Lecture 26: FileSystems in Linux (Part 1) Course 102: Lecture 26: FileSystems in Linux (Part 1)
Course 102: Lecture 26: FileSystems in Linux (Part 1)
 
Building Embedded Linux Full Tutorial for ARM
Building Embedded Linux Full Tutorial for ARMBuilding Embedded Linux Full Tutorial for ARM
Building Embedded Linux Full Tutorial for ARM
 
USB Drivers
USB DriversUSB Drivers
USB Drivers
 
Linux - Introductions to Linux Operating System
Linux - Introductions to Linux Operating SystemLinux - Introductions to Linux Operating System
Linux - Introductions to Linux Operating System
 
Embedded Android : System Development - Part IV
Embedded Android : System Development - Part IVEmbedded Android : System Development - Part IV
Embedded Android : System Development - Part IV
 
Linux kernel modules
Linux kernel modulesLinux kernel modules
Linux kernel modules
 
Linux kernel architecture
Linux kernel architectureLinux kernel architecture
Linux kernel architecture
 
Linux kernel
Linux kernelLinux kernel
Linux kernel
 
Linux Kernel and Driver Development Training
Linux Kernel and Driver Development TrainingLinux Kernel and Driver Development Training
Linux Kernel and Driver Development Training
 
Part 02 Linux Kernel Module Programming
Part 02 Linux Kernel Module ProgrammingPart 02 Linux Kernel Module Programming
Part 02 Linux Kernel Module Programming
 

Ähnlich wie Architecture Of The Linux Kernel

Ospresentation 120112074429-phpapp02 (1)
Ospresentation 120112074429-phpapp02 (1)Ospresentation 120112074429-phpapp02 (1)
Ospresentation 120112074429-phpapp02 (1)
Vivian Vhaves
 
Linux architecture
Linux architectureLinux architecture
Linux architecture
mcganesh
 
Linux architecture
Linux architectureLinux architecture
Linux architecture
mcganesh
 

Ähnlich wie Architecture Of The Linux Kernel (20)

Linux@assignment ppt
Linux@assignment pptLinux@assignment ppt
Linux@assignment ppt
 
Walking around linux kernel
Walking around linux kernelWalking around linux kernel
Walking around linux kernel
 
Ubuntu OS Presentation
Ubuntu OS PresentationUbuntu OS Presentation
Ubuntu OS Presentation
 
Visual comparison of Unix-like systems & Virtualisation
Visual comparison of Unix-like systems & VirtualisationVisual comparison of Unix-like systems & Virtualisation
Visual comparison of Unix-like systems & Virtualisation
 
Libra Library OS
Libra Library OSLibra Library OS
Libra Library OS
 
linux kernel overview 2013
linux kernel overview 2013linux kernel overview 2013
linux kernel overview 2013
 
introduction.pdf
introduction.pdfintroduction.pdf
introduction.pdf
 
Ospresentation 120112074429-phpapp02 (1)
Ospresentation 120112074429-phpapp02 (1)Ospresentation 120112074429-phpapp02 (1)
Ospresentation 120112074429-phpapp02 (1)
 
Linux for embedded_systems
Linux for embedded_systemsLinux for embedded_systems
Linux for embedded_systems
 
淺談探索 Linux 系統設計之道
淺談探索 Linux 系統設計之道 淺談探索 Linux 系統設計之道
淺談探索 Linux 系統設計之道
 
Realizing Linux Containers (LXC)
Realizing Linux Containers (LXC)Realizing Linux Containers (LXC)
Realizing Linux Containers (LXC)
 
The Linux System
The Linux SystemThe Linux System
The Linux System
 
Linux architecture
Linux architectureLinux architecture
Linux architecture
 
Studies
StudiesStudies
Studies
 
Os concepts
Os conceptsOs concepts
Os concepts
 
Linux architecture
Linux architectureLinux architecture
Linux architecture
 
Lec 10-linux-review
Lec 10-linux-reviewLec 10-linux-review
Lec 10-linux-review
 
Arch linux and whole security concepts in linux explained
Arch linux and whole security concepts in linux explained Arch linux and whole security concepts in linux explained
Arch linux and whole security concepts in linux explained
 
Ch1 linux basics
Ch1 linux basicsCh1 linux basics
Ch1 linux basics
 
Ubuntu
UbuntuUbuntu
Ubuntu
 

Kürzlich hochgeladen

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Kürzlich hochgeladen (20)

Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 

Architecture Of The Linux Kernel

  • 1. Architecture of the Linux Kernel by Dominique Gerald M Cimafranca dominique.cimafranca@gmail.com This work is licensed under the Creative Commons Attribution-Share Alike 3.0 Philippines License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ph/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.
  • 2. Fundamental Architecture User Applications User Space GNU C Library (glibc) System Call Interface Kernel Kernel Space Architecture Dependent Kernel Code Hardware Platform
  • 3. User Space Components ● User applications ● glibc ● Provides the system call interface that connects to the kernel ● Provides the mechanism to transition between user- space application and kernel ● Each user space process occupies its own virtual address space (vs the kernel which runs on the single address space)
  • 4. Kernel Space Components ● System Call Interface ● Provides the basic functions such as read() and write() ● Kernel ● Architecture-independent kernel code ● Common to all processor architectures supported by Linux ● Architecture-Dependent Code ● Processor- and platform-specific code ● Also known as Board Support Package
  • 5. Kernel Subsystems System Call Interface Process Management Virtual File System Memory Management Network Stack Arch Device Drivers
  • 6. System Call Interface ● Provides the means to perform function calls from user space into the kernel. ● This interface can be architecture dependent, even within the same processor family. ● Can be found in ● ./linux/kernel ● ./linux/arch
  • 7. Process Management ● Focused on the execution of processes ● Each has an individual virtualization of the processor (thread code, data, stack, and registers) ● Kernel provides API through SCI to start, stop, and communicate with processes ● Processes are managed by a scheduler
  • 8. Scheduler ● Kernel implements a scheduling algorithm ● Operates in constant time, regardless of threads ● O(1), meaning, same time to schedule one thread or many threads ● Can be found in ● ./linux/kernel ● ./linux/arch
  • 9. Memory Management ● Memory is managed in pages ● Typically 4KB per page for most architectures ● Can be adjusted ● Support for hardware mechanisms for physical and virtual mappings, e.g. MMU on Pentium ● Keeps tracks of which pages are full, partially used, or empty ● Or if physical memory runs out, swap to disk ● Can be found in ./linux/mm
  • 10. Virtual File System Virtual File System ext3 ... FAT32 /proc Buffer Cache Device Drivers Physical Devices
  • 11. Virtual File System ● Presents a common API abstraction of functions such as open, close, read, and write ● Translates to abstractions specific to a file system ● Support for over 50 different file systems ● Can be found in ./linux/fs
  • 12. Buffer Cache ● Caching layer that optimizes access to the physical devices by keeping data around for a short time ● Provides a common set of functions to the file system layer (independent of any particular file system)
  • 13. Network Stack ● Follows a layered architecture modeled after the TCP/IP protocols ● TCP layer communicates with SCI via sockets ● Sockets provide a standard API to the networking subsystem ● Manage connections ● Move data between endpoints ● Can be found in ./linux/net
  • 14. Device Drivers and Architecture- Dependent Code ● Most of the Linux kernel source code consists of device drivers ● Can be found in ./linux/drivers ● While Linux kernel is mostly architecture ● Can be found in ./linux/arch
  • 16. References ● Anatomy of the Linux Kernel, M. Tim Jones, IBM Developerworks (http://www.ibm.com/developerworks/linux/library/l-linux-kernel/)
  • 17. Architecture of the Linux Kernel by Dominique Gerald M Cimafranca dominique.cimafranca@gmail.com This work is licensed under the Creative Commons Attribution-Share Alike 3.0 Philippines License. To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/3.0/ph/ or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.