SlideShare uma empresa Scribd logo
1 de 28
LINUX KERNEL
Presented by:
Rohit Pratap Singh
CS- 05/09
Jorhat Engineering College
Background on Linux
Linus Torvalds
– Creator of Linux
Open Source Operating System
Free Software
Source Code Available
WHAT IS A KERNEL?
CORE OF THE
OPERATING
SYSTEM
KERNEL
Architecture
Monolithic
Contains all
the OS
related stuff
1. Microkernel
Contains only
the OS core
2. Hybrid
Combination
of Monolithic
& Microkernel
3.
Linux Kernel is implemented using Monolithic Architecture
Difference
KERNEL MODULE
 Sections of kernel code that can be compiled, loaded, and
unloaded independent of the rest of the kernel.
 A kernel module may typically implement a device driver, a
file system, or a networking protocol.
 The module interface allows third parties to write and
distribute, on their own terms, device drivers or file systems
that could not be distributed under the GPL.
 Kernel modules allow a Linux system to be set up with a
standard, minimal kernel, without any extra device drivers
built in.
 Three components to Linux module support:
◦ module management
◦ driver registration
◦ conflict resolution
Module Management
 Supports loading modules into memory and letting
them talk to the rest of the kernel.
 Module loading is split into two separate sections:
◦ Managing sections of module code in kernel
memory
◦ Handling symbols that modules are allowed to
reference
 The module requestor manages loading requested,
but currently unloaded, modules; it also regularly
queries the kernel to see whether a dynamically
loaded module is still in use, and will unload it
when it is no longer actively needed.
Driver Registration
 Allows modules to tell the rest of the kernel that a
new driver has become available.
 The kernel maintains dynamic tables of all known
drivers, and provides a set of routines to allow
drivers to be added to or removed from these
tables at any time.
 Registration tables include the following items:
◦ Device drivers
◦ File systems
◦ Network protocols
◦ Binary format
Conflict Resolution
 A mechanism that allows different device drivers to
reserve hardware resources and to protect those
resources from accidental use by another driver
 The conflict resolution module aims to:
◦ Prevent modules from clashing over access to
hardware resources
◦ Prevent auto probes from interfering with existing
device drivers
◦ Resolve conflicts with multiple drivers trying to
access the same hardware
Linux Kernel Functional
Overview
Process Management
Memory Management
Kernel Synchronization
File System Management
Inter-process communication
Device and I/O Management
Network Management
Security
Process Management
Linux
implements the
fork() and exec()
process model.
Process identity consists of-
•Process ID (PID): unique identifier, used to specify the
process to the kernel when an application makes a system
call to signal, modify, or wait for another process.
•Credentials: Each process must have an associated user ID
and one or more group IDs that determine the process’s rights
to access system resources and files.
•Personality: Not traditionally found on UNIX systems, but
under Linux each process has an associated personality
identifier that can slightly modify the semantics of certain
system calls.
Used primarily by emulation libraries to request that system
calls be compatible with certain specific flavors of UNIX.
The process’s environment is inherited from its
parent, and is composed of two null-terminated
vectors:
The argument vector lists the command-line
arguments used to invoke the running program;
conventionally starts with the name of the
program itself
The environment vector is a list of
“NAME=VALUE” pairs that associates named
environment variables with arbitrary textual
values.
Process context: state of the running
program; includes scheduling context,
accounting information, file table, file-system
context, signal-handler table, and virtual
memory context
Memory Management
The Linux kernel
allocates memory to
itself using the buddy
system as well as slab
allocation.
Virtual memory paging
system allocates
memory to processes.
The pageout-policy
algorithm decides which
pages to write out to
disk.
Uses a modified
version of the
second-chance
(clock) algorithm.
Each page has an
age that is
adjusted on each
pass of the clock.
The age value
allows the
algorithm to select
pages on a LRU
policy.
The paging mechanism
actually carries out the
transfer, and pages data
back into physical
memory as needed:
Supports paging
both to dedicated
swap partitions
and to normal files.
Uses a next-fit
algorithm to write
pages to
contiguous disk
blocks.
Splitting of Memory in a Buddy
Heap
Kernel Synchronization
A request for
kernel-mode
execution can
occur in two ways
A running program may
request an operating
system service, either
explicitly via a system
call, or implicitly, for
example, when a page
fault occurs.
A device driver may
deliver a hardware
interrupt that causes the
CPU to start executing a
kernel-defined handler for
that interrupt.
Kernel
synchronization
requires a
framework that
will allow the
kernel’s critical
sections to run
without
interruption by
another critical
section.
Linux introduced
a preemptive
kernel in Version
2.6
Linux provides
semaphores for locking in
the kernel.
Multiprocessor machines
use spinlocks for short
durations; single
processor machines
disable preemption
instead.
File System
 To the user, Linux’s file system appears as a hierarchical
