Sie sind auf Seite 1von 8

Operating System

U2M3 Device Management

Device Management Functions


Track status of each device (such as tape drives, disk drives, printers, plotters, and terminals). Use preset policies to determine which process will get a device and for how long. Allocate the devices. De-allocate the devices at 2 levels:
At process level when I/O command has been executed & device is temporarily released At job level when job is finished & device is permanently released.
2

Device Manager Must


Know which components are busy and which are free.
Solved by structuring interaction between units

Be able to accommodate requests that come in during heavy I/O traffic. Accommodate disparity of speeds between CPU and I/O devices.
3

Handled by buffering records & queueing requests

Interrupt Handling (PCB)


Interrupt handler is the program that handles the interrupt. When the CPU makes a request for a device it does not wait until the device is ready,
CPU issues a request and continue with some other execution; when the device is ready the CPU is interrupted
CPU can now use the device.

Device Drivers
Device drivers are programs that enables various types of devices to present a uniform input /output interface to applications. The device driver hides the peculiarities of specific hardware devices from the user. Only the device driver knows the peculiarities of the specific device to whom it is assigned.

Peripheral Control
Spooling (simultaneous peripheral operations on-line), refers to putting jobs in a buffer, a special area in memory or on a disk where a device can access them when it is ready. Spooling is useful because devices access data at different rates.

Polling
Polling is a scheme that involves checking each device flag in turn to determine if its status has changed. A flag is a bit that changes from zero to one to indicate that unit has changed from free to busy.
CPU periodically tests the device status bit.

Major disadvantage with this scheme is determining how often the flag should be polled.
If polling is done too frequently, CPU wastes time testing flag just to find out that channel is still busy. If polling is done too seldom, channel could sit idle for long periods of time.
7

Buffering
Buffering- the act of using a buffer, a buffer is a temporary storage area, usually in RAM. The purpose of most buffers is to act as a holding area, enabling the CPU
to carry on processing while data is being input or output to manipulate data before transferring it to a device.

The process of transferring data from devices is relatively slow compared to the speed of the CPU, buffers are used to compensate for the different in speed of the CPU and these devices.

Das könnte Ihnen auch gefallen