3. Operating System (OS)
18-Sep-17 3
A program that acts as an intermediary between
a user of a computer and the computer hardware.
Operating system goals:
Execute user programs and make solving user problems
easier.
Make the computer system convenient to use.
Use the computer hardware in an efficient manner.
5. Functions of OS
18-Sep-17 5
Resource Management: Allocation of computer resources (as
processor, memory and I/O devices) to the jobs being executed.
Job management: Scheduling new jobs for execution according to the
desired priority.
I/O management: Managing the flow of data and instructions
between the I/O units and the primary memory.
Data management: Providing data management facilities such as
data organization and retrieval from secondary storage devices.
Maintaining security, communication of error and control messages
to the users, human operators etc.
7. Structure of OS (continue)
18-Sep-17 7
Hardware
Hardware consists of CPU, Main memory, I/O Devices, etc.
Software (Operating System)
Software includes process management routines, memory
management routines, I/O control routines, file management
routines, etc.
System programs
This layer consists of compilers, Assemblers, linker etc.
Application programs
This is dependent on users need. Ex- Railway reservation system,
Bank database management etc.
8. Continue
18-Sep-17 8
Usually, operating systems are too large to be stored in memory at a
time.
They can be divided into a number of parts.
Some portions of the operating system must always be present in the
memory which is called kernel or monitor or supervisor.
It performs the basic operations such as starting and terminating
user programs, allocations of memory and files, basic I/O operations
and interrupts.
The portion of OS which are brought into memory when needed and
removed when not needed, are called transient programs.
9. Continue
18-Sep-17 9
When the computer system is turned on, OS must be brought into the
computers’ memory from the hard disk.
The process of reading the OS programs from disk, loading it in the main
memory and executing, it is called booting.
The function of the bootstrap program is to perform the booting process.
This program is permanently stored in the main memory (BIOS).
OS can be classified as follows:
Batch processing
Multiprogramming
Time-sharing
Multiprocessing
Real time
Network
10. Batch Processing OS
18-Sep-17 10
Users do not interact directly to the computer system but
prepared a job.
The user submit the job and get output at some later time.
Common Input devices were card readers and tape drives.
Common output devices were line printers, tape drives and punch
card.
The task of the OS was to transfer the control from one job to the
next.
11. Batch Processing OS
18-Sep-17 11
One job can be performed at
a time and sequentially.
The OS was always resident
in the memory.
To speed up the processing,
operators batched together
jobs with similar needs and
run them through the
computer as a group.
12. Batch Processing OS
18-Sep-17 12
Advantages:
User intervention for execution is not required
Reduces the CPU idle time during transition from one job to another
(need not human)
Most repetitive kind of job (s) are often executed as a ‘batch’
Disadvantages:
Makes each job wait in line at each step and often increase its
turnaround time
Suffers from under-utilization of computer resources
13. Multiprogramming OS
18-Sep-17 13
Several jobs are kept in main
memory at the same time and
the CPU is multiplexed among
them.
Multiprogramming increase
CPU utilization by organizing
jobs so that the CPU always has
one to execute.
The OS keeps several jobs in
memory simultaneously.
14. Multiprogramming OS
18-Sep-17 14
The OS picks and begins to execute one of the jobs in the
memory
In a multiprogramming system, the OS simply switches to and
execute another job
When that job needs to wait, the CPU is switched to another
job and so on.
The first job finishes waiting and gets the CPU back.
Here the OS must make decisions for the users.
All the jobs that enter the system are kept in the job pool.
15. Multiprogramming OS
18-Sep-17 15
If several jobs are ready to be brought into memory, and if there is not enough
room for all of them, then there needs some choosing (job scheduling)
When the OS selects a job from the job pool, it loads that job into memory for
execution needs some form of memory management.
Multiple jobs running concurrently require that their ability to affect one another
be limited in all phases of the OS, including process scheduling, disk storage and
memory management.