当前位置:网站首页>interrupt and pendSV
interrupt and pendSV
2022-07-31 07:39:00 【South wave son】
1. Overview
The reader has already understood the detailed process of task switching through the task and task switching section. In fact, it is far from enough to realize the function of task switching.Because, the operation of PSP must be in privileged mode, and the user's program is working in thread mode.Therefore, if the user wants to realize the task switching function, he must find a way to make the CPU work in the privileged mode.I might need to know more to understand how embedding is an operating system implementation.
The following content is highly platform-dependent, but the principles are similar.The content mentioned here is explained based on the ARM Cortex-M processor.
2. Operating modes and privilege levels of the CPU
Generally, a CPU will have different operation modes and privilege levels to realize the distinction between the operating system level and the user level, and then further control the operation authority.We all know that each user of the Linux system has different operating permissions from the root user, and the application layer and the kernel layer also have different permissions for hardware operations.How does Linux implement permission control?I wonder if any readers have asked similar questions?In fact, the control of permissions is not only implemented at the software level, but also needs to be supported by hardware at a certain level.
We take the ARM Cortex-M family of processors as an example, which supports two processor operating modes and two privilege levels.
Two modes of operation:
- handler mode: interrupt and exception execution code is in this mode
- thread mode: other code is in this mode
The original intention of introducing the two modes is to distinguish the code of the ordinary application and the code of the exception service routine - including the code of the interrupt service routine.
Two privilege levels:
- Privilege Level
- User level
This can provide a protection mechanism for memory access, so that ordinary user program code cannot accidentally, even maliciously, perform critical operations.The processor supports two privilege levels, which is also a basic security model.
边栏推荐
- Conditional statements of shell (test, if, case)
- 【Go】Go 语言切片(Slice)
- 【Go语言入门】一文搞懂Go语言的最新依赖管理:go mod的使用
- iOS大厂面试查漏补缺
- DirectExchange switch simple introduction demo
- LeetCode刷题——摆动序列#376#Medium
- 第十六章:构建n(5,7)阶素数幻方
- 360 push-360 push tool-360 batch push tool
- Chapter 17: go back to find the entrance to the specified traverse, "ma bu" or horse stance just look greedy, no back to search traversal, "ma bu" or horse stance just look recursive search NXM board
- 庐山谣寄卢侍御虚舟
猜你喜欢
文件 - 04 下载文件: 根据文件下载链接下载文件
Zotero | Zotero translator插件更新 | 解决百度学术文献无法获取问题
Database Principles Homework 2 — JMU
How to use repeating-linear-gradient
芯塔电子斩获第十一届中国双创大赛芜湖赛区桂冠
2022.07.13_每日一题
Analysis of the implementation principle and detailed knowledge of v-model syntactic sugar and how to make the components you develop support v-model
科普 | “大姨太”ETH 和 “小姨太”ETC的爱恨情仇
Redux state management
LeetCode:952. 按公因数计算最大组件大小【欧拉筛 + 并查集】
随机推荐
小实战项目之——吃货联盟订餐系统
gstreamer的caps event和new_segment event
零样本学习&Domain-aware Visual Bias Eliminating for Generalized Zero-Shot Learning
事务的传播机制
2022.07.14_每日一题
LeetCode:952. 按公因数计算最大组件大小【欧拉筛 + 并查集】
How to choose a suitable UI component library in uni-app
芯塔电子斩获第十一届中国双创大赛芜湖赛区桂冠
熟悉而陌生的新朋友——IAsyncDisposable
电脑开机密码怎么设置?如何给你的电脑加上“安全锁”
【解决】npm ERR A complete log of this run can be found in npm ERR
Kubernetes调度
基于LSTM的诗词生成
【C语言项目合集】这十个入门必备练手项目,让C语言对你来说不再难学!
QFileInfo常规方法
从 Google 离职,前Go 语言负责人跳槽小公司
【科普向】5G核心网架构和关键技术
2022.07.15_每日一题
Automatic translation software - batch batch automatic translation software recommendation
从入门到一位合格的爬虫师,这几点很重要