SlideShare a Scribd company logo
1 of 32
Download to read offline
LINUX ARCHITECTURE
Outline
● Linux history
● Linux system architecture
● Linux kernel
● Kernel Architecture overview
● Kernel Functional overview
– File system
– Process management
– Memory management
– Device driver
– Networking
History of Linux
● First truly free UNIX like OS
● 1983 , GNU developed by Richard Stallman but kernel was missing
● Personal project by Finnish student Linus Torvalds to create a new
free operating system kernel in year 1991.
● Linus Torvalds began a project that later became the Linux kernel.
● First version of kernel 0.01
● 1991 from few c files to 18 million lines in 2015
History of Linux
Characteristics of linux OS
● Multiuser Capability
● Multitasking
● Portability – Works on different hardware
● Security
– Authentication
– Authorization
– Encryption
Linux system architecture
Linux system architecture
● Hardware layer – Consist of all peripherical devices like RAM, CPU, HD
● Kernel
– Core of OS
– Interacts with hardware
– Perform low level services
Shell
– Interface to kernel. Hides complexity of kernel from users.
– Take commands and executes kernel functions.
● Utilities
Linux system architecture
Linux system architecture
Linux kernel
● Monolithic kernel
● Supports
– Preemptive mutitasking
– Virtual memory
– Shared libraries
– Demand loading
– Memory mangement
– Threading
– Loadable kernel modules
Kernel Functional overview
Linux system architecture
● Virtual address space – 0x0000000 to 0xFFFFFFFF for 32bit linux
● User space - normal programs run
– Contains data, stack
● Kernel space - where kernel run
– Contains kernel code, pagetable..
File systems
● In UNIX everything is a file
● Filesystem is a hierarchical storage of data adhering to a specific
structure
● Tree like structure
● Folders named as directories
● Root - '/ '
File systems
● Sort of files : directories (d), special files(s), links(l), sockets (s),
named pipes(p)
● Major partitions on a Linux system:
– data partition: system data, including the root partition
containing all the data to start up and run the system
– swap partition: expansion of the computer's physical memory,
extra memory on hard disk(twice amount of RAM)
● Mount point
– Partitions attached through mount point
File systems
● Virtual file system
File system
● Concepts in VFS
– Super block – filesystem metadata
– Inode – File metadata(permissions, owner, creation time)
● VFS is designed to work with filesystems that understand and
implement such concepts
File systems - VFS
● Four object types of VFS
– Superblock object – specific mounted filesystem.
– inode object - a specific file.
– dentry object - directory entry, which is a single component of
a path.
– file object - an open file as associated with a process.
Process management and Scheduling
● Illusion of multitasking
● Issues kernel must resolve
– Applications must not interfere.
– CPU time shared fairly.
● Process priorities
– Hard real time process
– Soft real time process
● Allocation of CPU time
Process management and Scheduling
● Fork and exec system calls
● Process life cycle
– Running, Waiting, Sleeping, Zombie
Process management
Process management and Scheduling
● User and kernel mode
● Interrupts and kernel threads
● Pre emptive multitasking
– Scheduler can take global decisions to start and stop a process
Process management and scheduling
● I/O bound and processor bound process
– I/O bound : much time on waiting request from I/O
– Process bound : much time on executing code
● Nice values – range from -20 to 19 (default 0)
– Larger nice value low priority
● Time slice (default 20 ms)
– Numeric value showing
how long a task can run
Process management and scheduling
● Scheduling policy with example
– Consider two runnable task text editor and video encoder
– Text editor – I/O bound, video encoder – processor bound
– Text editor : Interactive process hence larger timeslice and high
priority
Memory management
● Virtual memory – makes system appear to have more memory than it
actually has
– Virtual memory greater than physical memory
– Each process have its own virtual address space
– Sharing of physical memory
● Zones
– ZONE_DMA - This zone contains pages that can undergo DMA.
– ZONE_DMA32 - these pages are accessible only by 32-bit devices
– ZONE_NORMAL - contains normal, regularly mapped, pages.
– ZONE_HIGHMEM - contains “high memory,” which are pages not
permanently mapped into the kernel’s address space.
Memory management
● Page table - Data structures used to map virtual to physical address
● Pages – memory divided into chunks of equal size. (Intel x86 4Kbytes)
Memory management
● Linux page tables
Memory management
● Demand paging
– Creating page faults and bringing image/file/data from disk to
physical memory
– Process should wait in queue until it is fetched
● Swapping
– No free space in RAM swapping done and done by kswapd
– The page selected for swapping has modified (dirty page)it is saved
as swap file.
– Least recently used(LRU) used for swapping.
● Shared virtual memory
– Two process sharing same physical memory
Memory management
● Page allocation and deallocation
– mem_map_t : decribes single physical page
– free_area : to find free pages
– Buddy algorithm to allocate and deallocate pages
– Page allocation results in page fragmentation
– Reallocation combiles fragmented pages into large blocks
● Malloc(), vmalloc() and kmalloc()
Memory management
Devices drivers
● Communicate I/O devices through device files.
● Character and Block devices
– Character - continous stream of data, eg:modem
– Block – BLock of data, eg: hard disc
Device drivers
● Dynamic creation of device files
Thank you

