当前位置:网站首页>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.
边栏推荐
猜你喜欢

Automatic translation software - batch batch automatic translation software recommendation

2022.07.29_每日一题

小实战项目之——吃货联盟订餐系统

【TA-霜狼_may-《百人计划》】美术2.3 硬表面基础

2022.07.14_每日一题

Run the NPM will pop up to ask "how are you going to open this file?"

【微服务】 微服务学习笔记二:Eureka注册中心的介绍及搭建

360 push-360 push tool-360 batch push tool

基于LSTM的诗词生成

英语翻译软件-批量自动免费翻译软件支持三方接口翻译
随机推荐
gstreamer的caps event和new_segment event
【Star项目】小帽飞机大战(七)
Conditional statements of shell (test, if, case)
2022.07.14_每日一题
How to choose a suitable UI component library in uni-app
英语翻译软件-批量自动免费翻译软件支持三方接口翻译
文件 - 05 下载文件:根据文件Id下载文件
Zotero | Zotero translator plugin update | Solve the problem that Baidu academic literature cannot be obtained
nohup principle
毫米波技术基础
MySql的安装配置超详细教程与简单的建库建表方法
03-SDRAM:写操作(突发)
完美指南|如何使用 ODBC 进行无代理 Oracle 数据库监控?
任务及任务切换
搭建zabbix监控及邮件报警(超详细教学)
文件 - 03 下载文件:根据文件id获取下载链接
基于LSTM的诗词生成
shell之条件语句(test、if、case)
小实战项目之——吃货联盟订餐系统
从 Google 离职,前Go 语言负责人跳槽小公司