实时操作系统事件响应机制剖析
Analysis of Event Response Mechanism of Real-Time Operating System
刘长勇 1王宜怀2
作者信息
- 1. 武夷学院数学与计算机学院,福建武夷山 354300;武夷学院福建省茶产业大数据应用与智能化重点实验室,福建武夷山 354300;苏州大学计算机科学与技术学院,江苏苏州 215006
- 2. 苏州大学计算机科学与技术学院,江苏苏州 215006
- 折叠
摘要
为了能清晰理解事件的工作原理与机制,通过分析事件在实时操作系统中的作用、响应原理及流程,基于KL36微控制器采用类PC机的printf输出法,从调度过程时序、响应时间性能等方面剖析了 mbedOS的事件响应机制.实验结果表明,通过printf函数能将事件响应过程的线程地址、队列地址、队列内容、线程进出队列情况以及事件位等信息直观输出,为读者从底层理解mbedOS的事件响应原理和流程提供便利,也为分析mbedOS的其他同步与通信手段的脉络结构提供方法借鉴.
Abstract
In order to clearly understand the working principle and mechanism of events,to analyze the role,response principle,and response process of events in real-time operating systems,based on the KL36 microcontroller,a PC-like printf output method is adopted to analyze the event response mechanism of mbedOS from the aspects of scheduling process timing,response time performance,etc.The experimental results show that the printf function can intuitively output information such as thread address,queue address,queue content,thread in and out queue status,and event bits during the event response process.This provides convenience for readers to understand the event response principle and process of mbedOS from the bottom layer,and also provides a method reference for analyzing the context structure of other synchronization and communication methods of mbedOS.
关键词
实时操作系统/事件响应机制/printf输出/mbedOS实时操作系统/KL36芯片Key words
real time operating system/event response mechanism/printf output/mbedOS real-time operating system/KL36 chip引用本文复制引用
基金项目
福建省自然科学基金资助项目(2022J011202)
出版年
2024