More Related Content

What's hot

Linux Initialization Process (2)
Linux Initialization Process (2)Linux Initialization Process (2)
Linux Initialization Process (2)shimosawa
 
Part 02 Linux Kernel Module Programming
Part 02 Linux Kernel Module ProgrammingPart 02 Linux Kernel Module Programming
Part 02 Linux Kernel Module ProgrammingTushar B Kute
 
Memory management in Linux
Memory management in LinuxMemory management in Linux
Memory management in LinuxRaghu Udiyar
 
Linux Memory Management
Linux Memory ManagementLinux Memory Management
Linux Memory ManagementNi Zo-Ma
 
Linux architecture
Linux architectureLinux architecture
Linux architecturemcganesh
 
Device Tree for Dummies (ELC 2014)
Device Tree for Dummies (ELC 2014)Device Tree for Dummies (ELC 2014)
Device Tree for Dummies (ELC 2014)Thomas Petazzoni
 
Arm device tree and linux device drivers
Arm device tree and linux device driversArm device tree and linux device drivers
Arm device tree and linux device driversHoucheng Lin
 
Linux memory-management-kamal
Linux memory-management-kamalLinux memory-management-kamal
Linux memory-management-kamalKamal Maiti
 
Linux command ppt
Linux command pptLinux command ppt
Linux command pptkalyanineve
 
Linux internal
Linux internalLinux internal
Linux internalmcganesh
 
Introduction to Linux Kernel
Introduction to Linux KernelIntroduction to Linux Kernel
Introduction to Linux KernelStryker King
 
The Linux Kernel Scheduler (For Beginners) - SFO17-421
The Linux Kernel Scheduler (For Beginners) - SFO17-421The Linux Kernel Scheduler (For Beginners) - SFO17-421
The Linux Kernel Scheduler (For Beginners) - SFO17-421Linaro
 

What's hot (20)

Linux kernel
Linux kernelLinux kernel
Linux kernel
 
Embedded Linux Kernel - Build your custom kernel
Embedded Linux Kernel - Build your custom kernelEmbedded Linux Kernel - Build your custom kernel
Embedded Linux Kernel - Build your custom kernel
 
Architecture Of The Linux Kernel
Architecture Of The Linux KernelArchitecture Of The Linux Kernel
Architecture Of The Linux Kernel
 
Linux Initialization Process (2)
Linux Initialization Process (2)Linux Initialization Process (2)
Linux Initialization Process (2)
 
Part 02 Linux Kernel Module Programming
Part 02 Linux Kernel Module ProgrammingPart 02 Linux Kernel Module Programming
Part 02 Linux Kernel Module Programming
 
