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

PCB抄板

(border-box) The difference between box model w3c and IE

讲解实例+详细介绍@Resource与@Autowired注解的区别(全网最全)

科普 | “大姨太”ETH 和 “小姨太”ETC的爱恨情仇

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

2022.07.18_每日一题

tidyverse笔记——dplyr包

解决安装 Bun 之后出现 zsh compinit: insecure directories, run compaudit for list. Ignore insecure directorie

Zero-Shot Learning & Domain-aware Visual Bias Eliminating for Generalized Zero-Shot Learning

Database Principles Homework 2 — JMU
随机推荐
2.(1)栈的链式存储、链栈的操作(图解、注释、代码)
tidyverse笔记——dplyr包
一文读懂 MongoDB 和 MySQL 的差异
深度学习通信领域相关经典论文、数据集整理分享
Chapter 16: Constructing the Magic Square for Prime Numbers of Order n(5,7)
DirectExchange switch simple introduction demo
2022.07.15_每日一题
服务器和客户端信息的获取
360推送-360推送工具-360批量推送工具
【面试:并发篇38:多线程:线程池】ThreadPoolExecutor类的基本概念
PCB抄板
英语翻译软件-批量自动免费翻译软件支持三方接口翻译
2022.07.15_每日一题
剑指offer(一)
基金投顾业务
批量免费文字翻译
Zabbix6.2惊喜发布!特别优化中大型环境部署的性能!
Explain the example + detail the difference between @Resource and @Autowired annotations (the most complete in the entire network)
One of the small practical projects - food alliance ordering system
2022.07.20_每日一题