Title: Role of an Operating System Different Viewpoints
1Role of an Operating System(Different Viewpoints)
-
- General Views.
- Users Views.
- System Designers Views.
2Role of an Operating System (General Views)
- A piece of Software that helps a computer system
to operate ( A System Software) all the time. - The Monitor program that monitors all activities
going on inside the Computer all the time. - Any O.S. MUST be running always following Power
On followed by boot up till the system is shut
down. - Any O.S. acts as a resource Manager. A resource
implies anything that is needed for any user
program to complete execution. - Provides the very first level of any Man
Machine Interface. -
3Role of an Operating System (Users View)
- Accepts commands that make a Computer
act/operate (Input, Store, Process, Output) all
the time. - Shields the basic limitations of the Computers
resources i.e. remove machine dependence of any
user. - Guarantees Response time for each user command.
- Provides a hospitable user friendly interface.
4Role of an Operating System(System Designers
View) - 1
- Provides activates various utility services
like Editors , Translators other Applications. - Performs effective utilization management of
all System Resources like Peripherals, CPU
Memory thereby providing a Hardware Independent
work bench/ platform. - Presents an user interface ( Ideally should be
Self explanatory Self Correcting) .
5Conventional O.S. System Architecture
Command Line Interpreter
Command Line Interpreter
Core / Device Drivers
GUI
H/W
E D I T O R
Graphics User Interface (GUI)
User Programs
6Resource Management Tasks of any Operating System
- Management of Peripheral Devices .
- File System Support.
- Memory Management.
- Processor Management.
7Management of Peripheral Devices (The main
Objectives)
- 1) Make the peripheral device interface
Hardware functional/ operational via Device
Driver Programs. - 2) Implement Data Transfer Protocols between
the CPU/Memory combine and the Device Interfaces.
- The commonly used Peripherals
- Key board Character Oriented Device.
- Mouse Click Character Oriented Device.
- V.D.U. Display Block Oriented Device.
- Disk (Magnetic CD/ DVD ) Flash Memory.
- Block Oriented Devices.
- Printers (Impact Non Impact) Block /
Character Oriented .
8Management of Peripheral Devices (The Tasks
Performed)
- Installation of device drivers / setting up
the Invocation / - Entry Points ( Interrupt Vectors).
- Invoking device driver programs on demand
(usually user request - via System Call / Software
Interrupt). - Allowing the fast paced CPU and the slow paced
/ faster - peripherals to operate at their own
speed through well defined - Data Transfer Protocols between the
two . - Guaranteeing availability of peripherals to all
requesting - processes without sacrificing
response time. - Enforce proper device sharing protocols if
needed (to make non - shareable devices shareable in a Time
multiplexed fashion ). - Monitoring each active device status.
9Basic Features of Device Drivers
- Makes the peripheral interfaces interact with
the CPU in accordance with O.S. Commands. - Written using Low Level / Low level Features of
a programming language. - Normally Underlying machine / CPU dependent.
- Employs privileged / supervisor mode
Instructions. - Contained in non-volatile ROMs and / or loaded
from disk(s) on demand (if installed).
10Data Transfer Protocols
- All types of Data Transfer takes place via the
Device Interface through I/O Bus. - Mainly the following types of Data Transfer /
Interface Protocols are in use - Polling Programmed
- Interrupt Driven Programmed .
- Direct Memory Access (DMA) Non Programmed .
- Plug Play Normally a Default Mode supported
by most modern Operating Systems can either be
Interrupt Driven and/or DMA based .
11File Organizations
- Tree Like Structure Directory acts as Index
- Root Directory
- Sub Directory 1 Sub Directory 2
Sub Directory n - File 1 .. File n File 1 .. File m
File 1 .. File k - Each file is associated with access control
Read / Write / Execute
12Various File Media and the Corresponding
Protocols
- Fixed Magnetic Disk Hard ( Internal) Direct
Drive Mechanism DMA / Interrupt based Data
Transfer. - Removable Magnetic Disk ( External) Direct
Drive Mechanism , DMA / Interrupt protocols are
used. - Removable Optical Disks Direct Drive mainly DMA
based. - Removable Flash Drives Random access,
Electronic Interrupt based. - Magnetic Tape Sequential Interrupt based.
13File Management Functions
- Mostly used FUNCTION. This involves the
following tasks - Keeping track of the Secondary Stores (File
Cabinet) . - (which file stored where the directory
structure) - Storage / (Allocating space) for files.
space - De-allocating space for deleted files .
management - Compacting freed space on Magnetic disks.
- Accessibility control protection (Read,
Write, Execute Access) of files. - Forms the backbone of any Data Base and / or
Information System.
14The Typical Memory Hierarchy
Electronic Mostly Volatile
GPRs
SIZE
On Chip CACHE
COST SPEED
Off Chip Cache
Main/ Primary / Physical Memory
Fixed Secondary Memory Magnetic Disk Non
Volatile
Removable Secondary Mag.Tapes, Electronic
Flash, Optical CD_ROM, DVDs Non Volatile
15 Memory Hierarchy ( Various Levels)
- 1. CPU Registers General Purpose Registers
are accessible to ALL , - cannot be protected from any of the User
Programs and/or System Programs like O.S.
Compiler - Smallest, Fastest Most Costly (Cost /
bit ) - 2. Cache (ON Chip OFF Chip) ( High
Speed Window of Main Memory . Helps to achieve
Compatibility between High Speed , wider bit
width CPU and low speed , lower bit width Memory
Bus ) - Smaller, Less Cost/bit compared to
registers, normally handled by Architecture
Partly content addressable Static - 3. Main or Primary Memory. Expandable NOT
related to CPU width normally managed by the O.S.
supported by Architectures MMU. Acts as the
universal storage. Static Dynamic -
- 4. Secondary Memory Disk (Hard,Floppy)
/ CDs, DVDs, Tapes, Flash ( To provide virtual
storage / Memory also acts as Filing Cabinets )
Highest Size, Lowest Speed Cost/bit .
16Memory Management Objectives
- Keeping track of memory occupancy at any level.
- (which process resides where at each level
of the Memory Hierarchy and how much of
memory it occupies at each of these levels). - Swapping in / out portions of any process
between any two adjacent levels on requirement.
Allocation / Replacement Policy. - Ensure availability of enough memory to any
requesting process at each of these Hierarchical
Levels in a manner transparent to that process. - Create the feeling of the existence of an
infinite sized , high speed memory for any user
process Virtual Memory . This requires close
interface with the File System.
17 Processor Management Tasks - 1
- 1) In an Uni-Processor System, it involves
managing the single CPU and its co-processors
like Floating Point Units (FPUs) Multi Media
(MMX), Memory Management Units (MMUs ) Normally
handled directly by Architecture. - 2) Coordinating Several CPUs in a Multiprocessor
/ Several Cores in a Multi Core System which may
be - a) Tightly Coupled ( Sharing most of
the Memory Hierarchy under the control of a
centralized O.S.) Contemporary Dual Core
Hyper-Threading - b) Loosely Coupled. (Distributed/
Networked).
18Processor Management Tasks - 2
- Allocate / De-allocate jobs/tasks / processes
to the available processor(s) / core(s) (in
accordance with predefined policy). - Keep track of current status of each process
Ready, Running, Waiting as well as the
processor(s) / core(s) Busy , Free . - Decide on the Time Quantum allotted to each
process on any available processor/core Time
Sharing System . - Changing execution modes of each processor/core
User / Kernel. - Ensure guaranteed response time to each
process. - Report any illegal operation(s) / exception
and take corrective - actions.
19Evolution of Operating System
-
- Serial .
- Simple Batch.
- Multi programmed Batch.
- The Process Thread Concepts.
- Time Shared Uni- Processor System
- - Multi Tasking.
- Time Shared Multi Processor / Multi Core System
- - Multi Threading.
- - Super Threading Hyper
Threading.