Memory management in Linux
Memory management in LinuxMemory management in Linux
Memory management in Linux
 
Linux Memory Management
Linux Memory ManagementLinux Memory Management
Linux Memory Management
 
Linux Memory Management
Linux Memory ManagementLinux Memory Management
Linux Memory Management
 
Linux architecture
Linux architectureLinux architecture
Linux architecture
 
Device Tree for Dummies (ELC 2014)
Device Tree for Dummies (ELC 2014)Device Tree for Dummies (ELC 2014)
Device Tree for Dummies (ELC 2014)
 
Arm device tree and linux device drivers
Arm device tree and linux device driversArm device tree and linux device drivers
Arm device tree and linux device drivers
 
Linux memory-management-kamal
Linux memory-management-kamalLinux memory-management-kamal
Linux memory-management-kamal
 
Linux command ppt
Linux command pptLinux command ppt
Linux command ppt
 
Linux OS presentation
Linux OS presentationLinux OS presentation
Linux OS presentation
 
Basic Linux Internals
Basic Linux InternalsBasic Linux Internals
Basic Linux Internals
 
Linux internal
Linux internalLinux internal
Linux internal
 
Introduction to Linux Kernel
Introduction to Linux KernelIntroduction to Linux Kernel
Introduction to Linux Kernel
 
Notes on NUMA architecture
Notes on NUMA architectureNotes on NUMA architecture
Notes on NUMA architecture
 
The Linux Kernel Scheduler (For Beginners) - SFO17-421
The Linux Kernel Scheduler (For Beginners) - SFO17-421The Linux Kernel Scheduler (For Beginners) - SFO17-421
The Linux Kernel Scheduler (For Beginners) - SFO17-421
 
Linux introduction
Linux introductionLinux introduction
Linux introduction
 

Similar to Linux kernel architecture

Ospresentation 120112074429-phpapp02 (1)
Ospresentation 120112074429-phpapp02 (1)Ospresentation 120112074429-phpapp02 (1)
Ospresentation 120112074429-phpapp02 (1)Vivian Vhaves
 
Chap1_Part2.pptx
Chap1_Part2.pptxChap1_Part2.pptx
Chap1_Part2.pptxNMohd3
 
Linux操作系统01 简介
Linux操作系统01 简介Linux操作系统01 简介
Linux操作系统01 简介lclsg123
 
Resource Monitoring and management
Resource Monitoring and management  Resource Monitoring and management
Resource Monitoring and management Duressa Teshome
 
InnoDB architecture and performance optimization (Пётр Зайцев)
InnoDB architecture and performance optimization (Пётр Зайцев)InnoDB architecture and performance optimization (Пётр Зайцев)
InnoDB architecture and performance optimization (Пётр Зайцев)Ontico
 
Innodb 和 XtraDB 结构和性能优化
Innodb 和 XtraDB 结构和性能优化Innodb 和 XtraDB 结构和性能优化
Innodb 和 XtraDB 结构和性能优化YUCHENG HU
 
Mac Memory Analysis with Volatility
Mac Memory Analysis with VolatilityMac Memory Analysis with Volatility
Mac Memory Analysis with VolatilityAndrew Case
 
11. operating-systems-part-1
11. operating-systems-part-111. operating-systems-part-1
11. operating-systems-part-1Muhammad Ahad
 
Lecture 8 comp forensics 03 10-18 file system
Lecture 8 comp forensics 03 10-18 file systemLecture 8 comp forensics 03 10-18 file system
Lecture 8 comp forensics 03 10-18 file systemAlchemist095
 

Similar to Linux kernel architecture (20)

Ospresentation 120112074429-phpapp02 (1)
Ospresentation 120112074429-phpapp02 (1)Ospresentation 120112074429-phpapp02 (1)
Ospresentation 120112074429-phpapp02 (1)
 
