0% found this document useful (0 votes)
361 views2 pages

Device-Independent I/O Software

The document discusses device-independent I/O software, user-space I/O software, and the kernel I/O subsystem. The device-independent I/O software provides a uniform interface and common functions for different devices. User-space I/O libraries like stdio provide a higher-level interface to access the kernel. The kernel I/O subsystem is responsible for scheduling I/O requests, buffering and caching data during transfers, and spooling and reserving devices.

Uploaded by

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

Device-Independent I/O Software

The document discusses device-independent I/O software, user-space I/O software, and the kernel I/O subsystem. The device-independent I/O software provides a uniform interface and common functions for different devices. User-space I/O libraries like stdio provide a higher-level interface to access the kernel. The kernel I/O subsystem is responsible for scheduling I/O requests, buffering and caching data during transfers, and spooling and reserving devices.

Uploaded by

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

Device-Independent I/O Software

The basic function of the device-independent software is to perform the I/O functions
that are common to all devices and to provide a uniform interface to the user-level
software. Though it is difficult to write completely device independent software but we
can write some modules which are common among all the devices. Following is a list
of functions of device-independent I/O Software −

 Uniform interfacing for device drivers


 Device naming - Mnemonic names mapped to Major and Minor device numbers
 Device protection
 Providing a device-independent block size
 Buffering because data coming off a device cannot be stored in final destination.
 Storage allocation on block devices
 Allocation and releasing dedicated devices
 Error Reporting

User-Space I/O Software


These are the libraries which provide richer and simplified interface to access the
functionality of the kernel or ultimately interactive with the device drivers. Most of the
user-level I/O software consists of library procedures with some exception like spooling
system which is a way of dealing with dedicated I/O devices in a multiprogramming
system.
I/O Libraries (e.g., stdio) are in user-space to provide an interface to the OS resident
device-independent I/O SW. For example putchar(), getchar(), printf() and scanf() are
example of user level I/O library stdio available in C programming.

Kernel I/O Subsystem


Kernel I/O Subsystem is responsible to provide many services related to I/O. Following
are some of the services provided.
 Scheduling − Kernel schedules a set of I/O requests to determine a good order
in which to execute them. When an application issues a blocking I/O system
call, the request is placed on the queue for that device. The Kernel I/O
scheduler rearranges the order of the queue to improve the overall system
efficiency and the average response time experienced by the applications.
 Buffering − Kernel I/O Subsystem maintains a memory area known
as buffer that stores data while they are transferred between two devices or
between a device with an application operation. Buffering is done to cope with a
speed mismatch between the producer and consumer of a data stream or to
adapt between devices that have different data transfer sizes.
 Caching − Kernel maintains cache memory which is region of fast memory that
holds copies of data. Access to the cached copy is more efficient than access to
the original.
 Spooling and Device Reservation − A spool is a buffer that holds output for a
device, such as a printer, that cannot accept interleaved data streams. The
spooling system copies the queued spool files to the printer one at a time. In
some operating systems, spooling is managed by a system daemon process. In
other operating systems, it is handled by an in kernel thread.
 Error Handling − An operating system that uses protected memory can guard
against many kinds of hardware and application errors.

You might also like