当前位置:网站首页>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.
边栏推荐
猜你喜欢
【Go语言入门教程】Go语言简介
2022.07.20_每日一题
【面试:并发篇37:多线程:线程池】自定义线程池
Titanic 预测问题
批量免费文字翻译
Automatic translation software - batch batch automatic translation software recommendation
零样本学习&Domain-aware Visual Bias Eliminating for Generalized Zero-Shot Learning
嵌入式系统驱动初级【2】——内核模块下_参数和依赖
Analysis of the principle and implementation of waterfall flow layout
DirectExchange交换机简单入门demo
随机推荐
金融租赁业务
Web浏览器工作流程解析
Zotero | Zotero translator plugin update | Solve the problem that Baidu academic literature cannot be obtained
基于交替迭代法的交直流混合系统潮流计算matlab程序iEEE9节点系统算例
基于LSTM的诗词生成
Log4net 思维导图
【科普向】5G核心网架构和关键技术
Install the gstreamer development dependency library to the project sysroot directory
【编程题】【Scratch三级】2022.03 冬天下雪了
简单谈谈Feign
2022.07.15_每日一题
单点登录 思维导图
庐山谣寄卢侍御虚舟
剑指offer(一)
第十七章:回溯探求指定入口的马步遍历,贪心无回溯探求马步遍历,递归探求nxm棋盘带障碍马步遍历
基金投顾业务
Core Tower Electronics won the championship in the Wuhu Division of the 11th China Innovation and Entrepreneurship Competition
强化学习科研知识必备(数据库、期刊、会议、牛人)
SCI写作指南
嵌入式系统驱动初级【2】——内核模块下_参数和依赖