Welcome to Bucaro TecHelp!

Bucaro TecHelp
Maintain Your Computer and Use it More Effectively
to Design a Web Site and Make Money on the Web

About Bucaro TecHelp About BTH User Agreement User Agreement Privacy Policy Privacy Site Map Site Map Contact Bucaro TecHelp Contact RSS News Feeds News Feeds

Victims of Sandy Hook

Stop the Slaughter of Innocents. Congress is bought and paid for by gun lunatics and gun promotion groups. If you want to live in a safe America, help buy Congress back for America. Send a donation to Mayors Against Illegal Guns, 909 Third Avenue, 15th Floor New York, NY 10022

Interrupt Request Lines (IRQs)

What happens when the CPU (Central Processor Unit) is busy doing something, maybe defragmenting the hard disk or checking for viruses, and you press a key on the keyboard? You don't want to wait until the CPU is done with what it's doing before it recognizes your key press. You need some way to interrupt the CPU and say "hey, I need your attention here!". There are two ways to tell the CPU that you need it to interrupt what it's doing and work on something with a higher priority; polling and interrupts.

With polling, the CPU continuously runs a loop that checks each hardware device to see if it needs attention. If a device needs attention, the CPU suspends what it's working on and loads and runs the software required to service the hardware device. When the operation required by the device is finished, the CPU goes back to polling and working on what it's working on before it serviced the hardware device. Most modern hardware devices use interrupts.

An interrupt request (IRQ) is a connection between a hardware device and the CPU. A hardware device uses it's assigned IRQ line to signal or "interrupt" the CPU when it needs attention. Interrupts have priorities. For example, lets assume the CPU is running a virus checker and you decide to "drag and drop" a file. The file operation will raise an interrupt that will cause the CPU to suspend virus checking to perform the file moving operation. But while the file is being moved, you press a key on the keyboard.

Since the keyboard interrupt has a higher priority than the file moving operation, it will cause the CPU to suspend the file moving operation and load and run the software required to service the key press. When the operation required by the key press is finished, the CPU goes back to the file moving operation. After the file has been moved, provided you don't go and press another key, the CPU will return to running the virus checker. I think you can see how IRQ's work.

8259 Interrupt Controller

Early PC motherboards used the Intel 8259 Interrupt Controller IC. It provides 8 IRQ lines numbered IRQ0 - IRQ7. When a device such as the keyboard, disk drive, printer, and so on, needs to get the CPU's for attention, it activates it's assigned IRQ line. The Interrupt Controller then activates the INT signal to the CPU.

CPU and Interrupt Controller

The CPU acknowledges the interrupt by lowering the INTA signal. Then the Interrupt Controller places the IRQ number on the data bus. The CPU uses the IRQ number to jump to the devices service routine in memory, and begins executing that code.

Cascaded 8259 Interrupt Controllers

Later a second IRQ IC was added to provide channels 8 through 15. 8259 ICs can be cascaded by connecting IRQ2 of the master 8259 to the IRQ line of the slave. The CAS lines of all cascaded ICs form a private bus over which the cascaded 8259 IC's can communicate.

RSS Feed RSS Feed

Follow Stephen Bucaro Follow @Stephen Bucaro

Computer Subsections

Fire HD
[Site User Agreement] [Privacy Policy] [Site map] [Search This Site] [Contact Form]
Copyright©2001-2016 Bucaro TecHelp 13771 N Fountain Hills Blvd Suite 114-248 Fountain Hills, AZ 85268