Title: What is an Operating System O'S' Different Viewpoints
1What is an Operating System O.S.
?(Different Viewpoints)
-
- General Views.
- Users Views.
- System Designers Views.
2The Operating System O.S. (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. -
3The Operating System O.S.(Users View)
- Accepts commands that make a Computer
act/operate (Input, Store, Process, Output) all
the time. - Remove machine dependence for all possible
applications as far as possible. - Guarantees Response time for each user command.
- Provides a hospitable user friendly interface.
4Role of any Operating System(System Designers
View)
- Shields ALL limitations of the underlying
Architectural and / or System Software Support. - 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 .
8Basic 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).
9File System
- Most visible aspect of any Operating System to
the User ( Users interact most frequently). - Provides the following facilities
- Mechanism for permanent / non volatile storage of
information in various secondary medias. - Presents an uniform logical view of all these
storage medias to the user O.S.
10File System (Key Features)
- Collection of Files stored on secondary medias.
File A named collection of related
information (Records) . - A directory structure helps in the following
- - File Organization.
- - Access Rights (Protection
Mechanism) . - One or more Partitions ( Provides separation of
directories useful for better manageability of
large filing cabinet. ) - Implementation (Mapping from Logical viewpoint
to Physical Media) . -
-
11Stored Information
- Programs
- User Programs Source, Object , Executable.
- System Programs Packages Executable.
- Data
- a) Text.
- b) Documents.
- c) Multi Media.
12Type of a File (The type extension)
- File type associated with the file name itself
in the following manner - ltFile Name gt.ltExtension) File Type Specifier
Stringgt - ? Wild Card (ALL Types that share the same
name)
13File Types (Usage associated access)
- File Type used Extension Usage
Accesibility - --------------------------------------------------
------------- - Document doc, tex, pdf, ps Typed
Documents Direct - --------------------------------------------------
--------------------------------------- - Source c , c, asm , java
Program Source Direct - -------------------------------------------------
--------------------------------------- - archive arc, tar, zip
Related files in Direct / Seq -
Grouped , Compressed - --------------------------------------------------
---------------------------------------- - Library lib , dll
Support Routines Direct - --------------------------------------------------
---------------------------------------- - Data Text txt, dat
Textual Data Direct / Seq. - --------------------------------------------------
------------------------------------------ - Multimedia mpeg, avi, jpeg Binary
File containing Direct -
Audio Video , Picture - --------------------------------------------------
------------------------------------------- - Executable exe, com, bin
Executable Module Direct / Seq. - --------------------------------------------------
-------------------------------------------- - Batch bat , sh
Sequence of Commands Seq Preferable
14Storage Medias (Filing Cabinets)
- Magnetic Tape Sequential Access.
- Disks
- 1. Magnetic Hard Disk (Direct Access
Outer to Inner - R/W Head floats inside an air
cushion on the Disk surface). - 2. Winchester Disk ( Hermitically
Sealed Magnetic Hard - Disk ).
- 3. Floppy Disk (Flexible magnetic
Disk R/W Head - comes into direct contact with
Disk surface). - 4. Optical Disks (CD_ROM,
DVD_ROM,DVD_RAM, - WORM ) Hard Disks, R/W Head
LASER Beam , - Direct Access Inner to Outer.
- Pen Drive Electrically Alterable non Volatile
Flash Memory.
15Various 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.
16Directory Structure
- Linear ( Rarely Used).
- Hierarchical
- a) Tree / Acyclic Graph Mostly Used.
- b) Cyclic Graph Management difficult.
17Hierarchical File Organization
- Tree Like Structure Directory is Head pointer
- 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
18A typical File Descriptor
- Name/External Name A string of alphanumeric
characters understood by the user (Human readable
form). - Identifier An unique tag, a number helps to
identify the file in a file system used by the
O.S. (non human accessible). - Type Helps to identify the area of use of the
file (To be illustrated later) (Human readable
form). - Size/Length in bytes /Blocks . Maximum allowed
size is specified sometimes (Human readable
form). - Protection Accessibility Control Based on
user Group (Partly Human readable form). - Owner Identification Related to user id.
(Human readable form). - Time Date (Human readable form) constitutes
of one or more of the following - - File Creation Date Time.
- - Last modification Date Time.
- - Last access Date Time.
- Location Pointer to the start (sometimes also
the Last) physical block of the file as stored on
the secondary media (Non Human accessible but
O.S. readable). - State Open / Closed.
- Sharing Attribute
- Storage Device Details System accessibility.
- N.B
- Any Directory is also a File.
- Each File is also a structured Abstract Data
Type (ADT).
19Basic File Operations
- Creation of a new File CREATE FILE.
- Deletion of an Existing File DELETE FILE.
- Opening an Existing File OPEN FILE.
- All types of file element (Record) accesses
(to be illustrated shortly) must be preceded by
OPEN FILE. This is necessary for activating the
file access mechanism. - Closing an Opened File CLOSE FILE. (After all
references / accesses to that file are finished).
20File System Software Architecture
- User Program
-
- File Organization
Logical I/O
Basic I/O Supervisor
Basic File System
Device Interface
21Informations associated with an Open File
- Access Rights Obtained from the directory
matched with Access Requesting Process Id . Used
to regulate the file accessibility from each of
the requesting processes. Contained in the
System File Table. - Start Pointer Address of the starting block of
the File on Secondary Media. Contained in the
System File Table. - Current File Position Pointer Unique to each
Reader processes accessing the file contained in
the Process File Table.. Assuming a single file
writer process and no other access during
writing. - Open Count Non zero Integer counter indicating
number of processes currently accessing the file.
Contained in the Process File Table as well as a
part of the System File Table. Each open call by
a process of a particular file increments this
counter. - Current Access Date Directory entry used
updated by the System File Table. - File Size Directory entry used updated by the
System File Table.
22File 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.
23The 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
24 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 .
25Memory 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.
26 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).
27Processor 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.
28Evolution 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.
29State of the Art Operating Systems
- Category A
- Proprietary needs license WINDOWS by Microsoft
, MAC from Apple, UNIX from Bell Labs . - Open Source like LINUX.
- Category B
- Single User WINDOWS Desktop / Personal Edition
, LINUX - Multi User WINDOWS Server, LINUX Server,
UNIX . - Distributed LINUX, UNIX, WINDOWS with .NET
- Category C Multi User Category
- Multi_Processing.
- Multi Tasking.
- Multi Threading Hyper Threading.
30More Facility More Support
- Not all operating systems can be installed on
any Computer System. - Each Operating System needs some specific
Architectural Support in the form of - a) Minimum CPU Speed Clock Frequency
- b) Minimum CPU Operand Size in bits.
- c) Minimum available Electronic Memory.
- d) Minimum available Secondary Memory / Disk
Size.
31The WINDOWS Hierarchy
- WINDOWS 3.1 8/ 16 Bit CPU, 128 MB RAM, 10 GB
HDD - WINDOWS 95 16 Bit CPU , 128/256 MB RAM. 10 GB
HDD - WINDOWS 98 32 bit CPU , 800 MHz CPU, 256 MB RAM
recommended, 20/ 40 GB HDD - WINDOWS 2000 32 bit CPU minimum 1.d GHZ, 256 MB
RAM, 40 GB HDD - WINDOWS 2003 Not Popular
- WINDOWS XP 32 Bit , 2 GHz above CPU , 512 MB
RAM, 40 GB upwards HDD - WINDOWS VISTA ( Proposed Name Long Horn) 32 bit
, 2.6 GHz above CPU , 2 GB RAM, 80 GB upwards
HDD
32The Various LINUX Distributions
- Red Hat ( Various versions Editions )
- Debian. ( Various versions Editions )
- Fedora. ( Various versions Editions )
- Mandrake . ( Various versions Editions )
- Upgraded one will have a different Version Number
as well as a slightly modified Core / Kernel.