directory tree obeying UNIX semantics.
 Internally, the kernel hides implementation details and
manages the multiple different file systems via an abstraction
layer, that is, the virtual file system (VFS).
 The Linux VFS is designed around object-oriented principles
and is composed of two components:
◦ A set of definitions that define what a file object is allowed
to look like
 The inode-object and the file-object structures represent
individual files
 the file system object represents an entire file system
◦ A layer of software to manipulate those objects.
The Linux Ext2fs File System
 Ext2fs uses a mechanism similar to that of BSD Fast File
System (ffs) for locating data blocks belonging to a specific
file.
 The main differences between ext2fs and ffs concern their
disk allocation policies.
◦ In ffs, the disk is allocated to files in blocks of 8Kb, with
blocks being subdivided into fragments of 1Kb to store
small files or partially filled blocks at the end of a file.
◦ Ext2fs does not use fragments; it performs its allocations in
smaller units. The default block size on ext2fs is 1Kb,
although 2Kb and 4Kb blocks are also supported.
◦ Ext2fs uses allocation policies designed to place logically
adjacent blocks of a file into physically adjacent blocks on
disk, so that it can submit an I/O request for several disk
blocks as a single operation.
Ext2fs Block-Allocation
Policies
More ext standards (the
extended file system)
• Journaling file system: keeps track
of changes to be made in a journal,
which makes the system easier to
restore after a crash
ext3:
• Can pre-allocate on-disk space for a
file
• Provides timestamps measured in
nanoseconds
ext4:
Input and Output
Device drivers appear as normal files.
• Users open an access channel to a device in the
same way they open any other file.
• Devices are protected by the same permission
system as files.
Linux recognizes three classes of devices:
• Block devices: allow random access to independent, fixed-size blocks
of data (e.g. disks, CD-ROMs, flash memory)
• Character devices: sequential access, data not necessarily in blocks
• Network devices: users communicate with network devices through
the kernel’s network subsystem
Interprocess Communication
Linux informs processes
that an event has
occurred via signals.
• There is a limited number of
signals, and they cannot
carry information.
• Communication within the
kernel is accomplished via
scheduling states and wait
queue structures.
Mechanisms for passing
data between processes:
• The pipe mechanism
allows a child process to
inherit a communication
channel to its parent, data
written to one end of the
pipe can be read a the
other.
• Shared memory: any data written
by one process to a shared memory region
can be read immediately by any other
process that has mapped that region into its
address space.
Network Management
Networking is a key area of
functionality for Linux.
• It supports the standard
Internet protocols for
UNIX-to-UNIX
communications.
• It also implements
protocols native to non-
UNIX operating systems,
e.g., Appletalk and IPX.
Networking in the Linux
kernel is implemented by
three software layers:
• Socket interface: works
with network addresses for
a variety of network
protocols
• Protocol drivers:
implements creation and
reassembly of packets,
routing between hosts, etc.
• Network device drivers:
interface with specific
devices
Security
Authentication: no one can access system without entry
rights
• Uses a password file to store encrypted passwords.
• Pluggable authentication modules (PAM): allows on-demand loading of
authentication modules that improve security
Access control: no one can access objects within the
system without access rights
• Files, devices, and other objects share the same access-control system.
• Implemented through numeric identifiers for users (UID) and groups (GID)
• Objects have a protection mask that specifies which access modes (read,
write, or execute) are granted to owner, group, and world.
Linux Source Tree Layout
/usr/src/linuxDocumentation
arch
fs
init kernel
include
ipc
drivers
net
mmlib
scripts
alpha
arm
i386
ia64
m68k
mips
mips64
ppc
s390
sh
sparc
sparc64
acorn
atm
block
cdrom
char
dio
fc4
i2c
i2o
ide
ieee1394
isdn
macintosh
misc
net
…
adfs
affs
autofs
autofs4
bfs
code
cramfs
devfs
devpts
efs
ext2
fat
hfs
hpfs
…
asm-alpha
asm-arm
asm-generic
asm-i386
asm-ia64
asm-m68k
asm-mips
asm-mips64
linux
math-emu
net
pcmcia
scsi
video …
adfs
affs
autofs
autofs4
bfs
code
cramfs
devfs
devpts
efs
ext2
fat
hfs
hpfs …
802
appletalk
atm
ax25
bridge
core
decnet
econet
ethernet
ipv4
ipv6
ipx
irda
khttpd
lapb
…
Linux kernel development
cycle
Linux kernel development
cycle
 Version 0.01 (May 1991) had no networking, ran only on
