che cos'è l'interruzione
2020-08-17 14:24: 44Zongheng Intelligent Control 3
che cos'è l'interruzione
(1) The invention of interrupts was used to solve macro-parallel needs. Macro means looking at it as a whole, and parallel means that multiple things are completed.
(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 macro level. Sometimes it is parallel at the macro level and serial at the micro level.
(3) In the example, a person is watching a movie. When the courier arrives, he pauses the movie and runs to collect the courier. After receiving the courier, he continues to come back to watch the movie. This example is macroscopic parallelism and microscopic serialization. In the example, one person is equivalent to one CPU (that is, a single-core CPU) in the SoC. This CPU cannot receive express delivery when watching movies, and it cannot watch movies when receiving express delivery (that is, it cannot be truly parallel). A single-core CPU is serial from a microscopic perspective, but because the CPU is very fast, it can be parallel from a macroscopic perspective.
(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) , continue performing regular tasks)
(5) Why are interrupts needed? Because a single-core CPU cannot actually be parallel, but through the interrupt mechanism, false parallelism can be achieved (parallel in a macro sense, but serial in a micro sense).
Baidu Encyclopedia explanation (interrupted)
computer terminology
Interruption means that when some unexpected situations occur during the operation of the computer and require host intervention, the machine can automatically stop the running program and transfer to the program that handles the new situation. After the processing is completed, it returns to the original suspended program to continue running.
Terminology explanation
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 program interrupt; when the processor accepts the interrupt, it only needs to pause for one or several cycles without executing the interrupt of the handler, which is called 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:
Che cos'è la porta seriale parallela, la connessione alla porta seriale
Che cos'è la comunicazione simplex e full-duplex?
Tag: interruption
-
How to choose the correct Internet of Things (IoT) communication method [2020-06-28]
-
What is GPRS DTU and its working principle explained [2020-08-12]
-
Comparative analysis of RTU and PLC, what are the advantages of RTU? [2020-06-22]
-
What is an external interrupt and the trigger mode of the external interrupt [2020-08-17]
- Previous article : What is an external interrupt and the triggering mode of an external interrupt?
- Next article : Internet of Things loRa technology, LoRa application explanation