Chap1_Part2.pptx
Chap1_Part2.pptxChap1_Part2.pptx
Chap1_Part2.pptx
 
Os
OsOs
Os
 
ubantu ppt.pptx
ubantu ppt.pptxubantu ppt.pptx
ubantu ppt.pptx
 
Linux操作系统01 简介
Linux操作系统01 简介Linux操作系统01 简介
Linux操作系统01 简介
 
Ubuntu OS Presentation
Ubuntu OS PresentationUbuntu OS Presentation
Ubuntu OS Presentation
 
Os
OsOs
Os
 
Resource Monitoring and management
Resource Monitoring and management  Resource Monitoring and management
Resource Monitoring and management
 
InnoDB architecture and performance optimization (Пётр Зайцев)
InnoDB architecture and performance optimization (Пётр Зайцев)InnoDB architecture and performance optimization (Пётр Зайцев)
InnoDB architecture and performance optimization (Пётр Зайцев)
 
Linux para iniciantes
Linux para iniciantesLinux para iniciantes
Linux para iniciantes
 
Linux Kernel
Linux KernelLinux Kernel
Linux Kernel
 
Innodb 和 XtraDB 结构和性能优化
Innodb 和 XtraDB 结构和性能优化Innodb 和 XtraDB 结构和性能优化
Innodb 和 XtraDB 结构和性能优化
 
Mac Memory Analysis with Volatility
Mac Memory Analysis with VolatilityMac Memory Analysis with Volatility
Mac Memory Analysis with Volatility
 
Unix File System
Unix File SystemUnix File System
Unix File System
 
File systems for Embedded Linux
File systems for Embedded LinuxFile systems for Embedded Linux
File systems for Embedded Linux
 
Linux introduction
Linux introductionLinux introduction
Linux introduction
 
11. operating-systems-part-1
11. operating-systems-part-111. operating-systems-part-1
11. operating-systems-part-1
 
Linux-Internals-and-Networking
Linux-Internals-and-NetworkingLinux-Internals-and-Networking
Linux-Internals-and-Networking
 
Ioppt
IopptIoppt
Ioppt
 
Lecture 8 comp forensics 03 10-18 file system
Lecture 8 comp forensics 03 10-18 file systemLecture 8 comp forensics 03 10-18 file system
Lecture 8 comp forensics 03 10-18 file system
 

Recently uploaded

