节点文献

嵌入式操作系统的设计与实现

The Design and Implemtation of Embedded Real-Time Operating System

【作者】 张晶

【导师】 陈抗生;

【作者基本信息】 浙江大学 , 电磁场与微波技术, 2006, 硕士

【摘要】 嵌入式实时操作系统是嵌入式系统的基础软件平台,它必须具有实时性好,稳定性高,可移植性强,通用性好并且针对具体的应用可裁减可配置的特点。本论文的研究工作在于设计并实现一个高性能的嵌入式实时操作系统——Skernel。 本论文在研究嵌入式操作系统设计理论的基础上,分析了具体的设计问题,并根据嵌入式系统应用的特点,提出了一个相比同类嵌入式操作系统较优的内核设计方案:基于微内核构架,实时性好,系统服务完备,支持多达256个任务,支持多处理器,兼容标准操作系统调用接口规范,可裁减可配置。在设计过程中,引入了面向对象的思想,内核中的许多模块被看作同一个对象——事件,这使得内核的抽象程度更好,结构更清晰。 为了验证Skernel的实际运行特性,本论文在FPGA平台上构建了准对称NiosⅡ双核系统,并对多核处理器启动、处理器间通讯、互斥等方面的问题进行了探索和研究。 在Skernel的实现过程中,对Bitmap算法进行了改进和优化,使得Skernel支持的任务数达到了256个,但却没有增加系统开销,也不影响系统调度的实时性;引入了老化算法,解决了优先级调度中的饥饿问题;使用优先级天花板策略解决了优先级反转问题,而这些问题是现今大多数嵌入式操作系统所没有解决的。经过裁减,Skernel的最小代码量(32位处理器)不到3.5KB,这在同类操作系统中算是非常小的。另外,Skernel的中断处理器方式简单高效,使得Skernel的中断响应时间在微秒级,这表明Skernel的实时性在同类操作系统中是非常好的。 最后,Skernel成功的移植到NiosⅡ处理器上,并在NiosⅡ上实现了非对称多处理的任务调度,实现了预期的设计构想。

【Abstract】 The Embedded Real-Time Operating System (RTOS) is the most important basic software platform for the embedded system, which has such typical characteristics as deterministic performance, high stability, portability, scalability and configurability. The thesis presents the design and implementation of an RTOS—Skernel.After analyzing some design problems and the requirements of embedded sytem application, a scheme of Skernel has been proposed, which is better than most of RTOS kernels. In the design, Skernel is based on the micro kernel architecture, adopts preemptive priority based scheduling algorithm, supports up to 256 tasks, has complete system services, supports multiprocessor system, TRON and POSIX compatible, scalable and portable.Object-Oriented method has been introduced in the process of designing Skernel. Most modules of Skernel are viewed as a common object Event, so that it simplies the complex relations among Skernel’s modules.A quasi symmetric dual NiosII core system has been built on the FPGA experiment system in order to supply a platform for Skernel running and testing. Some researches on the multiprocessor system have been done as well, including how to start up a multiprocessor system, how to do the communication among multiprocessors and mutual exclusion in the multiprocessor enrionment.In the process of developing Skernel, the bitmap algorithm has been improved and optimized to meet the requirements of application, so Skernel can support 256 tasks without loss of the performance. Aging algorithm was designed and implemented for solving the starvation problem which the most RTOSs have not solved. Priority ceiling policy is applied to solve the priority inversion problem.The minimum code size of Skernel is as few as 3.5KB, if only allowed the basic multi-tasking function, so Skernel is suitable for the memory limited application. In addition, the interrupt handling mechanism of Skemel is so simple and efficient that the interrupt handling latency is in the micro second level. In other words, Skernel has a good real-time characteristic.At last, Skernel has been ported to NiosII uniprocessor and dual-core system separately, and asymmetric task scheduling is implemented too.The goal of this thesis has been achieved.

  • 【网络出版投稿人】 浙江大学
  • 【网络出版年期】2006年 09期
  • 【分类号】TP316.2
  • 【被引频次】10
  • 【下载频次】546
节点文献中: 

本文链接的文献网络图示:

本文的引文网络