80386-compatible Intel processors and on PC hardware, had
extremely limited device-drive support, and supported only
the Minix file system.
 Linux 1.0 (March 1994) included these new features:
◦ Support for UNIX’s standard TCP/IP networking protocols
◦ BSD-compatible socket interface for networking
programming
◦ Device-driver support for running IP over an Ethernet
◦ Enhanced file system
◦ Support for a range of SCSI controllers for
high-performance disk access
◦ Extra hardware support
 Version 1.2 (March 1995) was the final PC-only Linux kernel.
Linux 2.0
 Released in June 1996, 2.0 added two major new
capabilities:
◦ Support for multiple architectures, including a fully 64-bit
native Alpha port.
◦ Support for multiprocessor architectures
 Other new features included:
◦ Improved memory-management code
◦ Improved TCP/IP performance
◦ Support for internal kernel threads, for handling
dependencies between loadable modules, and for
automatic loading of modules on demand.
◦ Standardized configuration interface
Conclusion
Stability
Runs on
old
hardware
Free and
opensource
Security
THANK YOU
Contact info – rohitkako@gmail.com
www.facebook.com/rohitkako

Mais conteúdo relacionado

Mais procurados

Evolution of Android Update Principles
Evolution of Android Update PrinciplesEvolution of Android Update Principles
Evolution of Android Update PrinciplesGlobalLogic Ukraine
 
Linux Introduction (Commands)
Linux Introduction (Commands)Linux Introduction (Commands)
Linux Introduction (Commands)anandvaidya
 
Lcu14 107- op-tee on ar mv8
Lcu14 107- op-tee on ar mv8Lcu14 107- op-tee on ar mv8
Lcu14 107- op-tee on ar mv8Linaro
 
Linux Internals - Kernel/Core
Linux Internals - Kernel/CoreLinux Internals - Kernel/Core
Linux Internals - Kernel/CoreShay Cohen
 
Linux presentation
Linux presentationLinux presentation
Linux presentationNikhil Jain
 
Linux Administration
Linux AdministrationLinux Administration
Linux AdministrationHarish1983
 
Linux kernel Architecture and Properties
Linux kernel Architecture and PropertiesLinux kernel Architecture and Properties
Linux kernel Architecture and PropertiesSaadi Rahman
 
Xen Project Contributor Training - Part 1 introduction v1.0
Xen Project Contributor Training - Part 1 introduction v1.0Xen Project Contributor Training - Part 1 introduction v1.0
Xen Project Contributor Training - Part 1 introduction v1.0The Linux Foundation
 
Android Storage - Vold
Android Storage - VoldAndroid Storage - Vold
Android Storage - VoldWilliam Lee
 
