Skip to content
Related Articles
Open in App
Not now

Related Articles

I/O Hardware in Operating System

Improve Article
Save Article
  • Difficulty Level : Medium
  • Last Updated : 13 Nov, 2022
Improve Article
Save Article

I/O Hardware is a set of specialized hardware devices that help the operating system access disk drives, printers, and other peripherals. These devices are located inside the motherboard and connected to the processor using a bus. They often have specialized controllers that allow them to quickly respond to requests from software running on top of them or even respond directly to commands from an application program. This post will discuss in detail I/O Hardware basics such as daisy chain expansion bus controller memory-mapped I/O Direct Memory Access (DMA)

The Daisy chain, expansion bus, controller, and host adapter are used to access the I/O hardware.

The daisy chain is a method of connecting multiple I/O devices with each other through a single connection point (pin). Each device can be accessed by plugging into any of the pins on this connection point. The expansion bus connects devices together in parallel with each other so that they can be accessed simultaneously by using only one cable instead of several cables (one per device). This design allows you to connect more than one peripheral device while maintaining compatibility with older systems that may not support additional peripherals or features such as memory-mapped I/O (MMIO).

A controller manages all incoming data from its associated port and sends outgoing commands from its associated port; it’s like an interface between an application software program and hardware components such as disk drives or network adapters

A host adapter is a bridge between the system bus and the expansion bus. It allows you to connect multiple expansion cards at the same time and provides additional interfaces for those cards such as DMA or MMIO. A controller manages all incoming data from its associated port and sends outgoing commands from its associated port; it’s like an interface between an application software program and hardware components such as disk drives or network adapters.

1. Polling

Polling is a software technique that uses a program to check the status of devices. The device can be a disk drive or any other peripheral device in the computer. The program polls the device for information, such as if it has data available or not. Polling is a slow way to get data from a device because it has to wait until another function occurs before being able to get information about its state.

In some cases polling may be desirable; for example, when there are several items being polled simultaneously and only one item updates its state at any time — the rest continue waiting until they receive an acknowledgment from one item that it’s done updating their states (which could take seconds).

Polling can also be used to check if a device is online or not. If the device is offline, then this information can be used to take some appropriate action such as pausing or suspending tasks that depend on the device (e.g., stopping a backup in progress).

2. Interrupts

The CPU is interrupted by several different devices, such as I/O hardware and peripheral devices. These interrupts are used by the I/O device to notify the CPU when it needs attention. The CPU can be interrupted by several different devices at any given time, but only one interrupt will be delivered to it at any given time. This can happen because of a hardware or software error occurring on an I/O bus—for example, if a disk drive has failed then all other data transfers will pause until it’s repaired; or perhaps another device wants access to memory (or vice versa). In either case, there won’t be any way for your application program not to be written specifically for this particular machine!

Interrupt-driven I/O cycle

Interrupt-driven I/O cycle

The operating system can also be interrupted by other processes that need CPU time. For example, if a user application program writes to a file and then exits, the operating system will write that file on disk before returning control back to the user. This is called multitasking and allows many different programs to run at once.

The operating system is responsible for scheduling the CPU’s time among multiple programs. This is done by using a program called an interrupt handler or interrupt service routine (ISR). An ISR is simply a piece of code that runs when an interrupt occurs and typically ends with returning control back to the original program.

It’s important to note that the operating system is never interrupted by an ISR.

3. Direct Memory Access:

DMA is a way to move data between the CPU and I/O devices. When a user wants to access memory from an I/O device (such as a disk drive), the user must first inform the operating system that they are going to perform the operation. This is done by attaching a special command called an interrupt request (IRQ) handler routine for each device that needs access. The interrupt handler routine then tells the user program when it should be ready for another task—usually using interrupts generated by hardware components like joysticks or network cards—and may even tell other processes running on other CPUs not only about what’s happening at that moment but also when something has happened before so they can take appropriate action as well!

The first step in using interrupts is to set up the interrupt controller. This is done by calling the BIOS INT 10h service with several parameters, including the number of IRQ lines available (16 is a common value), the maximum number of devices that can be connected to each line, and so on.

The next step is to assign an INT 10h handler for each device that needs access. This is done by calling the BIOS INT 15h service with several parameters, including the number of IRQ lines available (16 is a common value), the maximum number of devices that can be connected to each line, and so on

I/O Hardware Summary:

I/O hardware is a collection of devices that are used to make it easier for the CPU and other processors on your computer to communicate with the outside world. These devices may include:

Peripheral controller cards (also called I/O adapters) connect to the expansion bus (sometimes called PCI or ISA), and control how data is transferred between different parts of a computer system.

Interrupt request lines (IRQs) and serial ports, which allow multiple peripherals such as keyboards, mice, and printers to communicate with one another without having their own dedicated channel in memory.

A device driver software program that tells Windows what kind of hardware the user has installed so it can work properly; this may include information about how much RAM or hard drive space each device has available at any given moment in time because those things change over time depending on how much activity occurs within them throughout their life cycle.

Conclusion:

I/O Hardware is a key component of operating systems. It enables communication between the computer and other devices such as keyboards, mouse, printers, etc. I/O hardware has evolved over time and today there are many different types of I/O interfaces available in modern computers that can be used depending on the specific needs of your project or application

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!