Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 11

Linux Architecture

Overview
1
Initialization
Uboot hardware init, loads kernel
Kernel remaining initialization, calls init
Init 1
st
process, executes startup script
/etc/init.d/rcS
Run_flphone.sh startup script
Nano-X the X-Windows server
Nanowm sets bg image
2
System Structure
MicroKernel minimal functionality
Interprocess communication (IPC)
Memory management
Autonomous processes & co-routines
VFS
Network stack
Process manager
Device drivers
Non-kernel
windowing system
compiler
shells
Editors
utilities
3
System Structure
4
Kernel
+
h/w related code
System Call Interface
User mode space
Device
drivers
Kernel mode space
System Structure-2
5
Sockets
VFS Vmem
Process
Control
NFS
TCP, IP,
etc
Proc,
sysfs
File syss
mmap
MM
Process
memory
IPC
Char
devs
Block
Devices
cache
Scheduler
Net
Mgmt
Device
Module
Bus
drivers
Net
drivers
Block
Drivers
Memory
access
Interrupts
swap
Char
Drivers
System Calls get us to these functionalities
Bus
controller
Net
adapter
Monitor,
keybd
Disk
controller
CPU
circuits
MMU,
RAM
Structural Problems
Erroneous co-routines can block system
Formal interfaces slow down system
6
Directory structure
7
user
home
bin sbin lib
usr etc bin sbin
/
System directories
/bin Essential user command binaries that need to be available
also in single user mode.
/sbin Essential system binaries (e.g. init, insmod, ifup)
/lib Libraries for the binaries in /bin and /sbin
/usr/bin Non-essential user command binaries that are not needed
in single user mode
/usr/sbin Non-essential system binaries (e.g. daemons for network-
services)
/usr/lib Libraries for the binaries in /usr/bin and /usr/sbin
/etc Host-specific system-wide configuration files
/dev Device files
/home User home directories (optional)
/proc Virtual file system documenting kernel and process status as
text files

8
2004, D. J. Foreman 9
Basic Transitions
New
Ready
Running
Waiting
Blocking I/O
or Wait
requested
Dispatched
by system
Terminated
Exit request
Interrupt/Signal
# ready queues
may be >1
2004, D. J. Foreman 10
Linux Process/Thread States
Running
Uninterruptible
Ready Terminated
Interruptible
Stopped*
Any signal
or event
New
H/W
Signal
* Requires action from another process
waiting
2004, D. J. Foreman 11
Windows Thread States
CPU
scheduled
Waiting Terminated
Running Ready
Page/stack wait
New
preempted
Block
requested
Block
released
Runnable
Not runnable

You might also like