0% found this document useful (0 votes)
25 views

Device Management11232

The document discusses device management in operating systems. It explains that operating systems are responsible for requesting and releasing devices, performing input/output operations like reading and writing, and getting and setting device attributes. It also discusses how device drivers act as translators between the operating system and hardware, and how interrupt handlers process interrupts from devices. The document covers concepts like polling, buffering, and spooling to manage input/output between faster processors and slower peripheral devices.

Uploaded by

Case
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

Device Management11232

The document discusses device management in operating systems. It explains that operating systems are responsible for requesting and releasing devices, performing input/output operations like reading and writing, and getting and setting device attributes. It also discusses how device drivers act as translators between the operating system and hardware, and how interrupt handlers process interrupts from devices. The document covers concepts like polling, buffering, and spooling to manage input/output between faster processors and slower peripheral devices.

Uploaded by

Case
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 3

A program, as it is running, may need additional resources to proceed.

Additional resources may be more memory, tape drives, access to files, and so
on. If the resources are available, they can be granted, and control can be
returned to the user program; otherwise, the program will have to wait until
sufficient resources are available.

Files can be thought of as abstract or virtual devices. Thus, many of the system
calls for files are also needed for devices.

If there are many multiple users of the system, we must first request the
device, to ensure exclusive use of it. After we are finished with the device, we
must release it.

Once the device has been requested (and allocated to us), we can read, write,
and (possibly) reposition the device.

Operating System responsibility to Device Management

1. Request device, release device


2. Read, write, reposition
3. Get device attributes, set device attributes
4. Logically attach or detach devices

I/O CONTROL

The lowest level of file-system organization (i.e. an efficient and convenient


access to disk), the I/O control, consists of device drivers and interrupt
handlers to transfer information between memory and the disk system.

It is also referred to as the portion of the central processor of some computer


systems that contains software/firmware for supervising data flow between
memory and the input/output devices connected to the CPU.

Device Drivers

The path between the operating system and virtually all hardware not on the
computer's motherboard goes through a special program called a device
driver.
A driver helps the operating system communicate with the electrical signals from
computer hardware.
Much of a driver's function is to be the translator between the electrical signals
of the hardware subsystems and the high-level programming languages of the
operating system and application programs.
Drivers take data that the operating system has defined as a file and translate
them into streams of bits placed in specific locations on storage media, or a
series of laser pulses in a printer.
Because there are such wide differences in the hardware, there are differences in
the way that the driver programs function. Most run when the device is required,
and function much the same as any other process. The operating system will
frequently assign high-priority blocks to drivers so that the hardware resource
can be released and readied for further use as quickly as possible.

A device driver can be thought of as a translator. Its input consists of high level
commands such as retrieve block 123. Its output consists of low level
hardware-specific instructions, which are used by the hardware controller, which
interfaces the I/O device to the rest of the system. The device driver usually
writes specific bit patterns to special locations in the I/O controllers memory to
tell the controller on which device location to act and what actions to take.

INTERRUPT HANDLER (PCB)

This was already discussed in Process Management.

PERIPHERAL CONTROL

Every peripheral device has a unique identity.


Peripheral actions might include load or unload device driver, and allocated or
unallocated device. Some device specific actions might include read, write, and
seek.

It connects a unit of peripheral equipment with the central processing unit of a


computer and which interprets and responds to instructions from the central
processing unit.

POLLING - BUFFERING AND SPOOLING

Polling is making continuous requests for data from another device.

An Operating System determines the order in which jobs are processed. A job is an
operation the processor manages. Jobs include receiving data from an input device,
processing instructions, sending information to an output, and transferring items
from storage to memory and vice versa.

Sometimes, a device may already be busy processing one job when it receives a
second job. This occurs because the processor operates at a much faster rate of
speed than peripheral devices. For example, if the processor sends five print jobs to
a printer, the printer can print only one document at a time and store as many
documents as its memory can handle.

While waiting for devices to become idle, the operating system places items in
buffers. A buffer is a segment of memory or storage in which items are
placed while waiting to be transferred from an input device or to an
output device.

The operating system commonly uses buffers with print jobs. This process is
called spooling. Spooling sends print jobs to a buffer instead of sending
them immediately to the printer.

The buffer holds the information waiting to be printed, while the printer prints from
the buffer at its own rate of speed. By spooling print jobs to a buffer, the processor
can continue interpreting and executing instructions while the printer prints.
Multiple print jobs line up in a queue in the buffer. A program called a print spooler,
intercepts print jobs from the operating system and places them in a queue.

You might also like