Open In App

Device Controllers in Operating System

Improve
Improve
Like Article
Like
Save
Share
Report

Pre-requisites: DMA

In computer systems, I/O devices do not usually communicate with the operating system. The operating system manages their task with the help of one intermediate electronic device called a device controller. 

  • Input devices are those devices that generate data to give input to the computer system. Examples- mouse, trackball, keyboard, CD-ROM.
  • Output devices accept data from the computer system. Examples- printer, graphics display screen, plotter.
  • Input/Output (I/O devices) devices can give data as input and receive output as data from the computer system. Examples- disk, tape, writable CD.

The device controller knows how to communicate with the operating system as well as how to communicate with I/O devices. So device controller is an interface between the computer system (operating system) and I/O devices. The device controller communicates with the system using the system bus. So how the device controller, I/O devices, and the system bus is connected is shown below in the diagram.

Device Controller and IO devices

Device Controller and IO devices

In the above diagram, some IO devices have DMA (Direct Memory access) via device controllers and some of them do not have DMA. The devices which have a DMA path to communicate with the system to access memory are much faster than devices that have a non-DMA path to access the memory. The devices have a non-DMA path via the device controller to access the memory, they have to go from the processor which means it will be scheduled by the scheduler and then when it gets loaded into RAM then it will get the CPU to execute its instruction to access memory so it is slow from devices which has a DMA.

A device controller generally can control more than one IO device but it is most common to control only a single device. Device controllers are stored in the chip and that chip is attached to the system bus there is a connection cable from the controller to each device which is controlled by it. Generally, one controller controls one device. The operating system communicates with device controllers and the device controller communicates with devices so indirectly operating system communicates with IO devices. 

Nowadays, most controllers have Direct Memory Access to execute their tasks. And because of DMA, concurrent execution of process increases and so overall performance increases.


Last Updated : 27 Feb, 2023
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads