o que é a interrupção

What is interrupt?

(1) A invenção das interrupções foi utilizada para resolver necessidades macro-paralelas. Macro significa olhar para a coisa como um todo, e paralelo significa que várias coisas são completadas.

(2) Microscopic parallelism refers to true parallelism, which means that multiple things are happening at the same time, accurate to every second or even every moment. Parallelism at the macro level is not equal to parallelism at the micro level. Sometimes it is parallel at the macro level and serial at the micro level.

(3) No exemplo, uma pessoa está a ver um filme. Quando o estafeta chega, interrompe o filme e corre para o ir buscar. Depois de receber a encomenda, volta a ver o filme. Este exemplo é um paralelismo macroscópico e uma serialização microscópica. No exemplo, uma pessoa é equivalente a uma CPU (ou seja, uma CPU de núcleo único) no SoC. Essa CPU não pode receber entrega expressa quando assiste a filmes, e não pode assistir a filmes quando recebe entrega expressa (ou seja, não pode ser verdadeiramente paralela). Uma CPU de núcleo único é serial de uma perspetiva microscópica, mas como a CPU é muito rápida, ela pode ser paralela de uma perspetiva macroscópica.

(4) In the above example, most of the time is spent watching movies, and a small amount of time is spent collecting express delivery. So analogously to the CPU, watching movies should be a regular task of the CPU, while receiving express delivery should be an interrupt routine. That is to say, the CPU has been performing the task of watching movies. When the express arrives (an interruption occurs), the courier (similar to the interrupt source) will call someone to pick up the express (the interrupt source will trigger an interrupt to notify the CPU to resume the regular task), and continue performing regular tasks)

(5) Porque é que as interrupções são necessárias? Porque um CPU de núcleo único não pode ser realmente paralelo, mas através do mecanismo de interrupção, é possível obter um falso paralelismo (paralelo num sentido macro, mas em série num sentido micro).

What is interrupt?

Computer terminology

Interrupção significa que, quando ocorrem algumas situações inesperadas durante o funcionamento do computador e requerem a intervenção do anfitrião, a máquina pode parar automaticamente o programa em execução e transferir para o programa que lida com a nova situação. Após a conclusão do processamento, regressa ao programa suspenso original para continuar a funcionar.

Explicação da terminologia

Refers to the entire process in which the processor handles emergencies that occur during the running of the program. During the running of the program, if an emergency occurs outside the system, within the system, or in the current program itself, the processor immediately stops the running of the current program and automatically switches to the corresponding processing program. (Interrupt service routine). After the processing is completed, return to the original program operation; this whole process is called a program interrupt.

When the processor accepts the interrupt, it only needs to pause for one or several cycles without executing the interrupt handler, which is called a program interrupt. It is a simple interrupt.

Interrupts can be divided into two categories: masked interrupts and non-maskable interrupts. Interrupts that can be controlled by the program are called masked interrupts or maskable interrupts. When masked, the processor will not accept interrupts. On the contrary, they cannot be controlled by the program. Interrupts that are shielded and must be processed immediately by the processor are called non-maskable interrupts or unmaskable interrupts.

Non-maskable interrupts are mainly used for situations such as power outages and power failures that must be processed immediately. When the processor responds to an interrupt, there is no need to execute a query program. An interrupt that sends a vector address to the CPU from the responded interrupt source is called a vector interrupt, and vice versa is a non-vector interrupt. Vector interrupts can improve the interrupt response speed.

Related knowledge articles

Sobre mim
e87d0ef219292bb40d6f120e7d321bcb?s=150&d=mp&r=g
Mais publicações