You are on page 1of 18

12/07/21 1

Functions Performed by OS
Function Details
User Interface Processing of user commands to
create computational structures and
access resources
Program(Process )mangaement Initiation and termination of
programs,Scheduling,Dispatching
Memory Management Allocation,Deallocation of
Memory,Virtual Memory
Management
I/O Management Scheduling and Initiation of I/O
Operations,I/o Interrupt Processing
File Management Creation,Storage,Access of Data
and programs in files
Communication Management Networking,Manage Communication
Between programs

12/07/21 2
Operation of OS
Operation of OS initialized by the boot procedure
Instructs the I/O device containing the boot medium to
read a program stored on a special track or sector in the
boot medium
Loads it in memory
Passes control for execution

Boot Software performs the following functions


Determine the configuration of the system, ex: memory
size,I/O devices,cpu type,other h/w connected to the
system
Load OS programs constituting the supervisor
in memory
Initialise data structures of the supervisor
Pass control to the supervisor

12/07/21 3
Each routine is called an event handler
System Resident Area
Crucial control like:
area
Transient Area • Interrupt vectors
• Program State Information
User Area
Resident Area
Data Structures containing resource
allocation information
Information concerning user programs
Critical functions of the supervisor like the
scheduler and disk I/O handler
Frequently required functions like memory
request handlers
Other event handlers due to peculiarities of OS
e.g.handlers for non standard I/O devices

12/07/21 4
Configuring and Installing the supervisor
An OS is installed on a computer system using a distribution medium
Distribution medium: Magnetic Tapes, CDs
Distribution contains the following:
A supervisor: Generic version which provides a minimal set of facilities by
using the H/W features common to all computer systems on which the OS can
be used.
Modules of the OS
A supervisor configuration utility: to obtain supervisor version well suited to
features of the computer system
Optimum performance

Loads all the three to disk


An Identical supervisor could not be used on all models
• Under-utilize the capabilities
• Provide poor performance
12/07/21 5
Expensive and difficult to maintain a large number of supervisors

Three approaches of producing supervisors


System Generation
Configuration tools
Dynamic Configuration of supervisor

System Generation
Description given as input to system generation program
Constructs a supervisor which matches the description
Selects some code modules from read libraries
Modules are compiled and linked together to form supervisor

Description
Max no of userspgms handled at a time
Characteristics of CPU
No,kind and characteristics of I/o devices connected to the system
Memory size
Name of technique and algorithms,e.g. CPU scheduling,disk scheduling,

12/07/21 6
System generation
Library

Description
System
Generated
generation Supervisor
of supervisor
program

The system generation program determines the following features of the


supervisor to be generated from input
Existence of components: A disk scheduler needs to exist only if the system
contains a moving head disk device
Function of components:The memory handler will function differently if
virtual memory hardware exists in the system
Sizes of tables:the table of I/O devices in the system
Contents of tables:e.g.characteristics of I/O devices like device class, device
address
12/07/21 7
Configuration Tools
a) Accepts inputs from system administrator during installation of OS and prepares appropriate
version of supervisor
b) This version is written on disk
c) Minimal version of supervisor copied from distribution is deleted from disk
d) Reboot the system so that supervisor assumes control of the system.

Disadvantages
a) All variation must be predefined and options specified during supervisor generation
b) Cannot add new kind of I/O device since OS does not know how to perform I/O on it.

Dynamic Configuration of Supervisor


a) Design supervisor such that new modules ( e.g.device handlers) can be added any time
during system operation e.g. Linux
b) Device handler and supervisor need to be integrated together through dynamic linking
viz: address of supervisor data structures which store details of I/O request, must be
available all through system operation
c) After linking,the device handler is stored in a library and loaded from lib whenever needed

12/07/21 8
OS with Monolithic kernel
Each component interfaces with the hardware
Each component is machine dependent
Led to alternate ways of designing an OS structure
Different components of a monolithic software can share each other’s data
Components are not segregated through any syntactic or semantic means

User User
interface interface

Operating
system
Layer

Bare machine