SFO15-200: Linux kernel generic TEE driver
SFO15-200: Linux kernel generic TEE driverSFO15-200: Linux kernel generic TEE driver
SFO15-200: Linux kernel generic TEE driverLinaro
 
Linux User Management
Linux User ManagementLinux User Management
Linux User ManagementGaurav Mishra
 
Linux or unix interview questions
Linux or unix interview questionsLinux or unix interview questions
Linux or unix interview questionsTeja Bheemanapally
 
Unix/Linux Basic Commands and Shell Script
Unix/Linux Basic Commands and Shell ScriptUnix/Linux Basic Commands and Shell Script
Unix/Linux Basic Commands and Shell Scriptsbmguys
 
Linux kernel architecture
Linux kernel architectureLinux kernel architecture
Linux kernel architectureSHAJANA BASHEER
 
Linux architecture
Linux architectureLinux architecture
Linux architecturemcganesh
 
Android booting sequece and setup and debugging
Android booting sequece and setup and debuggingAndroid booting sequece and setup and debugging
Android booting sequece and setup and debuggingUtkarsh Mankad
 
Linux System Monitoring basic commands
Linux System Monitoring basic commandsLinux System Monitoring basic commands
Linux System Monitoring basic commandsMohammad Rafiee
 

Mais procurados (20)

Evolution of Android Update Principles
Evolution of Android Update PrinciplesEvolution of Android Update Principles
Evolution of Android Update Principles
 
Linux Introduction (Commands)
Linux Introduction (Commands)Linux Introduction (Commands)
Linux Introduction (Commands)
 
Lcu14 107- op-tee on ar mv8
Lcu14 107- op-tee on ar mv8Lcu14 107- op-tee on ar mv8
Lcu14 107- op-tee on ar mv8
 
UEFI HTTP/HTTPS Boot
UEFI HTTP/HTTPS BootUEFI HTTP/HTTPS Boot
UEFI HTTP/HTTPS Boot
 
Linux Internals - Kernel/Core
Linux Internals - Kernel/CoreLinux Internals - Kernel/Core
Linux Internals - Kernel/Core
 
Linux presentation
Linux presentationLinux presentation
Linux presentation
 
Linux Administration
Linux AdministrationLinux Administration
Linux Administration
 
Linux kernel Architecture and Properties
Linux kernel Architecture and PropertiesLinux kernel Architecture and Properties
Linux kernel Architecture and Properties
 
Xen Project Contributor Training - Part 1 introduction v1.0
Xen Project Contributor Training - Part 1 introduction v1.0Xen Project Contributor Training - Part 1 introduction v1.0
Xen Project Contributor Training - Part 1 introduction v1.0
 
Android Storage - Vold
Android Storage - VoldAndroid Storage - Vold
Android Storage - Vold
 
SFO15-200: Linux kernel generic TEE driver
SFO15-200: Linux kernel generic TEE driverSFO15-200: Linux kernel generic TEE driver
SFO15-200: Linux kernel generic TEE driver
 
Linux User Management
Linux User ManagementLinux User Management
Linux User Management
 
Linux Internals - Part II
Linux Internals - Part IILinux Internals - Part II
Linux Internals - Part II
 
Linux or unix interview questions
Linux or unix interview questionsLinux or unix interview questions
Linux or unix interview questions
 
Intro to linux
Intro to linuxIntro to linux
Intro to linux
 
Unix/Linux Basic Commands and Shell Script
Unix/Linux Basic Commands and Shell ScriptUnix/Linux Basic Commands and Shell Script
Unix/Linux Basic Commands and Shell Script
 
Linux kernel architecture
Linux kernel architectureLinux kernel architecture
Linux kernel architecture
 
Linux architecture
Linux architectureLinux architecture
Linux architecture
 
Android booting sequece and setup and debugging
Android booting sequece and setup and debuggingAndroid booting sequece and setup and debugging
Android booting sequece and setup and debugging
 
Linux System Monitoring basic commands
Linux System Monitoring basic commandsLinux System Monitoring basic commands
Linux System Monitoring basic commands
 

Semelhante a linux kernel overview 2013

