Material Interruption
One names IRQ (of English I nterrupt R e' q' uest ) a interruption which is started by a line of material input-output of a Microprocesseur or of a Microcontrôleur.
The material interruptions are used in data processing when it is necessary to be able to react in real-time to an asynchronous event , or, in a more general way, in order to save the execution time related to a loop of consultation ( polling loop ).
Popularized description
A many whole of specialized electronic circuits placed in the computers ensures each one a quite precise function, for example to manage posting on the screen or the activity of a disc or an interface network. They are known as specialized because are unable to fulfill other functions that those for which they were conceived while the principal Processeur (CPU) remains their leader and crossroads of the communications. The components of each unit are usually gathered on an expander card or a zone of the mother board.The majority of these specialized units cannot only provide all the functions necessary to their missions thus request sometimes the assistance of the principal processor, this would be to only provide or obtain information resulting from other elements of the machine. With this intention the processor can with regular intervals question each one of them in order to determine if it needs assistance, for example in order to provide or to obtain information.
These repeated and often useless interrogations distract it from its mission which consists in animating the programs of the user. In addition the fraction of the resources of the principal processor constantly mobilized by these interrogations increases with the number and the power of the specialized units.
Various technical means save the CPU these periodic interrogations by providing to the specialized units a means of drawing its attention at any time so that it assists them, therefore by distracting it from the execution of the programs of the user only where necessary.
For that certain legs (physical contacts) of the processor are connected to electric tracks connecting it to the specialized units. Each one of the latter can appear there by modifying the logical level of the line in order to require of the assistance, therefore to invite the processor to take the necessary measures.
To answer a request the CPU will have:
- to preserve the context of execution of the program in progress in order to be able, in the long term, to take again the execution
- of it to read in memory the site of the intended program to manage the particular event (called Routine of management of interruption or Interrupt handler), pre-established at the time of the assumption of responsibility, by the computer, of the unit specialized (often at the time of the Amorçage)
- to carry out the routine, runs program thanks to which it processor will interact with the specialized unit which requests it in order to satisfy its waitings
- to restore the context of execution of the program stopped
- to continue has to carry out this last
- this sequence of events can very frequently occur (several tens of thousands of times a second),
- of the auxiliary components (in particular an administrative circuit of interruptions) assist the processor during these treatments
- when several interruptions occur simultaneously, the processor (even the operating system, when it provides the routine of management) has means of thus determining their respective priorities the order of taking into account.
The electric tracks delivering this information with the CPU are called lines of interruption or lines of IRQ . In a deep past each one was associated, at a given moment, only one specialized unit but of the easy ways now allow to let several units request the CPU by the means of the same line of IRQ, even in a simultaneous way.
The acronym IRQ indicates all at the same time the concept even of interruption of the execution on third request like one of these requests.
IRQ on compatible architectures IBM PC
The microcomputers compatible with IBM PC use a microprocessor compatible with the Intel 8088, which has a table of 256 programmable interruptions. Among those, 16 are directly started by external events of input-output. Those are named IRQn, N going from 0 to 15. The peripherals (keyboard, mouse, printer) must be able to function at the same time, but the microprocessor is able to carry out only one interruption at a given time. The controller of interruption or controller of IRQ thus has as a task of sérialiser the calls of interruption towards the microprocessor. Certain peripherals being more critical than others, the serialization of the calls of interruption is influenced by the number of IRQ which fixes a priority. Thus IRQn is priority on IRQn+1.
In the case of the first microcomputers PC compatibles, the integrated circuits 8259A and 8259B manage these requests.
Drunk IRQ and historical ISA
With each IRQ a peripheral fixed by the design with architecture is associated; 4 of them remaining available for additional peripherals. The installation of a peripheral (for example, of an expander card) not envisaged by this diagram requires two stages: to configure the material (often by positioning riders on the chart), in order to indicate to him which line to use, and configure the software in order to indicate to him which line is used by the chart. An inadequacy between the configuration of the software and the hardware, or a material Conflict between two peripherals configured both to use the same line, is often causes of dysfunction.
The IRQ on the first IBM PC/XT were defined as follows (by decreasing set of priorities):
-
IRQ 0: Clock system
- IRQ 1: Keyboard
- IRQ 2: Second controller of interruption (PC/AT)
- IRQ 3: Port series (COM2/COM4)
- IRQ 4: Port series (COM1/COM3)
- IRQ 5: Hard drive
- IRQ 6: Disk drive
- IRQ 7: Parallel port (LPT1)
It is noticed that the COM1 and COM3 as well as ports COM2 and COM4 use the same interruptions. That seems illogical. It is in fact possible to use port COM1 and port COM3 (idem for COM2 and COM4) provided that they are not active simultaneously.
At the time of the passage of the PC/XT to PC/AT, a second controller of interruption was added in cascade of the first. The IRQ on the first IBM PC/AT were thus defined as follows (priority 0 being strongest):
-
IRQ 0: Clock System
- IRQ 1: Keyboard
- IRQ 2/9: N/A (NCV)
- IRQ 3: Port series (COM2/COM4)
- IRQ 4: Port series (COM1/COM3)
- IRQ 5: LPT2 (chart of sound)
- IRQ 6: Disk drive
- IRQ 7: Parallel port (LPT1)
- IRQ 8: Clock real-time
- IRQ 10: N/A
- IRQ 11: N/A (USB)
- IRQ 12: N/A (PS/2)
- IRQ 13: Coprocessor maths.
- IRQ 14: Primary education hard drive
- IRQ 15: Secondary hard drive
The IRQ 9,10,11 are not used, and are available for additional peripherals.
IRQ and drunk ISA Plug' Play
Specification ISA Plug and Play, fruit of a collaboration between Intel and Microsoft, aim at automating the attribution of IRQ for the peripherals using bus ISA.
Drunk IRQ and NCV
| Random links: | Tree pruner | Dolerite | Paul-Emile Bécat | Battle of Large Crowned | Štulac (Lebane) | Banlieue_noire_de_Cleveland,_Minnesota |