Professional Documents
Culture Documents
Docu
Docu
1
2
Preface
I have made this report file on the topic LINUX OPERATING SYSTEM; I have
tried my best to elucidate all the relevant detail to the topic to be included in the
report. While in the beginning I have tried to give a general view about this topic.
3
CONTENTS
Introduction to Operating
System
Linux Components
Process Management
Process Scheduling
Conclusion
REFERENCES
4
INTRODUCTION
5
LINUX OPERATING SYSTEM
\
LINUX is modern, free operating system based on UNIX standards. It has
been designed to run efficiently and
reliably on common PC hardware, it run also on a variety of other platforms.
It provides a programming interface and user interface compatible with
standard UNIX systems.
6
Inter-process communication is supported for message
queues ,semaphores and shared memory and BSD’s socket interface.
7
LINUX COMPONENTS
Kernel
System Libraries
System Utilities
8
System User
Managemen
t User Utility Compilers
Programs Processes Programs
Linux Kernel
The Linux Kernel forms the core of the Linux Operating System. It
provides all the functionality necessary to run processes and it
provides system services to give arbitrated and protected access to the
hardware resources .
The System Libraries may also provide more complex versions of the
basic system calls. The libraries provide routines that do not
correspond to system calls at all, such as sorting algorithms
,mathematical functions and string manipulation routines. The Linux
System includes a wide variety of user-mode programs- boot System
utilities and User utilities. The System utilities include all the
programs necessary to initialize the system, to load kernel modules.
9
PROCESS MANAGEMENT
10
Broadly , Process Properties fall into three groups :
1: PROCESS IDENTITY
2: PROCESS ENVIRONMENT
3: PROCESS CONTEXT
11
2: PROCESS ENVIRONMENT:- A process environment is
inherited from its parent and is composed of two null-terminated
vectors:
The Argument Vector
The Environment Vector
12
Scheduling Context :-
13
PROCESSES AND THREADS
14
PROCESS SCHEDULING
1: Kernel Synchronization
2: Process Scheduling
3: Symmetric Multiprocessing
KERNEL SYNCHRONIZATION :- The way that
the kernel schedules its own operations is fundamentally different
from the way that it does process scheduling. 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 explicitly- for example when a page fault occurs. Alternately
a device driver may deliver a hardware interrupt that causes the
CPU to start executing a kernel-defined handler for that interrupt.
15
Once a piece of kernel code starts running, it can gurantee that
it will be the only kernel code running until one of the following
action occurs:
An Interrupt
A Page Fault
A Kernel code call to the scheduler itself
16
Top Half Interrupt handlers
PROCESS SCHEDULING :-
Once the kernel has reached a rescheduling point – either
a rescheduling interrupt has occurred or a running kernel process has
blocked waiting for some wakeup signals-it must decide what process to
run next. Linux has two separate process scheduling algorithms.
1: TIME SHARING Algorithms for preemptive scheduling
2: TIME SHARING Algorithms for real-time tasks
17
when its credits reaches zero, it is suspended and another process is chosen.
If no run able processes have any credits, then Linux performs a re-crediting
operation, adding credits to every process in the system, rather than to just
the run-able ones, according to the following rule:
Credits = (Credits /2) + Priority
This algorithm tends to mix two factors, the process’ history and priority.
The use of the process priority in calculating new credits allows the priority
of a process to be fine-tuned. Background batch jobs can be given a low
priority, hence will receive a smaller percentage of the CPU time than will
smaller jobs that have higher priorities.
Linux’s real-time scheduling is simpler still. Linux
implements the two real-time scheduling classes required by
POSIX.1b: First come, First serve (FCFS) and Round-robin. Linux’s
real-time scheduling is soft-rather than hard-real time.
SYMMETRIC MULTIPROCESSING:-
The Linux 2.0 kernel was the first stable Linux kernel to support Symmetric
Multiprocessor (SMP) hardware. Separate processes or threads can execute in
parallel on separate processors. The implementation of SMP in this kernel
imposes the restriction that only one processor at a time can be executing
kernel-mode code. SMP uses a single kernel spin lock to enforce this rule. This
spin lock does not pose a problem for computation-bound tasks, but tasks that
involve a lot of kernel activity can become seriously bottlenecked.
The development kernel 2.3 seems to have completely
removed the single-kernel spin lock.
18
CONCLUSION
19
REFERENCES
www.google.com
www.wikipedia.org
www.studymafia.org
20