Codecademy Logo

I/O Systems

Interrupt Handler

The interrupt handler is a pool or queue of interrupts being sent to the CPU.

IO Software

The role of IO software is to receive signals from physical devices, interpret them, and then perform tasks accordingly through the operating system.

User-space vs. Kernel-space

The user-space is the place in memory in which user processes run. The kernel-space is the place in memory in which the kernel functions and manages system calls.

Kernel-space

The kernel-space is the place in memory where the kernel performs its functionality. The kernel manages the scheduling of tasks, buffering (storing data in memory when transferring between a computer and IO devices), spooling (holding output data for an IO device), and more.

IO Software Layers

IO software consists of the following layers:

  • User-level IO software or user processes
  • Device-independent software
  • Device Drivers
  • Interrupt handlers
  • Hardware

Device Drivers IO Software

Device drivers are device-specific code that is added to a computer so that a device may interact with a computer.

Device Independent Software

Device independent software refers to the software components that handle functions that are not specific to any single IO device.

The Role of Operating Systems in IO Systems

The operating system is responsible for managing IO systems, the hardware and software necessary to handle input and output devices on a computer.

IO Devices

IO, or input/output, devices are physical, electronic devices that can receive and produce signals between a computer and the outside world.

Blocking

Blocking refers to the method in which an application stops all other execution and waits for the current IO request to be completely executed.

Non-blocking

Non-blocking refers to the method in which requests get placed into a queue when they are waiting for IO requests to be completed so that the CPU may allocate its resources to continue processing other requests.

Interrupts

Interrupts are a hardware mechanism that sends a signal to the CPU whenever an IO device needs the CPU’s attention

IO Device Categories

IO devices can be categorized into three categories:

  • human-readable
  • machine-readable
  • communication

Device Drivers Definition

Driver devices provide support to both CPUs and IO devices so that they may communicate effectively with one another.

Types of Device Drivers

There are two types of device drivers:

  • Kernel-mode drivers allow for basic functionality on a CPU. They even contribute to the start-up of an operating system when we turn on our computers.
  • User-mode drivers are necessary when a user adds additional hardware to their computer which requires its own set of drivers that need to be installed.

DMA Controller

DMA controllers are hardware devices that allow IO devices to transfer data to/from memory while bypassing the CPU.

Memory-mapped IO

Memory-mapped IO allows for an IO device and the main memory of a computer to share address space in their transfer of data

Reading/Writing on IO Devices

The three methods used by IO devices to read/write data are the character method, block method, and network method.

- The character method of reading/writing data looks like a sequential series of bytes and each byte is accessed one at a time.
- The block method of reading/writing data allows for random access as memory is designed to store data in blocks of a fixed size.
- The network method of reading/writing data is designed to use different types of interfaces (such as a socket interface) to access multiple devices over a network.

Learn more on Codecademy