3. LETS EXPLORE OS
Interface between user and the hardware
Allocates and manages the resources-value
for money
Reclaim lost resources
Manages the input, processing and output eg.
Steward in a restaurant
Transforms a raw piece of hardware into a
machine
Supports all application software
Loads programs into main memory
8. DIFFERENCE BETWEEN TYPES
OF PROGRAMS
Do lot of
computation
Eg. Programs
computing value of
π
No wastage of CPU
time
Do lot of I/O
transactions
Eg. Online railway
reservation program
Lot of CPU time is
wasted
COMPUTE BOUNDPROGRAMS I/OBOUNDPROGRAMS
9. MULTIPROGRAMMING
Concurrent residency of many programs in the
main memory of the computer
Reduced CPU idle time-GREATER CPU
EFFICIENCY
Greater memory efficiency-COMPLETE
MEMORY UTILIZATION
Eg. of multiprogramming OS are VAX, VMS,
UNIX
13. FUNCTIONAL UNITS OF AN
OS
Schedular & resource allocator- decides when
to introduce new programs in memory and the
order of execution
File manager-manages secondary or magnetic
storage, organizing and accessing data
14. FUNCTIONAL UNITS OF AN
OS
I/O handler-manages I/O devices, handles
device errors, device independence, efficient
organization and access of data on I/O
devices
Memory management-implements
multiprogramming, protection of user work
area, provides memory space to users
Dispatcher-allocates CPU to next scheduled
program
15. AN OS IS A RESOURCE
ALLOCATOR
“Mama says: It’s good to share!”
Multiple users (?) get all computing resources
“simultaneously”:
Cpu time
Memory (ram, swap, working set, virtual,..)
File system (storage space)
I/O devices (display, printers, mouse,..)
Clock
The OS should give every user the illusion that she
is getting all resources to herself (not sharing!)
16.
17. PROCESSOR MANAGEMENT
Time sharing scheduling (round robin)-
• Each program has a fixed amount of time to
execute
• After leaving CPU, current program joins at the
end of the queue
• Multiple users share the computer simultaneously
• Gives a feel of dedicated single user system
• Improved response time
• Provides interactive environment
• Resources can be shared
18. MEMORY MANAGEMENT
Partitioning –
• To accommodate many programs in memory,
partitioning is done
• Can be fixed size partitions- equal / unequal
• Leads to memory wastage
OS
10K
10K
10K
OS
4K
6K
20K
EQUAL SIZED
PARTITIONS
UNEQUAL SIZED
PARTITIONS
21. MEMORY MANAGEMENT
Dynamic memory relocation
OS
10K-BLANK
6K-PROG B
4K-BLANK
8K-PROG D
2K-BLANK
OS
6K-PROG B
8K-PROG D
16K-BLANK
BEFORE
Memory wastage
AFTER DYNAMIC
RELOCATION
22. VIRTUAL MEMORY
• Allows writing programs larger than the main
memory
• Gives illusion of very large memory(combo of
auxiliary and main memory)
• Generates a virtual address-that is not a real
physical memory address
• Virtual address can be more than physical
address
• It is the logical / symbolic representation of a
location in hardware
23. VIRTUAL MEMORY
• OS divides main memory into equal size pages
• Pages and blocks are of same size
• Page is loaded in memory only on demand
• A page table helps keeping track of which page in
memory is storing which block
• Set of pages in main memory is known as
working set.
24.
25. ADVANTAGES OF VIRTUAL
MEMORY
• Memory efficiency
• Only active pages(on demand) are resident in
the memory
• Any page of any program can fir into any page
of the main memory
• Protection
• There is separate page table for each user
• Sharing
• Same page can be shared by two programs
using the page table settings
26. DEVICE MANAGEMENT
OS maintains speed balance between CPU and
I/O device
Characteristics of I/O devices-
Speed
Unit of transfer
Data representation
Permissible operations
Error conditions
Sharing
27. BUFFERING
A temporary storage area (buffers) to read data
from input device or send data to the output
device
Keeps CPU busy
• Because I /O operation is slow
30. SPOOLING
• Simultaneous Peripheral Operation on Line
• Helps buffering process
• Used for non-shareable devices
• Eg. Rush hour on printer
• Process held up--long waiting time
• In spooling data of every user is temporarily
written on hard disk
31. SPOOLING
• No held up processes
• Spooler pick data one by one from hard disk
• Sends in sequence to the printer
• Hard disk becomes virtual printer
32.
33. FILE MANAGEMENT
File organization techniques
• Sequential-in predefined order
• Direct- direct transfer b/w applications without
using OS
• Indexed sequential-data is indexed for fast
retrieval
•Relative - Records of the file are stored one after
another both physically and logically. Record with
sequence number 16 is located just after the 15th
record
34. FILE MANAGEMENT
File management functions
• Create file
• Delete file
• Open an existing file-read only
• Open an existing file-read / write
• Rewind operation-tape files
• Security at three levels-DAR
• Do anything
• Append only
• Write only
36. TIME SHARING SYSTEM
• Multiprogramming, multiuser & interactive OS
• Resources of a centralized system are shared
• Uses round robin scheduling
• Less response time
• Each user gets a feel of a dedicated system
• Only a portion of job resides in main memory,
rest on hard disk
37.
38. DISTRIBUTED SYSTEMS
Distribute the computation among several physical
processors.
Lo o se ly co uple d syste m – each processor has its own
local memory; processors communicate with one
another through various communications lines, such as
high-speed buses or telephone lines.
Advantages of distributed systems.
Resources Sharing
Computation speed up – load sharing
Reliability
Communications
39. DISTRIBUTED SYSTEMS
(CONT)
Requires networking infrastructure.
Local area networks (LAN) or Wide area
networks (WAN)
May be either client-server or peer-to-peer
systems.
40.
41. REAL-TIME SYSTEMS
Often used as a control device in a
dedicated application such as
controlling scientific experiments,
medical imaging systems, industrial
control systems, and some display
systems.
Well-defined fixed-time constraints.
Real-Time systems may be either hard
or so ft real-time.
42. REAL-TIME SYSTEMS
(CONT.)
Hard real-time:
Secondary storage limited or absent, data
stored in short term memory, or read-only
memory (ROM)
Conflicts with time-sharing systems, not
supported by general-purpose operating
systems.
Soft real-time
Limited utility in industrial control of robotics
Useful in applications (multimedia, virtual
reality) requiring advanced operating-system
43. MULTITASKING
To handle two or more programs at the same
time from a single user’s perception
CPU can perform only one task at a time,
however it runs so fast that it seems 2 or more
jobs seem to execute at the same time
52. FLYNN’S CLASSIFICATION OF
COMPUTERS
SIMD-Single instruction multiple data
• Array of n number of processing elements
• Identical elements controlled by master
controller
• Single instruction operates on multiple data
• Eg. Connection machine uses SIMD
architecture
53.
54. SIMD VERSUS MIMD
Practical Differences
SIMD and MIMD are different in practice. SIMD is often used for
problems requiring lots of computations with processors performing
the same operation in parallel. MIMD is often used for problems
requiring algorithms broken up into parts that are separate and
independent, with each part being assigned to a different processor for
simultaneous solution.
Technical Differences
SIMD and MIMD are also technically different. SIMD processors tend
to be simpler, smaller, cheaper and faster than MIMD processors, but
MIMD is capable of more complex operations. MIMD operations that
the SIMD architecture can accomplish tend to take more time with
SIMD than with using the MIMD architecture. SIMD processors must
perform complex operations sequentially, while MIMD processors can
do this concurrently.
55.
56. MULTIPROCESSING
CONFIGURATIONS
Separate supervisor configuration
• Each processor has individual copy of OS
input, output and file system.
• Limited parallel processing is possible
Master slave configuration
• A master processor controls all processors
and assigns work to them.
• Parallel processing possible
59. GUI INTERFACE
Uses computer graphics to make program
easier to use
Contains icons for navigation
Selection done by mouse instead of
commands through keyboard