Semelhante a linux kernel overview 2013 (20)

Linux architecture
Linux architectureLinux architecture
Linux architecture
 
Linux internal
Linux internalLinux internal
Linux internal
 
Mca ii os u-5 unix linux file system
Mca  ii  os u-5 unix linux file systemMca  ii  os u-5 unix linux file system
Mca ii os u-5 unix linux file system
 
Ch22
Ch22Ch22
Ch22
 
OS_Ch20
OS_Ch20OS_Ch20
OS_Ch20
 
OSCh20
OSCh20OSCh20
OSCh20
 
Ch20 OS
Ch20 OSCh20 OS
Ch20 OS
 
Studies
StudiesStudies
Studies
 
Linux os
Linux osLinux os
Linux os
 
Linux@assignment ppt
Linux@assignment pptLinux@assignment ppt
Linux@assignment ppt
 
Driver Programming Report
Driver Programming ReportDriver Programming Report
Driver Programming Report
 
Operating system
Operating systemOperating system
Operating system
 
Chapter 21 - The Linux System
Chapter 21 - The Linux SystemChapter 21 - The Linux System
Chapter 21 - The Linux System
 
Io sy.stemppt
Io sy.stempptIo sy.stemppt
Io sy.stemppt
 
CS8493-OS-Unit-5.pdf
CS8493-OS-Unit-5.pdfCS8493-OS-Unit-5.pdf
CS8493-OS-Unit-5.pdf
 
Cs8493 unit 5
Cs8493 unit 5Cs8493 unit 5
Cs8493 unit 5
 
Ubuntu OS Presentation
Ubuntu OS PresentationUbuntu OS Presentation
Ubuntu OS Presentation
 
Microx - A Unix like kernel for Embedded Systems written from scratch.
Microx - A Unix like kernel for Embedded Systems written from scratch.Microx - A Unix like kernel for Embedded Systems written from scratch.
Microx - A Unix like kernel for Embedded Systems written from scratch.
 
Linux vs windows
Linux vs windowsLinux vs windows
Linux vs windows
 
Ospresentation 120112074429-phpapp02 (1)
Ospresentation 120112074429-phpapp02 (1)Ospresentation 120112074429-phpapp02 (1)
Ospresentation 120112074429-phpapp02 (1)
 

Último

Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfSherif Taha
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSCeline George
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and ModificationsMJDuyan
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxAmanpreet Kaur
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 

Último (20)

Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 

