Professional Documents
Culture Documents
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
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
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
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.
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
Semantic Gap
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
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
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
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
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