SlideShare a Scribd company logo
2
Most read
6
Most read
9
Most read
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.

More Related Content

ODP
Linux Internals - Kernel/Core
PDF
Android Binder IPC for Linux
PDF
Linux kernel architecture
ODP
Embedded Android : System Development - Part III
PPT
Architecture of Linux
PPTX
kali linux Presentaion
PPT
Linux Administration
PDF
Linux kernel architecture
Linux Internals - Kernel/Core
Android Binder IPC for Linux
Linux kernel architecture
Embedded Android : System Development - Part III
Architecture of Linux
kali linux Presentaion
Linux Administration
Linux kernel architecture

What's hot (20)

PPTX
Linux Interrupts
PDF
package mangement
PDF
Advance linux presentation_0702011
PDF
Linux Internals - Part II
PPT
Linux command ppt
PDF
Introduction to Network Function Virtualization (NFV)
PDF
The linux networking architecture
PDF
Xen & the Art of Virtualization
PPT
KERNAL ARCHITECTURE
PDF
An Introduction to the Android Framework -- a core architecture view from app...
PPT
Basic Linux Internals
PPT
Install and configure linux
PPTX
Linux file system
PDF
Embedded Android : System Development - Part I
PPSX
Key Challenges In CLOUD COMPUTING
PDF
Linux Internals - Interview essentials - 1.0
PDF
Embedded Android : System Development - Part II (HAL)
PPTX
Linux kernel
PPTX
virtualization and hypervisors
PDF
Linux systems - Linux Commands and Shell Scripting
Linux Interrupts
package mangement
Advance linux presentation_0702011
Linux Internals - Part II
Linux command ppt
Introduction to Network Function Virtualization (NFV)
The linux networking architecture
Xen & the Art of Virtualization
KERNAL ARCHITECTURE
An Introduction to the Android Framework -- a core architecture view from app...
Basic Linux Internals
Install and configure linux
Linux file system
Embedded Android : System Development - Part I
Key Challenges In CLOUD COMPUTING
Linux Internals - Interview essentials - 1.0
Embedded Android : System Development - Part II (HAL)
Linux kernel
virtualization and hypervisors
Linux systems - Linux Commands and Shell Scripting
Ad

Similar to Architecture Of The Linux Kernel (20)

PDF
Linux for embedded_systems
PPT
Linux architecture
PPT
Linux architecture
ODP
Linux internal
PPTX
Linux os
PDF
Driver Programming Report
PPTX
Linux@assignment ppt
PPT
Mca ii os u-5 unix linux file system
PPTX
Advanced Bulkification Strategies in Apex Triggers
PDF
Ganesh naik linux_kernel_internals
PDF
Ganesh naik linux_kernel_internals
PPT
Ch20 OS
 
PPT
PPT
The-Linux-Kernel-Introduction-cs251-2001.ppt
PPT
PPTX
Operating Systems & Applications
PDF
Ubuntu OS Presentation
PPT
Introduction to System Calls
PPT
Linux for embedded_systems
Linux architecture
Linux architecture
Linux internal
Linux os
Driver Programming Report
Linux@assignment ppt
Mca ii os u-5 unix linux file system
Advanced Bulkification Strategies in Apex Triggers
Ganesh naik linux_kernel_internals
Ganesh naik linux_kernel_internals
Ch20 OS
 
The-Linux-Kernel-Introduction-cs251-2001.ppt
Operating Systems & Applications
Ubuntu OS Presentation
Introduction to System Calls
Ad

More from Dom Cimafranca (18)

PDF
Welcome Address - CS Cluster Orientation
PDF
Story a meditation
PDF
Video Games as Culture and Experience
PDF
Privacy and how the Internet works
PDF
Why you can't write filipino science fiction
ODP
What is MVC?
ODP
Thesis proposal checklist
PDF
FOSS and social development
PDF
Metadata 101
PDF
Creative nonfiction
PDF
Speculative Fiction
PDF
Online Literature
PDF
Writing Short Fiction
PDF
Teaching Open Source In The University
PDF
PDF
Understanding The Boot Process
ODP
Ubuntu For Intranet Services
PDF
Open Source In Education
Welcome Address - CS Cluster Orientation
Story a meditation
Video Games as Culture and Experience
Privacy and how the Internet works
Why you can't write filipino science fiction
What is MVC?
Thesis proposal checklist
FOSS and social development
Metadata 101
Creative nonfiction
Speculative Fiction
Online Literature
Writing Short Fiction
Teaching Open Source In The University
Understanding The Boot Process
Ubuntu For Intranet Services
Open Source In Education

Recently uploaded (20)

PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Approach and Philosophy of On baking technology
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Machine learning based COVID-19 study performance prediction
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
cuic standard and advanced reporting.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
A Presentation on Artificial Intelligence
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PPT
Teaching material agriculture food technology
PDF
Empathic Computing: Creating Shared Understanding
Building Integrated photovoltaic BIPV_UPV.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
Approach and Philosophy of On baking technology
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Per capita expenditure prediction using model stacking based on satellite ima...
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Machine learning based COVID-19 study performance prediction
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
cuic standard and advanced reporting.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Encapsulation_ Review paper, used for researhc scholars
A Presentation on Artificial Intelligence
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
Reach Out and Touch Someone: Haptics and Empathic Computing
Agricultural_Statistics_at_a_Glance_2022_0.pdf
MYSQL Presentation for SQL database connectivity
Teaching material agriculture food technology
Empathic Computing: Creating Shared Understanding

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.