12/07/21 9
Disadvantages:
Machine Dependence
OS development difficult
Time consuming ,expensive
Requires intricate knowledge of computer system architecture
Cannot use on different computer system
Change made in one component effects other components
Testing and debugging difficult

Layered Design

Semantic gap: The Semantic gap between an application and the bare machine is the gap between
the semantics of the operations required by the application and the semantics of the operations
supported by the machine

Operating Program I/O


System Management Management

Semantic Gap

Arithmetic Logical I/O


Bare
instructions instructions instructions
machine
12/07/21 10
Operating Program I/O
System Management Management

Semantic Gap
Extended
Context Save Scheduling Perform I/O
machine
Layer
Bare machine
Fig: Layered OS Design
Each layer forms a module with a clearly defined functionality and interface with the
rest of the OS.
Internal details of a module i.e the arrangement of its data and programs are hidden
from other modules.
Prevents misuse and corruption of data
Easier to test, debug and modify OS module
OS module may be modified without affecting other modules
Routines of one layer use only the facilities of the layer below it.
No layer can be bypassed
Access to lower layer is strictly through the interface between the layers
Knows how to invoke a routine of the lower layer, does not know the address of data
and instruction entities

12/07/21 11
Layer Function
1. Process Allocation and multiprogramming
2. Memory management
3. Operator-processor communication
4. I/o management
5. User programs

Disadvantages:
Request for OS service made by a user program must trickle down from the
highest numbered layer to the lowest numbered layer before the required action
is performed in the computer system
Since a layer can only access the immediately the lower layer, all features and

facilities needed by a layer must be available in lower layers. This requirement poses

a problem in ordering the layers

12/07/21 12
Virtual Machine Operating Systems
 Satellite Operating Systems:Different Operating Systems executing
concurrently on a computer
 Host Operating Systems:provides concurrent operation of the satellite
operating systems on the host computer
 Also called virtual machine operating system(VMOS)
 Each satellite operating system executes on its own virtual machine
Special System Call: ‘ invoke VM OS ‘
VM370 used on IBM computers in 1970’s,supports Conversational Monitor
system(CMS)-single user OS, OS370 and DOS370- multiprogramming OS

CMS OS/370 DOS/370

VM/370
12/07/21 13
Kernel Based Operating Systems
OS structure divided into architecture specific and architecture independent
parts of an OS.
Policies governing the use of resources
Mechanisms to implement the policies

Round Robin I/O


Policies Managemment
Scheduling

Mechanisms Manipulate I/O


Program
Scheduling Dispatching Initiation
lists

Bare Machine

12/07/21 14
Interrupt processing mechanism
Effort on porting a kernel
based OS is determined Scheduling Mechanisms
by the size of kernel and Dispatch a program
not by the total size of Manipulate schedulling List
OS code
Memory management mechanisms
Set memory protection information
Memory swapping mechanisms e.g. swapping-in/out
Virtual Memory Management e.g. Page Fault handling, Page
replacement
User Interface
I/O mechanisms
Non-kernel modules I/O Initiation
I/O completion
Kernel I/O error recovery
I/O device scheduling
Bare Machine Communication Mechanisms
Inter-process Coomunication mechanisms
12/07/21 Networking mechanisms 15
Microkernel Based Operating Systems
Microkernel:Essential Core of OS code
Portability
Extensibility
Reliability

Round Priority
robin Memory based Memory
process Handler process Handler
scheduler scheduler

Microkernel Microkernel

Bare Machine Bare Machine

12/07/21 16
Small number of OS calls heavily tested and used
Designer has freedom to pick and choose features a particular version of an
OS should have
Cost Effective
The services provided are alos neutral towards features of an OS based on it.
Same microkernel to implement different kinds of OS
Mach:
Mach Used to implement different versions of Unix,Leaves
Process scheduling Policy and device drivers outside the kernel.
Amoeba:
Amoeba Used on all computers in a distributed system including
workstations,servers and large multiprocessors
QNX: Includes interrupt handling,process scheduling, interprocess
communication and core network services.
It is 8K bytes in size.
12/07/21 17
MS-DOS Layer Structure

Application program

Resident system program

MS-DOS device drivers

ROM BIOS device drivers


12/07/21 18

You might also like