Spooling Presentation

Download Report

Transcript Spooling Presentation

The Functions of
Operating Systems
Spooling
Learning Objectives
Describe spooling, explaining why it is
used.
Simultaneous Peripheral
Operations On-Line (spooling)
Temporarily stores all input and output jobs on
some form of backing storage (usually a high-speed
device such as a disk), with a reference to the job
and its location stored on a spool / print queue.
When the output from a job is finished, the name
location of the file can be placed in a queue.
The Spooler / Print spooler (part of the OS) can
now send the name and location of the file to the
printer in the order in which the file details enter
the queue.
Then the printer pulls them off the backing
storage device at its own rate.
Reason for Spooling
So that slow peripheral devices do not
hold up the processor.

I/O devices are relatively slow when
compared to the processor.
Why spool in the way we do?
Jobs are named and not listed in the
printer queue until the entire job has been
saved:
Spooling compensates for the speed mismatch
between the processor and input/output devices;
input/output devices cannot process jobs as fast as
they are sent by a processor.

Spooling ensures that when, multiple jobs sent at the
same time to a single device are queued, they are kept
separate, no jobs are lost and complete jobs are
processed.
Process of sending jobs for printing
using a spooler
Jobs are stored temporarily on some form of
backing storage (usually a high-speed device such as
a disk).
When storage of a job is complete, its location is
stored on a spool / print queue.
The jobs in the spool queue can be prioritized
and a job reference can enter the queue at a
position according to its priority.
Spooler or Print Spooler
The part of the OS that handles the task of
spooling.
Example
Two jobs, in a network system, are producing output that is to go to
a single printer.
The output is being produced in sections and must be kept separate
for each job.
Opening two files (File1 and File2) on a disk, one for each job, can
do this.
As the files are on disk, job 1 can write to File1 whenever it wishes
and job 2 can write to File2.
When the output from a job is finished, the name (and other details)
of the file can be placed in a queue.
OS can now send the output to the printer in the order in which the
file details enter the queue.
As the name of a file does not enter the queue until all output from
the job to the corresponding file is complete, the output from
different jobs is kept separate.
Notes:
Spooling can be used for any number of
jobs.
Output itself is not placed in the queue.
The queue simply contains the details of
the files that need to be printed so that the
spooler can send these details to the
printer so that it can retrieve them at its
own rate.
Simultaneous Peripheral
Operations On-Line (spooling)
Plenary
Describe the process of spooling when
sending jobs for printing.
Process of sending jobs for printing
using a spooler
Jobs are stored temporarily on some form of
backing storage (usually a high-speed device such as
a disk).
When storage of job complete the job and its
location are stored on a spool / print queue.
The jobs in the spool queue can be prioritized
and a job reference can enter the queue at a
position according to its priority.