07 Handout 18
07 Handout 18
Input/output Management device driver. As an interface, its main task is to convert serial bitstreams to
I/O Devices block of bytes and perform error correction as necessary. A device driver is
Input/output (I/O) devices pertain to hardware devices that are capable of a software module that can be plugged into the operating system (OS). It tells
accepting input, delivering output, and/or managing other processed data. the OS and other software how to communicate and handle a particular I/O
Below are some examples of I/O devices: device. Note that in order to successfully communicate with the OS, these two
• Scanner • Mouse elements (2) are necessary for an I/O device to have (Tutorialspoint, n.d.).
• Laser printer • Bar code reader
• Gigabit ethernet • Audio-related devices An I/O device communicates with a computer system by sending signals over
• Switches • Display adapters a cable or even through air. A connection point, known as a port, can be used
by I/O devices. If devices share a common set of wires, the connection is called
Devices that are engaged with the computer I/O system can be grouped into a bus. A bus is composed of wires and a rigidly defined protocol that specifies
three categories (Stallings, 2018): a set of messages that can be transmitted through wires. Buses are widely
1. Human-readable devices – These are suitable for communicating used in computer architecture and vary in their signaling and connection
with computer users. Examples: Keyboard and mouse methods, speed, and throughput (Silberschatz, Galvin, & Gagne, 2018).
2. Machine-readable devices – These are suitable for communicating
with electronic equipment. Examples: Sensors and controllers
3. Communication devices – These are suitable for communicating
with remote devices. Examples: Digital line drivers and modems
Substantial differences exist across and within I/O device categories. The
following are some of the key differences (Stallings, 2018):
• Data transfer rate – This involves the amount of digital data that is moved
from one location to another within a specific time.
• Application – This pertains to the specific use of the device that
commonly depends on its actual purpose.
• Control complexity – This involves the level of difficulty in operating the
device.
• Unit of transfer – This indicates whether data is transferred as a stream
of bytes (involves a character device) or in large blocks (involves a block
Figure 1. A typical PC bus structure.
device). Source: Operating Systems Concepts (10th ed.), 2018 p. 491
• Data representation – This encompasses a data encoding scheme that
is used by the device that includes character codes and parity Aside from the three (3) categories of I/O devices, it is also significant to know
conventions. the distinction between the two (2) types of I/O devices based on the way they
• Error conditions – These involve the nature of errors, the way in which handle data (Stallings, 2018):
errors are reported, the consequences of each error, and the available 1. Block-oriented device – This type of device stores information in
responses. blocks that are usually fixed in size, and transfers are made one block
at a time. Hard disks and flash drives are examples of block-oriented
An I/O device typically contains a mechanical and an electronic component, devices.
where the electronic component is known as the device controller. Device
controllers technically work like an interface between an actual device and a
The logical structure of the I/O function will depend on the type of device and
its application. The following layers are involved when considering the simplest Figure 2. Simple representation of an I/O structure.
case – that a local peripheral device communicates through a stream of bytes
of records (Stallings, 2018): In selecting the size of the I/O, the following cost-related areas are considered:
• Logical I/O – This layer deals with the device as a logical resource and • Initializing buffers • Checking process privileges and limits
concerned with managing general I/O functions on behalf of the user • Making system calls • Mapping addresses to devices
• Mode or context switching • Executing kernel and driver codes
processes, allowing them to deal with the device using device identifiers
• Allocating kernel metadata • Freeing metadata and buffers
and simple commands.
Double Buffer. This involves the assignment of two (2) system buffers to an
operation. A process transfers data to (or from) one (1) buffer while the OS
The term cache memory is used to indicate a memory that is smaller and faster
to access than the main memory. This actually reduces the average memory
access time by exploiting the principles of locality. The same principle can be
applied to disk memory. A disk cache is a buffer in the main memory for disk
sectors (Stallings, 2018).
References:
Encyclopedia.com. (n.d.). Programmed I/O. Retrieved on December 13, 2021 from https://www.encyclopedia.com/computing/dictionaries-
thesauruses-pictures-and-press-releases/programmed-io
Gregg, B. (2021). System performance: Enterprise and Cloud (2nd ed.). Pearson Education, Inc.
Silberschatz, A., Galvin, P. & Gagne, G. (2018). Operating systems concepts (10th ed.). John Wiley & Sons, Inc.
Stallings, W. (2018). Operating systems: Internal and design principles (9th ed.). Pearson Education Limited
Tutorialspoint. (n.d.). Operating System – I/O Hardware. Retrieved on December 13, 2021 from
https://www.tutorialspoint.com/operating_system/os_io_hardware.htm