The Device Manager (DM) is responsible for
managing the use of all devices that are peripheral to computer
system. Not all input is derived from people (for example it may
derive from instruments, storage devices and so on. Similarly,
not all output is intended for people; examples again include
instruments, storage devices, etc. The management of input and
output is a vital part of the computer.
The DM will attempt to maintain a balanced use of all device requests
according to the supply and demand. One problem is that device
resources are limited and may also have to be shared between a
number of jobs. The DM also provides the human interface function
as it is typically the user (a person) who will input a job, command
or the data. The user may receive visual, audio or hard-copy output
as a result.
The Device Manager aims to:
1. achieve device independence
It aims to facilitate more simplified software development. That
is it removes the complexities of individual devices and provides
a 'translator' for device use.
2. handle errors
The DM will ensures 1/0 data are correctly handled, and will inform
user in event of any detected error.
3. speed up transfer of data
As the 1/0 is typically the slowest part of a program's execution
the DM will apply a range of algoritluns to enhance both the software
and hardware speeds.
4. handle deadlocks
The DM will monitor conditions that can 'lock up' a system (e.g.,
resource holding), and will take steps to try to avoid these conditions.
5. enable multi-users systems to use dedicated
The DM will assign sensible printing instructions, whilst trying
to prevent the erroneous output of data,
All devices are 1/0 peripherals. The device
manager is a 'sub-manager' of the general operating system, as
such it is responsible for communicating with all these devices
as required by an individual job. All 110 operations are fundamental
to every operating system. The control of peripherals must be
handled efficiently. The DM will attempt to make efficient use
of all available devices whilst retaining integrity of data.
The DM will:
- monitor and track the status of every
device, channel and control unit
- decide how to make efficient use of available resources
- set fair and efficient policies (FCFS, Prioritization, etc.)
for use of devices
- allocate devices and length of use according to policy and job
- re-allocate devices
- deal with device errors including correction and user notification
Main categories of devices
Peripheral equipment can be described as
those hardware devices that are attached to a computer. This will
include for example devices for input, output, communications
and secondary storage. Some devices may be used for more than
one activity, e.g., a disk used for input and output. Input devices
will receive data and transfer it to the CPU. Output devices will
receive and present data from the CPU.
The management and control of all input/output operations is fundamental
to all operating systems. The device manager aims to control access
to ensure efficient use of devices whilst at the same time ensuring
the integrity of the data that are accessed via these devices.
Examples of I/O devices include:
This output device will display the output on a visual display
unit and can be said to resemble a television screen. This device
may form part of an interactive computer system where a response,
message or request is initiated by the processor and sent to the
user. No further processing will take place until the necessary
action is taken by the user. The response time from the user is
inevitably far slower than any action undertaken by the processor.
This input device may be found as part of an on-line/interactive
computer system. - Many keyboards adopt the QWERTY layout - this
is the actual layout of the keys on your keyboard. The standard
is said to allow for the frequency that a particular letter is
used measured against the physical stretching of your fingers
to reach certain keys. Other keyboard layouts that have been used
include DVORAK, MALTRON, VELOTYPE, all of which have been developed
in an attempt to increase data entry speed.
Drives - disk, tape, CD ROM
This input/output device may require data to be keyed (typed in
using a keyboard) first. The data will be saved to the secondary
storage device, e.g., disk. The disk may be used to input data
for processing at a later stage.
These output devices are used to support a of computer systems.
They are typically categorised according to speed, the method
of printing (e.g., impact or non-impact printing) and the quality
of output, (e.g., letter quality, high, low, etc.). Line printers
are considered impact printers, where the letters themselves make
contact with the paper surface. This contact will involve a high
degree of mechanical movements to produce output, as a result
impact printers are typically slower than non-impact printers.
Laser printers are a form on non-impact printer. No keys physically
hit the paper. With the laser printer a beam of light writes an
image onto the surface of the drum (which forms part of the printer).
This in turn causes the toner (form of ink) to be deposited and
transferred to the paper. Very fast laser printers are now available
where the quality of output is to a very high standard.
Other input/output devices include, sound
cards, modems, optical character/mark readers, magnetic ink character
readers, bar code readers, kimball tags, forms of voice input
devices, smart card readers, etc..
Individual devices will typically be made
up of many component parts that in turn will affect rate of the
speed at which data can be transferred. Inevitably each device
will consist of both electronic and mechanical elements. An input
event will result in some form of electrical signal that will
need to be converted into a signal that allows the mechanical
movement of the device to occur. As a result this conversion of
signals will incur longer access times and subsequently result
in lower data transfer rates. In addition regular intervention
from the input/output (I/O) controller is required to facilitate
this action - the actual intervention from the I/O controller
further slows down data transfer rates.
Some example data transfer rates follow:-
Keyboard - 50 words per minute (with average of 5 characters per
word) are input via keyboard
- 250 bytes (characters) per minute
- 4 bytes per second.
These section contains in excess of
15,000 bytes (characters). Remember spaces, tabs and other characters
that are not normally seen are also considered here. These characters
will have some form of binary representation as with ordinary
characters such as letters of the alphabet. In theory this section
of the workbook could have been input in 3750 seconds -that just
over an hour!
Printer - 12 pages per minute (where each
page is set at 80 characters wide x 66 lines)
- 12 x 5280 bytes per minute = 63360 bytes per minute
- 1056 bytes per second
If we continue to consider these lecture notes (15,000 bytes),
using this calculation this document will take less than a minute
Disk transfer rates will depend on the type
of disk, examples include:
HDD (IDE) - 5 Megabits per second (MBps)
HDD (SCSI) - 10-20 MBps
CDROM(xl) - 150 MBps
CD ROM (x8) - 900 MBps
Noticeably, by comparison data transfer
rates from the computer to a printer are far quicker, here human
intervention does not involve keying in any characters. Humans
cannot begin to the match processing speeds as evidenced with
a computer processor. You should be aware that the technology
supporting these storage devices is continually improving, as
such the examples given aim only to provide an indication of the
speed differentials between the different types of devices.
A further characteristic of an input/output
device is evidenced in the way that data are written to or read
from a storage device. Two categories include character oriented
devices and block oriented devices:
Character Devices - Here data are handled
in a series of bytes (byte stream), that is data are sent one
character at a time. There is little structure (if any) to a byte
stream. Line printers are examples of character oriented devices.
Block Devices - Here data are handled in
blocks that are fixed in size. The data will be transferred one
block at a time. This technique was originally designed to save
space on a magnetic tape and to reduce the number of input/output
The device manager aims to balance these
speed differentials in such a way that all devices are being used
efficiently most of the required time. The DM is mainly concerned
with providing the shared use of devices, whilst maintaining acceptable
speeds for all users. The DM facilitates a range of service types:
1. dedicated devices
Here one job will reserve the sole use of device throughout its
execution. Some jobs are more suited to dedicated use, e.g., plotters,
tape drives etc.. A device may not be used 100% of the time that
the job is active - as such it should be noted that an idle device
time is a wasted resource.
2. shared devices
Here the DM will assign a device to a number of active jobs running
at the at same time. Inevitably there will be areas of conflict
where for example two jobs are 'fighting; for the same device.
In this case these issues will be resolved using a predetermined
policy. The DM will sequence process requests in order to achieve
optimum device use whilst attempting to avoid job conflicts.
3. virtual devices
This can be considered as a combination of the two above - where
dedicated devices are used in a shared way. To accomplish this
spooling is used to re-route an individual job's output to disk.
When 'spooled' output is complete this is then directed solely
to a device for output. An example of this could be where two
programs running concurrently have been released by two different
users. Program one is producing sales invoices and program two
is producing a stores picking list. All records produced for each
program are temporarily saved to a spool area. Only when processing
has finished, are the completed output sent to the printer. When
the printer is ready to receive invoices the paper will need to
be changed to invoice paper. Notably the owners of each job think
they are sending their output direct to the same printer. The
halfway point (spool buffer) is of no significance to the user.
The DM will have help from a number of I/O
Controllers that control one or more peripheral device. The controller
aims to relieve the CPU from undertaking routine peripheral control
tasks (e.g. lowering and raising a pen for a plotter).
Peripherals typically have two main component
1. electro-mechanical part
2. electronic part
The electronic part provides the control and interface for the
electro-mechanical part. You may find the I/O controller on a
plug-in card, especially if the device is optional. Alternatively,
it may form part of the Motherboard, notably when the device is
compulsory, for example a keyboard. The I/O Controller's job is
to handle the I/O device and establish the required bus access
Device Manager software
This consists of four parts:
- user level interface
- device independent component
- device drivers
- interrupt handlers
Basic Input/Output Software (BIOS)
The BIOS is stored on a ROM chip normally
found on the Motherboard. This chip is accessed when the computer
system is first switched on via a boot program (here a boot program
contains program instruction that is executed when a computer
is booted up - started). The overall objective of the BIOS is
to ensure that the range of input/output devices connected to
the computer system can work together. This is achieved through
a range of low level program routines that works in support of
the device manager's role to manage and co-ordinate all the input/output
operations that are put to devices connected to the computer.
User level interface
The User Level Interface is responsible
for all the user interaction with the system. It provides an application
interface for the devices. It normally consists of software library
items linked into a common user program. This library may be general
(as provided by a program's compiler) or specific (as provided
with a device, for example the font libraries supplied with some
printers). This interface level facilitates interaction between
a user/system and a particular device. For example the steps required
to assign a printer to a particular user and their job, or the
steps taken to adopt printing fonts not supported by a particular
printer by its manufacturing default.
Device independent component
A file can be read/written to a device -
the operating system disguises the differences. A file may for
example be re-directed to a line printer, despite the fact that
the data were originally stored in blocks to disk. Some functions
of device handling are general and apply to all peripherals, as
such they are built into the operating system. Typical functions
include device naming, protection, buffering, allocation, de-allocation
and error handling.
A device driver can be described as a hardware
or software unit that interfaces between the device and the CPU.
It is the unit that performs functions such as interrupts, error
detection and data buffering. It is responsible for translating
instructions from an application into conunands that the device
can understands. The device driver will contain device dependent
code which will be specific to the type or make of device. It
is normally written by the device suppliers and then loaded as
an extension to the operating system at time of device installation.
The interrupt handlers are a crucial part
of the system. They are responsible for synchronisation of processes
and their requirements. The interrupt handler (11-I) monitors
the current I/O usage situation.
When an interrupt is received the III decides
how to best respond. It identifies which device sent the interrupt
request. At which stage the active process is interrupted (paused)
and the device is paused. The interrupt signal is received, the
status is analysed and a response is given. The device is restarted
when the control is returned to the interrupted process. In some
case a priority interrupt scheme is used.
There are three main types of interrupts:
1. Internal hardware interrupts
For example where a program tries to divide
by zero - the computer system's digital logic level will not permit
2. External hardware interrupts
This may be caused by the peripheral device controllers or by
co-processors - for example where the interrupts are hardware
manufacturer explicit and so cannot be overridden with software.
3. Software interrupts
These are typically generated by the applications software or
the user. They usually only temporarily appear to take over control
of the computer whilst waiting for some form of response.
Direct Memory Access
Direct Memory Access (DMA) is a technique that allows a device
to gain direct access to the main memory of the computer. When
the device initiates direct memory access the processor is compelled
to stop all bus activity - so allowing for higher data rates.
This I/O technique allows a control unit to access the main memory
directly, and therefore transfer the data without intervention
from the CPU.
A buffer is a temporary storage area reserved for an 1/0 operation
where a quantity of data will be read from, or written to disk.
The buffers temporarily reside in useful locations throughout
the system, for example in main memory, channels, and control
units. They can store data that will be read from an input device,
or that will be written to an output device They will allow I/O
results to be queued into a direct access device prior to writing.
The CPU will move data onto the buffer very
quickly. The device will move data from the buffer very slowly.
They are effectively used to allow for speed differences in I/O.
In other words they can be used to synchronize the movement of
data between the faster CPU and the slower device channels.
In this section we have defined the role of the Device Manager,
in particular in reference to the general model of an operating
system. We have identified three categories of device services,
including dedicated, shared and virtual device services.
We have examined each of the four components
found in the Device Manger Software and identified three types
of interrupt handlers.
Finally we have examined how devices use memory, in particular
Direct Memory Access and the use of buffers.