What is an interrupt? Explain the steps involved in handling or servicing an interrupt paying particular attention to the concept of priority. Give examples of interrupt types & number for standard PC architecture.

Authors Avatar
What is an interrupt? Explain the steps involved in handling or servicing

an interrupt paying particular attention to the concept of priority.

Give examples of interrupt types & number for standard PC architecture.

What is an interrupt?

An interrupt is a signal from a device attached to a computer or from a program within the computer that causes the main program that operates the computer (the operating system) to stop and figure out what to do next. Almost all personal (or larger) computers today are interrupt-driven - that is, they start down the list of computer instructions in one program (perhaps an application such as a word processor) and keep running the instructions until either (A) they can't go any further or (B) an interrupt signal is sensed. After the interrupt signal is sensed, the computer either resumes running the program it was running or begins running another program.

Basically, a single computer can perform only one computer instruction at a time. But, because it can be interrupted, it can take turns in which programs or sets of instructions that it performs. This is known as multitasking. It allows the user to do a number of different things at the same time. The computer simply takes turns managing the programs that the user effectively starts. Of course, the computer operates at speeds that make it seem as though all of the user's tasks are being performed at the same time. (The computer's operating system is good at using little pauses in operations and user think time to work on other programs.)

An operating system usually has some code that is called an interrupt handler. The interrupt handler prioritises the interrupts and saves them in a queue if more than one is waiting to be handled. The operating system has another little program, sometimes called a scheduler that figures out which program to give control to next.

In general, there are hardware interrupts and software interrupts. A hardware interrupt occurs, for example, when an I/O operation is completed such as reading some data into the computer from a tape drive. A software interrupt occurs when an application program terminates or requests certain services from the operating system. In a personal computer, a hardware interrupt request (IRQ) has a value associated with it that associates it with a particular device.

IRQ

An IRQ (interrupt request) value is an assigned location where the computer can expect a particular device to interrupt it when the device sends the computer signals about its operation. For example, when a printer has finished printing, it sends an interrupt signal to the computer.

The signal momentarily interrupts the computer so that it can decide what processing to do next. Since the computer might not understand multiple signals to the computer on the same interrupt line, a unique value must be specified for each device and its path to the computer.

Prior to Plug-and Play (PnP) devices, users often had to set IRQ values manually (or be aware of them) when adding a new device to a computer.

If you add a device that does not support PnP, the manufacturer will hopefully provide explicit directions on how to assign IRQ values for it since the average computer user does not have the technical knowledge to definer the IRQ values for a device themselves.

Why Interrupts Are Used to Process Information
Join now!


The processor is a highly tuned machine that is designed to (basically) do one thing at a time. However, we use our computers in a way that requires the processor to at least appear to do many things at once. If you've ever used a multitasking operating system like Windows 95, you've done this; you may have been editing a document while downloading information on your modem and listening to a CD simultaneously. The processor is able to do this by sharing its time among the various programs it is running and the different devices that need its ...

This is a preview of the whole essay