Sei sulla pagina 1di 10

Linux Architecture

By Jyoti Verma
Roll no: 6310035
Branch: CSE(7A)
1

Linux Architecture

Linux Shell
Shell interprets the command and request service
from kernel
Similar to DOS but DOS has only one set of interface
while Linux can select different shell
Bourne Again shell (Bash), TC shell (Tcsh), Z shell
(Zsh).
Different shell are similar but different
functionality
Bash is the default for Linux
Graphical user interface of Linux is in fact an
application program work on the shell

Initialization
Uboot hardware init, loads kernel
Kernel remaining initialization, calls
init
Init 1st process, executes startup
script
/etc/init.d/rcS

Run_flphone.sh startup script


Nano-X the X-Windows server
Nanowm sets bg image
4

Directory structure
/
hom e
user

usr
b in

s b in

e tc

b in

s b in

lib

The most important subdirectories


inside the root directory are
/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
6

Basic Transitions
N ew

# ready queues
may be >1

In te rru p t/S ig n a l

R eady
D is p a tc h e d
b y s y s te m

W a itin g

R u n n in g

B lo c k in g I/O
o r W a it
re q u e s te d

E x it re q u e s t
T e r m in a te d

2004, D. J. Foreman

Linux Process/Thread States

New

Ready

Running

Terminated

H/W
Anysignal
orevent

Uninterruptible
Interruptible

Signal

waiting

Stopped*
*Requiresactionfromanotherprocess

2004, D. J. Foreman

States

As a process executes it changesstateaccording to its


circumstances. Linux processes have the following states:
Running: The process is either running (it is the current
process in the system) or it is ready to run (it is waiting to be
assigned to one of the system's CPUs).
Waiting: The process is waiting for an event or for a
resource. Linux differentiates between two types of waiting;
interruptibleanduninterruptible. Interruptible waiting
processes can be interrupted by signals whereas
uninterruptible waiting processes are waiting directly on
hardware conditions and cannot be interrupted under any
circumstances.
Stopped: The process has been stopped, usually by
receiving a signal. A process that is being debugged can be
in a stopped state.
Zombie: This is a halted process which, for some reason.

Windows Thread Runnable


States
CPU
scheduled

New

preempted

Ready

Block
requested

Block
released

Page/stackwait

Running

Waiting

Terminated

Not runnable
2004, D. J. Foreman

10

Potrebbero piacerti anche