Section 15.6
Operating Systems
15.6 Peripheral Control
15.6.1 Devices Drivers
Device drivers are small programs that contain details on how to communicate with a particular
peripheral. They form part of the OS.
15.6.2 Buffering
A buffer is an area of memory or a memory module used for holding data during I/O transfer.
Once the CPU issues the 'start' instruction the I/O channel can place data in a buffer while the
CPU is busy.
Because different peripherals have different buffers and I/O channels autonomous operation of
peripherals is permitted.
The technique allows effecient communication between devices that operate at different speeds.
The high speed device spools or writes ita data to disk and the slow speed device can read it
later.
15.6.4 Polling
One unit (often the CPU) checks the status of another (often a peripheral) at frequent
intervals.
Polling takes up large amounts of processor time and an interrupt system is usually
preferrable.
15.6.5 Interrupt For Peripherals
An interrupt is a signal generated by an event that alters the sequence in which the CPU
executes instructions.
The hardware generates the interrupts but the interrupts may be related to current
processes.
The interrupt register inside the CPU contains one bit for every different interrupt.
At the beginning of the FE cycle the interrupt register is checked and if a bit is set then
the state of the current process is saved and the OS gives control to the appropriate interrupt
handler.
The interrupt handlers are programs which carry out the action required by an interrupt.
Interrupt Masking
This term refers to the ability to enable and disable peripherals by software instruction.
At least one interrupt is non-maskable.