IRQ Intro

 

Anytime several I/O devices share the same bus there must be some type of system for getting information from the I/O devices to RAM and then the CPU. If every device sent data on the bus at the same time there would be a system crash. There are four methods used to coordinate communication between devices, the first two are implemented in software and the last two in hardware:

1. Polling - software program periodically checks with each I/O devices to see if it has data that needs to be transferred to memory. This is like the teacher asking each and every student if they have anything they would like to share with the rest of the class.

2. Programmed I/O - each and every device is given a chance to send data, if the device is busy it sends an busy signal to the CPU and it waits until the device is ready.

3. Interrupt-driven I/O - Devices send an Interrupt Request (IRQ) to the processor alerting it that the device has data to transfer. The CPU acknowledges the request and asks for the data to be sent.
This is like students raising their hands in class and the teacher responding to the person with a raised hand.

MI - maskable interrupts can be ignored by the CPU under certain conditions>
NMI - Non maskable interrupts cannot be ignored by the CPU, it will always respond to an NMI. A typicall NMI signal is "Parity Check Error" when data is sent to RAM.

4 DMA - Allows an intelligent device to take control of the bus and transfer data to the system memory without interrupting the CPU.

In the first computers there were only 8 interrupts (IRQs) but as more and more I/O devices were added more IRQs were needed. 8 more IRQs were added by cascading IRQ 2 to 8 more IRQs thus current ISA systems have 16 IRQs. The first interrupt controller is cascaded to the second interrupt controller through IRQ 2 cascading to IRQ 9.

How can you check IRQs? Right click on My Computer and go to Device Manager. You can display devices by resources which will show the IRQ of the device.

PCI gets around the limited IRQ by its own IRQ controller that channel devices through four different IRQ. The IRQ controller manages the devices making sure only one is using the data bus at a time, thus IRQ issues are minimized with PCI.