吉林大学学报(信息科学版) ›› 2024, Vol. 42 ›› Issue (2): 284-293.

• • 上一篇    下一篇

基于互斥量的 MbedOS 调度机制剖析

刘长勇1a,1b,2 , 王宜怀2   

  1. 1. 武夷学院 a. 数学与计算机学院; b. 认知计算与智能信息处理福建省高校重点实验室, 福建 武夷山 354300; 2. 苏州大学 计算机科学与技术学院, 江苏 苏州 215006
  • 收稿日期:2022-03-16 出版日期:2024-04-10 发布日期:2024-04-12
  • 作者简介:刘长勇(1974— ), 男, 福建建瓯人, 武夷学院副教授, 主要从事嵌入式技术, 数字学习与数据挖掘研究, ( Tel) 86- 13860072215(E-mail)121903852@ qq. com。
  • 基金资助:
     国家自然科学基金资助项目(61672369); 福建省自然科学基金资助项目(2017J01651-01); 福建省自然科学科技基金资助项目(2022J011202)

Analysis of Mbedos Scheduling Mechanism Based on Mutual Exclusion

LIU Changyong 1a,1b,2 , WANG Yihuai 2   

  1. 1a. Department of Mathematics and Computer Science; 1b. Key Laboratory of Cognitive Computing and Intelligent Information Processing of Fujian Education Institutions, Wuyi University, Wuyishan 354300, China; 2. School of Computer Science and Technology, Soochow University, Suzhou 215006, China
  • Received:2022-03-16 Online:2024-04-10 Published:2024-04-12

摘要: 为了能清晰理解互斥量对共享资源的独占访问原理与机制, 在简要分析实时操作系统的互斥量的含义、 应用场合、 调度机制以及关键要素作用的基础上, mbedOS 互斥量调度机制进行了理论剖析。 以 KL36 芯片 为例对 mbedOS 的互斥量进行了实践, 基于时序图采用 printf 方法直观地输出了线程响应互斥量的调度过程信 息, 并对互斥量调度机制的实时性能进行分析。 通过对互斥量调度机制的剖析, 有助于进一步分析 mbedOS 的 其他同步与通信方式, 也可为深入理解其他实时操作系统的同步与通信手段提供参考借鉴。

关键词: 实时操作系统, 互斥量, mbedOS 实时操作系统, KL36 芯片, printf 输出 

Abstract: In order to have a clear understanding of the exclusive access principle and mechanism of mutex on shared resources, based on the brief analysis of the meaning, application occasions, scheduling mechanism and key elements of mutex in real-time operating systems, the mbedOS mutex scheduling mechanism are theoretically analyzed. Takes the KL36 chip as an example the mbedOS mutex is realized and the scheduling process information of thread response mutex is output spontaneously based on the sequence diagram and printf method. And the real-time performance of mutex scheduling mechanism is analyzed. The analysis of mutex scheduling mechanism is helpful to further analyze other synchronization and communication methods of mbedOS, and can also provide reference for in-depth understanding of other real-time operating system synchronization and communication methods. 

Key words: real time operating system(RTOS), mutex, mbedOS real-time operating system, KL36chip, printf

中图分类号: 

  •