Data Centers

The trouble with troubleshooting interrupts

The CPU has a busy life filled with interruptions. Why not make its work easier? Read Steven Pittsley?s overview on interrupt uses, IRQ conflicts, and how to troubleshoot pesky IRQ problems.


Don’t you just hate interruptions? You’re watching the NBA finals and, just when it gets interesting, the phone rings with a telemarketer on the other end who just won’t take no for an answer. As the call ends, you realize that you missed that last-second jumper to end the half. Muttering, you walk back to your chair, vowing to never buy whatever that guy was selling.

Now, imagine that you’re a CPU. As you sit in your cozy little casing, your whole life revolves around flipping zeros to ones and ones to zeros. Suddenly, you get a little burst of energy from the mouse, asking you to tell the hard drive that it should send the monitor a picture. You flip a whole new set of ones and zeros to send the hard drive the picture request. Afterward, you return to flipping ones and zeros for the task you were previously working on. A few milliseconds later you get another burst of energy. This time it is from the hard drive requesting you send the picture to the monitor. While you are in the middle of sending the monitor the picture, the mouse sends you another burst of energy requesting something else. This continues to go on until you are finally worn out and need a break. So what do you do? You do what every other CPU does; you send the monitor an error message from Windows so the user blames Microsoft for the problem, while you sit back and relax for a few milliseconds.

Does that job sound like fun? Probably not. However, it is important to understand those computer interrupts. In this Daily Feature, I will provide you with a brief overview on how to work with the types of interrupts that your computer uses. I’ll also include some easy steps that will help you troubleshoot the dreaded IRQ conflicts that occasionally interrupt your day.

The skinny on interrupts
While you may not like interruptions in your daily life, your CPU lives for them. Each component in the computer must have its own line of communication to the CPU for communication. This line is called an interrupt, or IRQ, line. Whenever you ask the CPU to process something, one of the computer’s components sends an interrupt message (a small electrical charge) to the CPU, asking it to process the information. The CPU will stop whatever it was doing and provide the peripheral with the requested information. While this process may appear to be cumbersome and unreliable, it actually works very well if configured correctly.

In today’s computers, the CPU has a single interrupt line. Since computers have many different components that need to communicate with the CPU, we now have the programmable interrupt controller (PIC). There are two PICs that control eight interrupt lines, giving the system a total of 16 interrupts.

If you are asking yourself how two PICs can talk to a CPU that only has one interrupt line, don’t worry. The two PICs are daisy chained, or cascaded, together. To illustrate this concept, pretend that you have two surge suppressors that have eight outlets apiece. The power cord on one of them is plugged into the wall outlet, just like the CPU has one interrupt line. The second surge suppressor is plugged into the second outlet of the first one, chaining them together and allowing both of the surge suppressors to provide power to fifteen outlets total.

Common interrupt uses
While the computer system may have 16 total interrupts, you aren’t able to configure all of them for use because some of them have been reserved for the system. For example, IRQ 0 is reserved for the system timer, IRQ 2 is used to cascade to the PIC that controls IRQ 8 through 15, and IRQ 13 is used for the math coprocessor. The following list shows you the common uses for the system's 16 IRQ’s.
  • IRQ 0—Reserved for the system timer
  • IRQ 1—Used for the keyboard
  • IRQ 2—Cascade for interrupts 8 through 15
  • IRQ 3—Com2 and Com4
  • IRQ 4—Com 1 and Com 3
  • IRQ 5—Common default for sound cards; can also be used for LPT2 or the network adapter
  • IRQ 6—Floppy disk controller
  • IRQ 7—Used primarily for LPT1 but can be assigned to another device
  • IRQ 8—Used for the real-time clock and cannot be configured for any other components
  • IRQ 9—Used to cascade to IRQ 2
  • IRQ 10—Available for use; commonly used for the network adapter
  • IRQ 11—Available for use; commonly used for a SCSI controller
  • IRQ 12—Available for use; commonly used for the PS/2 mouse
  • IRQ 13—Used by the math coprocessor and cannot be configured for any other components
  • IRQ 14—Used for the primary IDE controller (Both IDE master and slave devices use this IRQ.)
  • IRQ 15—Available for use; commonly used for a secondary IDE controller

Configuring interrupt settings
When Windows 95 was introduced, many people rejoiced because plug and play was supposed to eliminate the need to manually configure your systems resources, including IRQ settings. Although plug and play helped alleviate many IRQ problems, it didn’t eliminate them. The newer Windows operating systems have made improvements in interrupt configuration, but conflicts still have not been eradicated. This is especially true when trying to manually configure IRQ settings.

To view the interrupt settings for a particular device, you will use the Device Manager. In Windows 2000, you can find the Device Manager by selecting the System icon from Control Panel. Then, select the Hardware tab, where you will find the Device Manager button. Figure A shows you what the Device Manager window looks like.

Figure A


To view a component’s interrupt settings, you will need to expand the device list until you locate the appropriate component. Then, double-click on the component, or right-click it and select Properties. The interrupt settings are located under the Resources tab, as shown in Figure B.

Figure B


Figure B shows that the network adapter in this system is configured to use IRQ 3 and does not currently have an IRQ conflict with another component, as indicated in the Conflicting Device List at the bottom of the window. Notice that Use Automatic Settings is selected. If you want to manually configure an IRQ setting, you must deselect this box, highlight the desired resource, and click the Change Setting button. After doing this, the Edit Interrupt Request dialog box will be displayed, and you can change the IRQ value, as shown in Figure C.

Figure C
If you select a value that is already in use, you will be warned in the Conflict Information box located at the bottom of the Edit Interrupt Request dialog box.


If you elect to use the interrupt, regardless of the conflict, you will be warned one final time. If you select the answer Yes at this dialog box, the interrupt will be assigned to both components, causing an IRQ conflict.

Resolving an interrupt conflict
Interrupt conflicts can be frustrating problems that are difficult to troubleshoot. In general, the primary symptoms that occur are system lockups, devices that stop working, or devices that don’t work at all. These problems occur because two components are attempting to use the same interrupt line to the CPU at the same time. Since the problem only occurs when the two devices attempt to use the interrupt line at the same time, you may be experiencing intermittent system lock ups for some time before realizing there is an IRQ conflict.

If you suspect that you have an IRQ conflict, you should go to Device Manager and check the devices for a conflict (Figure D).

Figure D
This system has already detected an IRQ problem with the network adapter.


Figure E shows you the Properties page of the network adapter. At this point, you should click on the Resources tab.

Figure E
The system cannot find a free resource for this device to use.


As shown in Figure F, the only option that you have is to Set Configuration Manually.

Figure F


In Figure G, the red slash around the icon tells you that the Interrupt Request has a problem.

Figure G
The Conflicting Device List shows you with which device that the network adapter is conflicting, eliminating the need to verify the IRQ setting for both devices.


To correct this problem, you should click the Change Setting button and change the interrupt value. For this example, we changed the IRQ value to 03, as shown in Figure H. After doing this, the conflict was eliminated.

Figure H


Conclusion
That wasn’t so bad, was it? We caught that problem right away and fixed it with just a few mouse clicks. In reality, it may or may not be so simple. If you are familiar with the IRQ scheme, you should be able to resolve interrupt conflicts without having to flip any device switches or open up the case. However, the steps I suggested for resolving an IRQ conflict might also be performed after you have tried a variety of other troubleshooting steps.

Editor's Picks