当前位置:网站首页>Interrupt knowledge point set
Interrupt knowledge point set
2022-06-10 08:22:00 【Heartbeat package 1】
Catalog
One 、 What is interruption
Two 、 Interrupt the whole process
3、 ... and 、 Interrupt type
Four 、 Interrupt source
5、 ... and 、 Interrupt priority
6、 ... and 、 Interrupt mask
7、 ... and 、 Break nesting
8、 ... and 、 Vector break
One 、 What is interruption
according to 《 Teacher's Encyclopedia Dictionary 》 Description in : Interruption refers to the process of computer operation , When there are some unexpected situations requiring host intervention , The machine can automatically stop the running program and transfer to the program dealing with the new situation , After processing, return to the original suspended program to continue running .
The interrupt system of single chip microcomputer is an important part of computer . real-time control 、 Automatic troubleshooting 、 Interrupt system is often used for data transmission between computer and peripheral equipment . The application of interrupt system greatly improves the computer efficiency .
Two 、 Interrupt the whole process
The whole process of interrupt refers to the process starting from the interrupt request sent by the interrupt source ,CPU In response to this request , The current program was interrupted , Go to interrupt service program , Until the interrupt service program is executed ,CPU Return to the original program and continue the whole process .
Most interrupt systems have the following operations , These operations are arranged according to the execution order of interrupts :
① Receive interrupt request .
② Check the interrupt mask bit of this level , If the bit is 1 Then the interrupt source of the current level participates in the priority queue .
③ Interrupt priority selection .
④ After the processor executes an instruction, or the instruction cannot be executed , Then immediately suspend the current procedure . next , The interrupt unit specifies the corresponding main memory unit according to the interrupt level , The interrupted instruction address and the current main state information of the processor are stored in this unit .
⑤ The interrupt unit specifies another main memory unit according to the interrupt level , Take out the new status information of the processor and the starting address of the interrupt control program of this level from these units .
⑥ Execute interrupt control program and corresponding interrupt service program .
⑦ After executing the interrupt service program , Use special instructions to make the processor return to the interrupted program or turn to other programs .
The data of registers and memory used by interrupt service program will be overwritten , Interrupts are returned , So it is usually necessary to protect the site . The method is to push the content to be protected onto the stack .
3、 ... and 、 Interrupt type
Hard interrupt , The signal comes from the outside of the chipset .
- Maskable interrupt
- Non maskable interrupt
- Processor interrupt
- Pseudo interrupt
Soft interrupt : This is generally called system call , As the name suggests, it is an interrupt set by software . It is a software operation that needs to cause CPU Attention .
Four 、 Interrupt source
An interrupt source is the cause of an interrupt .
① The machine broke down .
② Procedural interruption . Some machines call programmatic interrupts “ abnormal ”, Not called interrupt .
③ Input - Output device interrupt .
④ External interruption .
⑤ Call the manager .
5、 ... and 、 Interrupt priority
Several interrupt requests may occur at the same time , But the interrupt system can only respond and process in a certain order . The interrupt that can be responded to first has the highest priority , Process in order of priority . The priority level is determined by the interrupt queue line of the interrupt component .
6、 ... and 、 Interrupt mask
Corresponding mask bits are set corresponding to each interrupt level . Only the mask bit is 1 when , Only this interrupt level can participate in the interrupt priority queue . The interrupt mask bit can be established by a special instruction , Therefore, the interrupt priority can be flexibly adjusted . Some machines also set the mask bit for some interrupt sources , Only the mask bit is 1 when , The corresponding interrupt source works .
7、 ... and 、 Break nesting
When CPU When responding to an interrupt , If an interrupt source with high priority sends an interrupt request , be CPU Can interrupt the ongoing interrupt service program , And keep the breakpoint of the program ( Similar to subroutine nesting ), Respond to advanced interrupts , After advanced interrupt processing , Then continue the interrupted interrupt service program , This process is called interrupt nesting . If the priority level of the interrupt source issuing the new interrupt request is the same as or lower than the interrupt source being processed ,CPU Will not respond to this interrupt request , New interrupt requests cannot be processed until the interrupt service program being processed is executed .
8、 ... and 、 Vector break
Set a vector for each interrupt source . These vectors are sequentially stored in a specific memory area of the main memory . The contents of the vector are the starting address of the corresponding interrupt service program and the processor status word . In response to an interrupt , The interrupt system hardware provides the vector address , The processor obtains the vector according to the address , And transfer to the corresponding interrupt service program .
边栏推荐
- Renewable energy consulting 2022 Global Industry Analysis Report
- 伦敦旅游必去博物馆推荐:伦敦自然历史博物馆
- Is it better to use UUID for database primary key or snowflake or something else
- Qt5.9.5+Jetson Nano开发:unknown module(s) in qt designer
- Swagger quick use
- 接口测试怎么进行,如何做好接口测试
- Pwn: research on random function
- 电阻、电容、电感
- Notice on the issuance of Shenzhen action plan for cultivating and developing biomedical industry clusters (2022-2025)
- Model deployment
猜你喜欢

【Lingo】求解方程组

Guys, help me! Reinstall mysql, and the current root password appears when the password is set

目前技术圈最全面的 Layer2 研究总结

Redis數據類型之list和set以及sorted_set排序

How to use module export import: uncaught syntaxerror: cannot use import statement outside a module

【Lingo】运算符

Huawei device configuration hub and spoke
![OS Experiment 6 [device management]](/img/13/4080c19edc930ba610e9881559f389.png)
OS Experiment 6 [device management]
![[chapter 65 of the flutter problem series] a solution to setting the maximum height of showmodalbottomsheet in the flutter is invalid](/img/a3/7db76a03bfa6c036e576074af84428.png)
[chapter 65 of the flutter problem series] a solution to setting the maximum height of showmodalbottomsheet in the flutter is invalid

swagger快速使用
随机推荐
怎么用思维导图设计测试用例
Using fast and slow pointer to find the midpoint of linked list
[apio2022] Mars - structure, state compression
Introduction to temporal database incluxdb
2022.06.04学习内容
One's deceased father grind adjusts, read this you will understand!
什么是单元测试,为什么要做单元测试
Redis数据类型之和hash
[untitled]
泰国曼谷大城府被福布斯评为“后疫情时代最值得一去的城市”
Using wechat games to achieve Dragon Boat battle - making zongzi
The latest Jilin construction safety officer simulation question bank and answers in 2022
Cache the log in the queue mode, display the log in the queue and display it in different colors (c)
数据库主键用uuid好还是雪花或者其他什么比较好呢
Software testing: 10 super practical testing rules known after work
Industry application saves 5g? Don't think too much. It's still mobile phone users who save 5g
How to conduct interface test and how to do interface test well
Huawei device configuration hub and spoke
漏洞复现_CVE-2020-0796 永恒之黑漏洞_遇坑_已解决
归并排序最简单的写法——只需要不到15行