linux kernel overview 2013

  • 1. LINUX KERNEL Presented by: Rohit Pratap Singh CS- 05/09 Jorhat Engineering College
  • 2. Background on Linux Linus Torvalds – Creator of Linux Open Source Operating System Free Software Source Code Available
  • 3. WHAT IS A KERNEL? CORE OF THE OPERATING SYSTEM
  • 4. KERNEL Architecture Monolithic Contains all the OS related stuff 1. Microkernel Contains only the OS core 2. Hybrid Combination of Monolithic & Microkernel 3. Linux Kernel is implemented using Monolithic Architecture
  • 6. KERNEL MODULE  Sections of kernel code that can be compiled, loaded, and unloaded independent of the rest of the kernel.  A kernel module may typically implement a device driver, a file system, or a networking protocol.  The module interface allows third parties to write and distribute, on their own terms, device drivers or file systems that could not be distributed under the GPL.  Kernel modules allow a Linux system to be set up with a standard, minimal kernel, without any extra device drivers built in.  Three components to Linux module support: ◦ module management ◦ driver registration ◦ conflict resolution
  • 7. Module Management  Supports loading modules into memory and letting them talk to the rest of the kernel.  Module loading is split into two separate sections: ◦ Managing sections of module code in kernel memory ◦ Handling symbols that modules are allowed to reference  The module requestor manages loading requested, but currently unloaded, modules; it also regularly queries the kernel to see whether a dynamically loaded module is still in use, and will unload it when it is no longer actively needed.
  • 8. Driver Registration  Allows modules to tell the rest of the kernel that a new driver has become available.  The kernel maintains dynamic tables of all known drivers, and provides a set of routines to allow drivers to be added to or removed from these tables at any time.  Registration tables include the following items: ◦ Device drivers ◦ File systems ◦ Network protocols ◦ Binary format
  • 9. Conflict Resolution  A mechanism that allows different device drivers to reserve hardware resources and to protect those resources from accidental use by another driver  The conflict resolution module aims to: ◦ Prevent modules from clashing over access to hardware resources ◦ Prevent auto probes from interfering with existing device drivers ◦ Resolve conflicts with multiple drivers trying to access the same hardware
  • 10. Linux Kernel Functional Overview Process Management Memory Management Kernel Synchronization File System Management Inter-process communication Device and I/O Management Network Management Security
  • 11. Process Management Linux implements the fork() and exec() process model. Process identity consists of- •Process ID (PID): unique identifier, used to specify the process to the kernel when an application makes a system call to signal, modify, or wait for another process. •Credentials: Each process must have an associated user ID and one or more group IDs that determine the process’s rights to access system resources and files. •Personality: Not traditionally found on UNIX systems, but under Linux each process has an associated personality identifier that can slightly modify the semantics of certain system calls. Used primarily by emulation libraries to request that system calls be compatible with certain specific flavors of UNIX. The process’s environment is inherited from its parent, and is composed of two null-terminated vectors: The argument vector lists the command-line arguments used to invoke the running program; conventionally starts with the name of the program itself The environment vector is a list of “NAME=VALUE” pairs that associates named environment variables with arbitrary textual values. Process context: state of the running program; includes scheduling context, accounting information, file table, file-system context, signal-handler table, and virtual memory context
  • 12. Memory Management The Linux kernel allocates memory to itself using the buddy system as well as slab allocation. Virtual memory paging system allocates memory to processes. The pageout-policy algorithm decides which pages to write out to disk. Uses a modified version of the second-chance (clock) algorithm. Each page has an age that is adjusted on each pass of the clock. The age value allows the algorithm to select pages on a LRU policy. The paging mechanism actually carries out the transfer, and pages data back into physical memory as needed: Supports paging both to dedicated swap partitions and to normal files. Uses a next-fit algorithm to write pages to contiguous disk blocks.
  • 13. Splitting of Memory in a Buddy Heap
  • 14. Kernel Synchronization A request for kernel-mode execution can occur in two ways A running program may request an operating system service, either explicitly via a system call, or implicitly, for example, when a page fault occurs. A device driver may deliver a hardware interrupt that causes the CPU to start executing a kernel-defined handler for that interrupt. Kernel synchronization requires a framework that will allow the kernel’s critical sections to run without interruption by another critical section. Linux introduced a preemptive kernel in Version 2.6 Linux provides semaphores for locking in the kernel. Multiprocessor machines use spinlocks for short durations; single processor machines disable preemption instead.
  • 15. File System  To the user, Linux’s file system appears as a hierarchical directory tree obeying UNIX semantics.  Internally, the kernel hides implementation details and manages the multiple different file systems via an abstraction layer, that is, the virtual file system (VFS).  The Linux VFS is designed around object-oriented principles and is composed of two components: ◦ A set of definitions that define what a file object is allowed to look like  The inode-object and the file-object structures represent individual files  the file system object represents an entire file system ◦ A layer of software to manipulate those objects.
  • 16. The Linux Ext2fs File System  Ext2fs uses a mechanism similar to that of BSD Fast File System (ffs) for locating data blocks belonging to a specific file.  The main differences between ext2fs and ffs concern their disk allocation policies. ◦ In ffs, the disk is allocated to files in blocks of 8Kb, with blocks being subdivided into fragments of 1Kb to store small files or partially filled blocks at the end of a file. ◦ Ext2fs does not use fragments; it performs its allocations in smaller units. The default block size on ext2fs is 1Kb, although 2Kb and 4Kb blocks are also supported. ◦ Ext2fs uses allocation policies designed to place logically adjacent blocks of a file into physically adjacent blocks on disk, so that it can submit an I/O request for several disk blocks as a single operation.
  • 18. More ext standards (the extended file system) • Journaling file system: keeps track of changes to be made in a journal, which makes the system easier to restore after a crash ext3: • Can pre-allocate on-disk space for a file • Provides timestamps measured in nanoseconds ext4:
  • 19. Input and Output Device drivers appear as normal files. • Users open an access channel to a device in the same way they open any other file. • Devices are protected by the same permission system as files. Linux recognizes three classes of devices: • Block devices: allow random access to independent, fixed-size blocks of data (e.g. disks, CD-ROMs, flash memory) • Character devices: sequential access, data not necessarily in blocks • Network devices: users communicate with network devices through the kernel’s network subsystem
  • 20. Interprocess Communication Linux informs processes that an event has occurred via signals. • There is a limited number of signals, and they cannot carry information. • Communication within the kernel is accomplished via scheduling states and wait queue structures. Mechanisms for passing data between processes: • The pipe mechanism allows a child process to inherit a communication channel to its parent, data written to one end of the pipe can be read a the other. • Shared memory: any data written by one process to a shared memory region can be read immediately by any other process that has mapped that region into its address space.
  • 21. Network Management Networking is a key area of functionality for Linux. • It supports the standard Internet protocols for UNIX-to-UNIX communications. • It also implements protocols native to non- UNIX operating systems, e.g., Appletalk and IPX. Networking in the Linux kernel is implemented by three software layers: • Socket interface: works with network addresses for a variety of network protocols • Protocol drivers: implements creation and reassembly of packets, routing between hosts, etc. • Network device drivers: interface with specific devices
  • 22. Security Authentication: no one can access system without entry rights • Uses a password file to store encrypted passwords. • Pluggable authentication modules (PAM): allows on-demand loading of authentication modules that improve security Access control: no one can access objects within the system without access rights • Files, devices, and other objects share the same access-control system. • Implemented through numeric identifiers for users (UID) and groups (GID) • Objects have a protection mask that specifies which access modes (read, write, or execute) are granted to owner, group, and world.
  • 23. Linux Source Tree Layout /usr/src/linuxDocumentation arch fs init kernel include ipc drivers net mmlib scripts alpha arm i386 ia64 m68k mips mips64 ppc s390 sh sparc sparc64 acorn atm block cdrom char dio fc4 i2c i2o ide ieee1394 isdn macintosh misc net … adfs affs autofs autofs4 bfs code cramfs devfs devpts efs ext2 fat hfs hpfs … asm-alpha asm-arm asm-generic asm-i386 asm-ia64 asm-m68k asm-mips asm-mips64 linux math-emu net pcmcia scsi video … adfs affs autofs autofs4 bfs code cramfs devfs devpts efs ext2 fat hfs hpfs … 802 appletalk atm ax25 bridge core decnet econet ethernet ipv4 ipv6 ipx irda khttpd lapb …
  • 25. Linux kernel development cycle  Version 0.01 (May 1991) had no networking, ran only on 80386-compatible Intel processors and on PC hardware, had extremely limited device-drive support, and supported only the Minix file system.  Linux 1.0 (March 1994) included these new features: ◦ Support for UNIX’s standard TCP/IP networking protocols ◦ BSD-compatible socket interface for networking programming ◦ Device-driver support for running IP over an Ethernet ◦ Enhanced file system ◦ Support for a range of SCSI controllers for high-performance disk access ◦ Extra hardware support  Version 1.2 (March 1995) was the final PC-only Linux kernel.
  • 26. Linux 2.0  Released in June 1996, 2.0 added two major new capabilities: ◦ Support for multiple architectures, including a fully 64-bit native Alpha port. ◦ Support for multiprocessor architectures  Other new features included: ◦ Improved memory-management code ◦ Improved TCP/IP performance ◦ Support for internal kernel threads, for handling dependencies between loadable modules, and for automatic loading of modules on demand. ◦ Standardized configuration interface
  • 28. THANK YOU Contact info – rohitkako@gmail.com www.facebook.com/rohitkako