Operating System
Operating System
Operating System is a set of program or some automatic procedures which helps a computer
application to run effectively.
It creates an environment which enables us to use computer installation efficiently.
Windows is system software and the others are the application software.
Software
System Application
(Dependency) (Little bid of Dependency)
Usage Functions
1) Single user – Windows XP 1) Processor or Process
2) Multi user – Linux, Windows Management
2000 Server. 2) Memory Management
3) Multitasking 3) File Management
4) Batch Processing 4) I/O Management
5) Real Time. 5) User Management.
Application Programs, Text Editor, Database, Spencer’s, Science City Mall, Local
Application Software. Markets etc.
O.S Government.
1) The creation and the deletion of both user and system process.
2) The suspension and the resumption of the process.
3) The provision of mechanism for process synchronization.
4) The provision of mechanism for process communication.
5) The provision of mechanism for deadlock handling.
2) Memory Management:-
Main memory is the central to the operation of a modern
Computer system. Main memory is a large array of words of bytes. Each word of bytes has its own
address. Memory is a repository of quickly accessible data share by the CPU and I/O devices. There
are two kinds of memory management performed by the O.S.
1) Keep track of which part of memory are currently being used and by whom.
2) Decide which process is to be loaded into memory when memory space becomes available.
3) Allocate and reallocate memory space when needed.
b) Secondary Memory Management:-
The main purpose of the computer is to execute program. These programs with the data they access
must be in main memory during execution. Because main memory is too small to accommodate all
data and programs and its data are loosed when power is loosed. A computer system must provide
secondary storage to back up main memory. Most programs including compilers, assemblers, and
editors are stored and edit and user used this disc as the source and destination of data. The O.S is
responsible for the following activities in connection with disc management.
1) Multiprogramming O.S:-
A single user can not in general keep either CPU or the I/O
devices busy at all time. It increases CPU utilizing by organizing jobs. So that CPU has always one
job to execute. The idea is as follows.
The O.S keeps several jobs in memory simultaneously there. These set of jobs is a
subset of the job kept in the job pool (Queue). Since the number of jobs that can be kept in the job
pool. The O.S keeps up a job and execute the job may have to wait for tasks, such as I/O operation
etc. In a non multiprogramming environment CPU seats idle. In a multiprogramming environment it
is always busy with jobs.
2) Multiprocessor O.S:-
The multiprocessor O.S supports more than one processor
communication sharing the same computer Bus, the Clock, Memory, I/O devices and in same time.
Multiprocessor system has three outputs -
b) Economy of scale:-
Multiple processor system can save more money than multiple single
processor system. Because they share save same peripherals, power supply and memory also.
c) Increase reliability:-
If certain function can be distributed properly among several processors
then failing of one processor will not held the system, only show it down which increased
tremendous work flow and reliability among the system.
Hard Real time O.S - Which guarantees the critical task, be completed on time.
Soft Real time O.S – Where a critical real time task gets priority over other task and retains that
priority until it completes.
What Is Process?
Informally a process is more than a program code. It is a program in execution. It also includes the
current activity as represented by the program counter and the content of the processors registers. A
process generally also includes process stack – containing temporary data and data section
containing global variable.
A program is a passive entity such as contents of the file stored on a disc
whereas process is an active entity. If the program counter specifying next instruction to be executed
and a set of additional resources.
Stages of the process:-
State as a process executes it changes state. The state of a process is defined in part by the current
activity of the process. Each process may be in one of the following states-
Waiting
1) Process State – The state may be new, ready, running, waiting and so on.
2) Program Counter – The counter indicates the address of the next instruction to be executed for
this process.
3) CPU Register – The registers vary in number and type. It includes accumulator, index register,
stack pointer, general purpose registers etc. Along with the PC it allows the process to be continued
currently afterward.
5) Memory Management Information – This information may include value of the page register,
segment tables depending on the memory system used by the O.S.
6) Accounting Information – It includes the amount of CPU and real time used.
7) I/O Status Information – It includes list of I/O devices allocated to the process a list of open file
etc.
Pointer Process States
Process Number
Program Counter
Register
Memory Limits
List Of Open Files
Diagram of PCB
Process Scheduling:
The process of multiprogramming is to have some process running at all times to maximize CPU
utilization. The objective of timesharing is to switch among the processes so frequently that user can
interact with each program why it is running.
Scheduler:-
A process migrates between the various scheduling Ques throughout its lifetime. The O.S must select
for scheduling purposes, processes from this Ques in some fashion. The selection process is carried
out by the appropriate scheduler.
Classification of schedulers:
In general schedulers are of two types –
1) Long term scheduler – Which select processes from the job pool and loads them into
memory for execution.
2) Short term scheduler – Which selects from among the processes that are ready Que execute
and allocates the CPU to one of them.
Operations of processes:-
1) Process creation: - A process may create several new processes via ‘create process’
system call. The creating process is called parent process whereas the new processes are called child
processes.
In general a process will need certain resources (CPU, Memory, Files and I/O
devices) to accomplish its task. When a process is creates a sub-process the sub process may be able
to obtain its resources from the O.S or it may be certain to a subset of the parent process.
Co-operating process:-
The Concurrent process executing in the O.S may be either independent or as co-operating process.
A process is independent if it can’t affect or be affected by other process executing in
the system.
On the other hand a process is co-operative if it can affect or be affected by other
process executing in the process. There are several reasons for co-operation of process.
1) Information sharing
2) Computation speed-up
3) Modularity
4) Convenience.