OS - Chapter # 10
OS - Chapter # 10
CHAPTER #
10
Operating Systems
Chapter 10 - Outline
Input/Output organization
Objectives of I/O system
Unix I/O system
MS-DOS I/O system
Device drivers in windows
Disk structure
Seek time
Latency
Disk scheduling
FCFS
SSTF
Scan scheduling
Input/Output Organization
Input/output systems is one of the important part of system like
processor and memory
It is least satisfactory system because of its slowness and lack of
consistency
Mode of operation of I/O devices is different, it is difficult for
operating system to handle with any generality
The computer communicates with I/O devices by mean of an I/O bus
system
Each I/O device has an associated hardware controller attached to this
bus system
I/O device performs its activity independently of and with the
processor activity
Most computers use a better technique of direct memory access
(DMA) which offers faster data rates
Characteristics of I/O devices
Data rate
Disk: 2Mbytes/sec
Keyboard: 10-15bytes/sec
Unit of transfer
Disk: blocks (e.g. block of 1024bytes)
Screen: single character
Operations
Disk: read, write, seek etc
Printer: write, move paper
Error conditions
Disk: read errors
Printer: paper out
Structure of I/O System
If the reader head is at track 53, it will first move from 53 to 98, then
to 183 and so on
The total head movement is 640 tracks
If the requests for the tracks 37 and 14 could be served together, the
total head movement could be decreased substantially
In this way, the average time to service each request would decrease,
improving disk throughput
FCFS Scheduling (5b)
Disk track current location= track no 98
183, 37,53, 122, 14, 124, 65 and 67
Total head tracks = find answer
14 37 53 65 67 98 122 124 183
FCFS Scheduling (5b)
Disk track current location= track no 98
183, 37,53, 122, 14, 124, 65 and 67
Find the solution of Total head tracks for the above given
scenario?
Disk track current location= track no 0 and track 400 and track 50
18, 370,153, 12, 14, 112, 300,123,90,87,66,345,234
Find the solution of Total head tracks for the above given scenario?
SSTF Scheduling
The shortest seek time first disk scheduling algorithm selects the
request with minimum seek time from the current head position
SSTF results in a total head movements of only 236 tracks
Comparing with FCFS, SSTF results in substantial improvements
Assume that we have just two requests in queue, 14 and 186
If a request near 14 are arrives while serving that request, it will be
served next
Request for track 186 may wait indefinitely, if more requests near
14 are arriving continuously
SSTF Scheduling (5c)