4. I/O Systems
1 What
do you understand by I/0 scheduling? What is spool? [4]
ans :-- Input/output (I/O) scheduling is a term
used to describe the method computer operating
systems decide the order that block I/O
operations will be submitted to storage volumes. I/O Scheduling is sometimes
called 'disk scheduling'.Purpose
I/O schedulers can have many purposes depending on the goal of the I/O scheduler, some common goals are:- To minimize time wasted by hard disk seeks.
- To prioritize a certain processes' I/O requests.
- To give a share of the disk bandwidth to each running process.
- To guarantee that certain requests will be issued before a particular deadline.
Implementation
I/O Scheduling usually has to work with hard disks which share the property that there is long access time for requests which are far away from the current position of the disk head (this operation is called a seek). To minimize the effect this has on system performance, most I/O schedulers implement a variant of the elevator algorithm which re-orders the incoming randomly ordered requests into the order in which they will be found on the disk.Common disk I/O scheduling disciplines
- Random scheduling (RSS);
- First In, First Out (FIFO), also known as First Come First Served (FCFS);
- Last In, First Out (LIFO);
- Shortest seek first, also known as Shortest Seek / Service Time First (SSTF);
- Elevator algorithm, also known as SCAN (including its variants, C-SCAN, LOOK, and C-LOOK);
- N-Step-SCAN SCAN of N records at a time;
- FSCAN, N-Step-SCAN where N equals queue size at start of the SCAN cycle;
- Completely Fair Queuing (Linux);
- Anticipatory scheduling;
- Noop scheduler;
- Deadline scheduler.
spool (simultaneous peripheral operations online)
To spool (which stands for "simultaneous peripheral operations online") a computer document or task list (or "job") is to read it in and store it, usually on a hard disk or larger storage medium so that it can be printed or otherwise processed at a more convenient time (for example, when a printer is finished printing its current document). One can envision spooling as reeling a document or task list onto a spool of thread so that it can be unreeled at a more convenient time.The idea of spooling originated in early computer days when input was read in on punched cards for immediate printing (or processing and then immediately printing of the results). Since the computer operates at a much faster rate than input/output devices such as printers, it was more effective to store the read-in lines on a magnetic disk until they could be conveniently printed when the printer was free and the computer was less busy working on other tasks. Actually, a printer has a buffer but frequently the buffer isn't large enough to hold the entire document, requiring multiple I/O operations with the printer.
The spooling of documents for printing and batch job requests still goes on in mainframe computers where many users share a pool of resources. On personal computers, your print jobs (for example, a Web page you want to print) are spooled to an output file on hard disk if your printer is already printing another file.
2 What are the advantages
of creating a separate swap partition?
3. Define the following terms: seek time,
rotational latency, disk bandwidth. Which algorithm is also sometimes known as
the elevator algorithm and why? [10]
ans :-- seek time:--- Seek time is the time required to move the
disk arm to the required track. Rotational delay or latency is the time it
takes for the beginning of the required sector to reach the head. Sum of seek
time (if any) and latency is the access time. Time taken to actually transfer a
span of data is transfer Time.
Rotational
latency :-- Also called rotational delay, the amount of
time it takes for the desired sector of a disk (i.e., the sector
from which data is to be read
or written) to rotate
under the read-write heads
of the disk drive.
The average rotational latency for a disk is half the amount of time it takes
for the disk to make one revolution. The term typically is applied to rotating
storage devices, such as hard disk drives
and floppy drives
(and even older magnetic
drum systems), but not to tape drives.
disk bandwidth:--
5
Disk requests come in to the disk drive for tracks in the order of 55,
58, 39, 18, 90, 160, 150, 38, 184. The disk arm is initially at track 100. A
seek take 5 msec per track moved. Compare the average seek lengths and seek
times achieved with:
Shortest
Service/Seek Time First (SSTF), SCAN and Circular-SCAN (C-SCAN) strategies. [12]
6 What
is the difference between spooling and buffering and how are they related, if
at all? [4]
ans :-- Buffering
is a method of overlapping the computation
of a job with its execution. It temporarily stores input or output data in an
attempt to better match the speeds of two devices such as a fast CPU and a slow
disk drive. If, for example, the CPU writes information to the buffer, it can
continue in its computation while the disk drive stores the information.
With spooling, the disk is used as a very large buffer. Usually complete jobs are queued on disk to be completed later. A typical example is the spooler for a printer. When a print job is issued, the spooler takes care of it, sending it to the printer if it is not busy, or storing it on disk otherwise.
The main difference between buffering and spooling is that the latter allows the I/O of one job to overlap the computation of another. Buffering only allows the I/O of a job to overlap with its own computation.
With spooling, the disk is used as a very large buffer. Usually complete jobs are queued on disk to be completed later. A typical example is the spooler for a printer. When a print job is issued, the spooler takes care of it, sending it to the printer if it is not busy, or storing it on disk otherwise.
The main difference between buffering and spooling is that the latter allows the I/O of one job to overlap the computation of another. Buffering only allows the I/O of a job to overlap with its own computation.
Buffering
is a method of overlapping the computation of a job with its execution. It
temporarily stores input or output data in an attempt to better match the
speeds of two devices such as a fast CPU and a slow disk drive. If, for
example, the CPU writes information to the buffer, it can continue in its
computation while the disk drive stores the information.
With spooling, the disk is used as a very large buffer. Usually complete jobs are queued on disk to be completed later. A typical example is the spooler for a printer. When a print job is issued, the spooler takes care of it, sending it to the printer if it is not busy, or storing it on disk otherwise.
The main difference between buffering and spooling is that the latter allows the I/O of one job to overlap the computation of another. Buffering only allows the I/O of a job to overlap with its own computation.
Spooling is better than Buffering all the way... In Spooling,CPU Allows overlap of one Job with the computation and output of other job...whereas in Buffering,the CPU overlaps input,output and processing of a single Job. (Job = Program)
With spooling, the disk is used as a very large buffer. Usually complete jobs are queued on disk to be completed later. A typical example is the spooler for a printer. When a print job is issued, the spooler takes care of it, sending it to the printer if it is not busy, or storing it on disk otherwise.
The main difference between buffering and spooling is that the latter allows the I/O of one job to overlap the computation of another. Buffering only allows the I/O of a job to overlap with its own computation.
Spooling is better than Buffering all the way... In Spooling,CPU Allows overlap of one Job with the computation and output of other job...whereas in Buffering,the CPU overlaps input,output and processing of a single Job. (Job = Program)
7 What
are the different kinds of errors that the I/O component of an Operating System
has to handle? [4]
8 What
is the difference between the running of an interrupt handler and a task? What
are some restrictions that might be placed on an interrupt handler that would
not be placed on a task? [4]
9 The time difference between, when an
event occurs and when the software that services this event begins executing is
called event latency. Events can be serviced via a polling-process or it can be
interrupt driven. Why is the polling latency typically faster than the
interrupt latency? [8]
10 For each of the following disk
scheduling algorithms work through the head movements for the queue is given as
100, 200, 300, 10, 12 and 44. Assume the head was started at 100. The highest
cylinder number is 300.
i) FCFS
ii) SSTF
iii) SCAN
Which
is likely to result in less overall head movement? [9]
11 Give three differences between a
networked I/O operating and a disk I/O operation. Also explain whether the
differences are significant. [6]
12 Outline a design strategy, which would
make it possible to support more than one interrupt of the same type. [10]
13 Related
to I/O, what are the main services provided by Kernel? Explain any two of them?
[8]
14 In what circumstances are interrupts
more efficient than polling? [4]
15 A
hardware designer argues that he has enough transistors on the ship to provide
1024 integer registers and 512 floating point registers. You have been invited
as the operating system guru to give opinion about the new design.
i) What is the effect to having such a
large number of registers on the operating system?
ii) What additional hardware features you
would recommend added to the design above.
[12]
16 Consider
a uniprocessor kernel that user programs can trap into using system calls. The
kernel receives and handles interrupt request from I/O devices. Would there be
any need for critical sections within that kernel? [6]
17 Explain salient features of
I/O system of a general-purpose operating system. [12]
18 Differentiate between interrupts and
exceptions. [4]
19 A
disk drive has 5000 cylinders, numbered 0 to 4999. The drive is currently
serving a request at cylinder 143, and the previous request was at cylinder
125. The queue of pending requests in FIFO order is 86, 1470, 913, 1774, 948,
1509, 1022, 1750, 130. Starting from the current head position, what is the
total distance (in cylinders) that the disk arm moves to satisfy all the
pending requests of FCFS, SSTF, SCAN, LOOK, disk scheduling algorithms? [12]
20 what do you understand by I/O scheduling? What is
meant by spooling?
21 Disk
requests come in to the disk drive for tracks in the order of 55, 58, 39, 18,
90, 160,150, 38 184. The disk arm is initially at track 100. A seek takes 5
msec per track move. Compare the average seek lengths and seek times achieved
with: Shortest Service/Seek Time First (SSTF), SCAN and Circular-SCAN (C-SCAN)
strategies. [12]
22 Operating system is also called Resource
manager. Why? How are interrupts handled by the operating system? [4]
21 Explain
the term ‘Cycle Stealing’ in the context of DMA operations. [2]
22 What
is the difference between a block special file and a character special
file? [4]
23 Disk
requests are received by the disk driver for cylinders 10, 22, 20, 2, 40, 6 and
38, in that order. A seek takes 6 msec per cylinder move. How much seek time is
needed for
1) First
Code First Served
2) Elevator
algorithm (initially moving upwards)
In both cases, the arm is initially
at cylinder 20. [10]
24 How
can the storage systems in a computer system be organized in a hierarchy? What
is the use of the cache memory? Is it advisable to have more registers instead
of the cache memory? Justify. [6]
No comments:
Post a Comment