CS8493-OPERATING SYSTEMS
UNIT-I
Lecture 3:
Operating System Overview
Staff Incharge
[Link] AP/CSE
Layers and Views
What is an Operating System
It is an extended, or virtual, machine
◦ provides a simple, high-level abstraction, i.e., hides
the “messy details” which must be performed
◦ presents user with a virtual machine, easier to use
◦ provides services; programs obtain these by system
calls
It is a resource manager
◦ provides orderly and controlled allocation for
programs in terms of time and space, multiplexing
Services Provided by the OS
Process creation
Program execution
Access to I/O devices
Controlled access to resources, e.g. files
System access
Error detection and response
Accounting
Operating System
Functions the same way as ordinary computer
software
◦ It is a program that is executed, but with extra
privileges
Kernel: Portion of operating system that is in
main memory
◦ Contains most frequently used functions
◦ Also called the nucleus
Evolution of Operating Systems
Serial processing
◦ No operating system
◦ Machines run from a console with display lights
(error messages), input device (punch card, tape)
and printer (for output)
◦ Setup included loading and compiling the program,
and loading and linking common functions – very
time consuming (errors!)
Simple Batch Systems
Resident Monitor program: scheduling,
privileged operations
Users submit jobs to operator
Operator batches jobs
Monitor controls sequence of events to
process batch
When one job is finished, control returns to
Monitor which reads next job
Monitor handles scheduling (e.g. FIFO, SJF)
OS Features
Memory protection
◦ Do not allow the memory area containing the
monitor to be altered by user program
Timer
◦ Prevents a job from monopolizing the system
(when allocated time is up, job is stopped)
Privileged instructions
◦ Certain machine level instructions (e.g. I/O) can
only be executed by the monitor – kernel or
supervisor mode vs. user mode
System Utilization Example
Uniprogramming
Processor must wait for I/O instruction to
complete before preceding
Multiprogramming
Processor has more than one program to
execute
The sequence in which the programs are
executed depends on their relative priority
and whether they are waiting for I/O
After an interrupt handler completes, control
may not return to the program that was
executing at the time of the interrupt
Multiprogramming