当前位置:网站首页>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.
边栏推荐
- 从入门到一位合格的爬虫师,这几点很重要
- codec2 BlockPool:不可读库
- 单点登录 思维导图
- In-depth analysis of z-index
- 2022.07.12_每日一题
- 高并发与多线程之间的难点对比(容易混淆)
- Analysis of the implementation principle and detailed knowledge of v-model syntactic sugar and how to make the components you develop support v-model
- Explain the example + detail the difference between @Resource and @Autowired annotations (the most complete in the entire network)
- 2022.07.15_每日一题
- DirectExchange switch simple introduction demo
猜你喜欢
随机推荐
Exam Questions Previous True Questions Wrong Bills [The Fourth Session] [Provincial Competition] [Group B]
【TA-霜狼_may-《百人计划》】美术2.3 硬表面基础
从入门到一位合格的爬虫师,这几点很重要
【微服务】(十六)—— 分布式事务Seata
多进程全局变量失效、变量共享问题
深度学习通信领域相关经典论文、数据集整理分享
LeetCode刷题——摆动序列#376#Medium
科普 | “大姨太”ETH 和 “小姨太”ETC的爱恨情仇
线程中断方法
批量翻译软件免费【2022最新版】
Redux state management
tidyverse笔记——dplyr包
电压源的电路分析知识分享
Moment.js common methods
完美指南|如何使用 ODBC 进行无代理 Oracle 数据库监控?
【并发编程】ReentrantLock的lock()方法源码分析
任务及任务切换
【解决】mysql本地计算机上的MySQL服务启动后停止。某些服务在未由其他服务或程序使用时将自动停止
Jobject 使用
基金投顾业务









