Introduction to OS-1
Introduction to OS-1
OPERATING SYSTEMS
Course content
Reading list
Prerequisites
1
Lecture Notes
1.0 Introduction
I
An operating system is the software component of a computer system that is responsible for
the management and coordination of activities and the sharing of the resources of the
computer.
II
An operating system is a program that acts as an intermediary between a user of a computer
and the computer hardware.
From the two definitions above, we learn that an OS assumes two roles:
OS is a resource allocator - manages all resources; decides between conflicting requests
for efficient and fair resource use;
OS is a control program - controls execution of programs to prevent errors and
improper use of the computer.
There is no universally accepted definition of an OS.
2
Lecture Notes
Took advantage of different time scales at which CPU and peripherals work to
improve
CPU usage
Introduced multiprogramming: time-MUX processor, space-MUX memory
Objective: maximize job throughput
short-term scheduling or "swapping" of jobs
c) Memory management
Finite amount of memory must be shared between different programs executing
concurrently
Must protect each running program from having its memory area corrupted by others
Programs often need more memory than is available - how do sort this out? use virtual
memory by integrating secondary storage devices
d) File management
Abstracts operations on low-level storage devices (disks, tapes, etc.)
Need to do so was instrumental in development of OSs
Defines organization of file system hierarchy
e) Device management
Allocate, isolate/share devices (disks, modems, printers, etc.)
Hides low-level details of control
Provides generic interface through device drivers
4
Lecture Notes
5
Lecture Notes
Another set of OS functions exists for ensuring the efficient operation of the system itself via
resource sharing:
Resource allocation -When multiple users or multiple jobs running concurrently,
resources must be allocated to each of them; Many types of resources -Some (such as
6
Lecture Notes
CPU cycles, main memory, and file storage) may have special allocation code, others
(such as I/O devices) may have general request and release code.
Accounting -To keep track of which users use how much and what kinds of computer
resources
Protection and security -The owners of information stored in a multiuser or networked
computer system may want to control use of that information, concurrent processes
should not interfere with each other
Protection involves ensuring that all access to system resources is controlled
Security of the system from outsiders requires user authentication, extends to
defending external I/O devices from invalid access attempts
If a system is to be protected and secure, precautions must be instituted throughout
it. A chain is only as strong as its weakest link.
a) Simple Structure
7
Lecture Notes
OS developed as simple, small, having limited functionality and then with time they
started to grew up beyond their scope, e.g. MS-DOS
Not very much efficient
Illustration: MS-DOS
Written to provide the most functionality in the least space
Not divided into modules
Although MS-DOS has some structure, its interfaces and levels of functionality are not
well separated.
Drawbacks
Application programs are able to access the basic I/O routines -means they can
directly read or write to the basic display and disk drives - vulnerable to the malicious
programs, causing entire system crashes
Limited to hardware of its era
b) Layered approach
The operating system is divided into a number of layers (levels), each built on top of
lower layers. The bottom layer (layer 0), is the hardware; the highest (layer N) is the
user interface.
With modularity, layers are selected such that each uses functions (operations) and
services of only lower-level layers
8
Lecture Notes
Drawbacks:
Problem in defining the functions of every layer because a layer can only use its lower
level layers for its functioning.
tend to be less efficient than other types; for instance consider an example, when an
user program executes an I/O operation, it executes a system call that is trapped to the
I/O layer, which then call the memory management layer, which in turn call the CPU
scheduling layer and then passes to the hardware. In this whole process, the each layer
add its corresponding overhead result in that system call takes more time in
comparison to the non-layered approach