(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...ranjana rawat
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxpurnimasatapathy1234
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 

Recently uploaded (20)

(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
The Most Attractive Pune Call Girls Budhwar Peth 8250192130 Will You Miss Thi...
 
Microscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptxMicroscopic Analysis of Ceramic Materials.pptx
Microscopic Analysis of Ceramic Materials.pptx
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
Roadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and RoutesRoadmap to Membership of RICS - Pathways and Routes
Roadmap to Membership of RICS - Pathways and Routes
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 

Linux kernel architecture

  • 2. Outline ● Linux history ● Linux system architecture ● Linux kernel ● Kernel Architecture overview ● Kernel Functional overview – File system – Process management – Memory management – Device driver – Networking
  • 3. History of Linux ● First truly free UNIX like OS ● 1983 , GNU developed by Richard Stallman but kernel was missing ● Personal project by Finnish student Linus Torvalds to create a new free operating system kernel in year 1991. ● Linus Torvalds began a project that later became the Linux kernel. ● First version of kernel 0.01 ● 1991 from few c files to 18 million lines in 2015
  • 5. Characteristics of linux OS ● Multiuser Capability ● Multitasking ● Portability – Works on different hardware ● Security – Authentication – Authorization – Encryption
  • 7. Linux system architecture ● Hardware layer – Consist of all peripherical devices like RAM, CPU, HD ● Kernel – Core of OS – Interacts with hardware – Perform low level services Shell – Interface to kernel. Hides complexity of kernel from users. – Take commands and executes kernel functions. ● Utilities
  • 10. Linux kernel ● Monolithic kernel ● Supports – Preemptive mutitasking – Virtual memory – Shared libraries – Demand loading – Memory mangement – Threading – Loadable kernel modules
  • 12. Linux system architecture ● Virtual address space – 0x0000000 to 0xFFFFFFFF for 32bit linux ● User space - normal programs run – Contains data, stack ● Kernel space - where kernel run – Contains kernel code, pagetable..
  • 13. File systems ● In UNIX everything is a file ● Filesystem is a hierarchical storage of data adhering to a specific structure ● Tree like structure ● Folders named as directories ● Root - '/ '
  • 14. File systems ● Sort of files : directories (d), special files(s), links(l), sockets (s), named pipes(p) ● Major partitions on a Linux system: – data partition: system data, including the root partition containing all the data to start up and run the system – swap partition: expansion of the computer's physical memory, extra memory on hard disk(twice amount of RAM) ● Mount point – Partitions attached through mount point
  • 16. File system ● Concepts in VFS – Super block – filesystem metadata – Inode – File metadata(permissions, owner, creation time) ● VFS is designed to work with filesystems that understand and implement such concepts
  • 17. File systems - VFS ● Four object types of VFS – Superblock object – specific mounted filesystem. – inode object - a specific file. – dentry object - directory entry, which is a single component of a path. – file object - an open file as associated with a process.
  • 18. Process management and Scheduling ● Illusion of multitasking ● Issues kernel must resolve – Applications must not interfere. – CPU time shared fairly. ● Process priorities – Hard real time process – Soft real time process ● Allocation of CPU time
  • 19. Process management and Scheduling ● Fork and exec system calls ● Process life cycle – Running, Waiting, Sleeping, Zombie
  • 21. Process management and Scheduling ● User and kernel mode ● Interrupts and kernel threads ● Pre emptive multitasking – Scheduler can take global decisions to start and stop a process
  • 22. Process management and scheduling ● I/O bound and processor bound process – I/O bound : much time on waiting request from I/O – Process bound : much time on executing code ● Nice values – range from -20 to 19 (default 0) – Larger nice value low priority ● Time slice (default 20 ms) – Numeric value showing how long a task can run
  • 23. Process management and scheduling ● Scheduling policy with example – Consider two runnable task text editor and video encoder – Text editor – I/O bound, video encoder – processor bound – Text editor : Interactive process hence larger timeslice and high priority
  • 24. Memory management ● Virtual memory – makes system appear to have more memory than it actually has – Virtual memory greater than physical memory – Each process have its own virtual address space – Sharing of physical memory ● Zones – ZONE_DMA - This zone contains pages that can undergo DMA. – ZONE_DMA32 - these pages are accessible only by 32-bit devices – ZONE_NORMAL - contains normal, regularly mapped, pages. – ZONE_HIGHMEM - contains “high memory,” which are pages not permanently mapped into the kernel’s address space.
  • 25. Memory management ● Page table - Data structures used to map virtual to physical address ● Pages – memory divided into chunks of equal size. (Intel x86 4Kbytes)
  • 27. Memory management ● Demand paging – Creating page faults and bringing image/file/data from disk to physical memory – Process should wait in queue until it is fetched ● Swapping – No free space in RAM swapping done and done by kswapd – The page selected for swapping has modified (dirty page)it is saved as swap file. – Least recently used(LRU) used for swapping. ● Shared virtual memory – Two process sharing same physical memory
  • 28. Memory management ● Page allocation and deallocation – mem_map_t : decribes single physical page – free_area : to find free pages – Buddy algorithm to allocate and deallocate pages – Page allocation results in page fragmentation – Reallocation combiles fragmented pages into large blocks ● Malloc(), vmalloc() and kmalloc()
  • 30. Devices drivers ● Communicate I/O devices through device files. ● Character and Block devices – Character - continous stream of data, eg:modem – Block – BLock of data, eg: hard disc
  • 31. Device drivers ● Dynamic creation of device files