一种嵌入式操纵体系内核的设计与实现_第1页
一种嵌入式操纵体系内核的设计与实现_第2页
一种嵌入式操纵体系内核的设计与实现_第3页
全文预览已结束

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、一种嵌入式操纵体系内核的设计与实现        【中文摘要】嵌入式操纵体系的应用跟着盘算机技术和电子技术的提高已经变得越来越普遍,其作为嵌入式体系的软件平台带给开发人员和用户不同的便利。本文的核心内容是设计并实现一个嵌入式操纵体系内核。本文介绍了嵌入式操纵体系的国际发铺情形和海内的研讨现状,在研讨操纵体系相关理论和对内核实例剖析的基本上,设计并实现了QMGmini微型嵌入式操纵体系内核。它体积小巧,功能完备,可以裁剪和配置。内核包括的功能模块有义务调度模块、义务管理模块、义务通信模块、内存管理模块和时钟管理模块。

2、在QMGmini的实现入程中,对基于优先级的位图调度算法做出了改入,增添了3倍的优先级支持;改入了最早截止期优先算法来实现对义务动态优先级的支持,vaEDF提高了最早截止期算法的工作效力;提供了3种义务间通信的机制;实现了无内存碎片的内存管理策略。最后在本文的开发平台DeviceARM2200上对内核入行了仿真黑盒测试。');【Abstract】 Embedded operating system as a software platform for embedded systems, need tohave strong real-time performance and stabi

3、lity, and can be tailored to specificapplication environments to carry out cutting and configuration. This thesiss target isto implement a embedded operating system kernel on the platform ofDeviceARM2200 which name is QMGmini. DeviceARM2200 is an ARM7-TDMIcore embedded computer boards, the main comp

4、onents on it are LPC2290 processorand some memory resources.QMGmini embedded operating system kernel is small and can be cut and curing,may be deprived of their type belong to the kernel. Function modules contained in thekernel are: task scheduling modules, the task management module, taskcommunicat

5、ion module, memory management module and the time managementmodule. QMGmini core structure as * as possimble only contains the above basicfunction modules.The device driver modules, and other non-essential sequence placedat the external of the kernel, kernel only provide the driver framework to enab

6、leapplication-level penetration inte*ce directly over the use of equipment, to avoid toomuch interaction with the kernel. System aparts about the interruption of equipment,processors, hardware registers and clock-related part of the compilation procedures arecompleted with ASM, this part of the code

7、 are not to be able to transplant. QMGminisinterrupt service routine only provides the basic framework, the specific interruptservice reuse in accordance with required C language _swi to achieve soft interrupt.The rest of the code were wirten by the C language, except with the processor on thepart o

8、f all ,be able to achieve a standard of transplant.In most embedded operating systems, task is the smallest unit of processorscheduling, a QMGmini task is a thread. There are 4 status of the task, respectively, aredormant, ready status, running status and block status. That is, the presence of dorma

9、nttask status in memory, when the task will not be selected to scheduling; when therunning conditions of the task needed are ready the task will enter the ready status, waiting to be selected scheduling; by scheduling selected task will enter running state;because of some reasons, forced or voluntar

10、y waiver of the right to use the processorwill enter blocking state, the causes of obstruction can be expressed through the flagbit. After the task was created by system it will direct turn into ready state, until thescheduler has been selected it and put it into running state, by calling the delaye

11、function the task can blocked itself, or wait for some resouse and events,after thecompletion of task system will destroy it.Task scheduler is apart of real-time kernel module as an important component ofthe merits its performance directly affects the real-time system response time.QMGmini was desig

12、ned as a kernel can be deprived ,a kernel which can be deprivedcould ensure the emergency response speed.When there is a new tsak appear in theready task table with a priority higher than the class of the task is currently running onthe mission when switching, high-priority task will deprive the run

13、ing tasks right touse the processor. QMGmini adopted priority-based scheduling algorithm whitch canbe deprived, carry the highest priority ready task out from the ready task table by usingan improved Bitmap algorithm, improved Bitmap Algorithm Supporting an increase ofthe maximum quantity task. Impr

14、oved support for an increase of Bitmap Algorithm tothe largest number of mission 4 times the original the priority of task can only expressa task. QMGmini provide two kinds of priority class management, one of them is inthe creation of a task when the explicit designation of a priority, this priorit

15、y class arestatic, in tasks life will not be changed; the other one is in the creation of task give thecharacteristic parameters of the task, the system will give the basis of characteristicparameters of the dynamic distribution for the task priority on improved EDF. In thecourse of the study made o

16、n the EDF algorithm improvements, taking into account thevalue of the assessment mission. The vaEDF the characteristic parameters of the use oftask to the distribution of priority,The characteristic parameters including the final taskdeadline and achieve value of the task, deadline express the urgen

17、cy of a task, andvalues is the importance of that task. Using vaEDF could reduce 30% content switch.Tasks carried out between each other the normally required to exchange orsynchronize information, QMGmini has 3 kinds of functions on communicationbetween the tasks, they are interruption switch, sema

18、phores and message queues.Interrupt switch is used to shared one or more global variables to achievecommunication between the tasks, when task in visit the global variable interrupted by anthoer task, then the task visit the variable may change the global variable unexpectedcause a dirty data, when

19、the task enter the critical region should be locked theinterruption, and open it when it quit the critical region. Clearance technology willcause the kernel interrupt response time to be too long, so the use of semaphores andmessage queues are a better choice. A semaphore is a counting value when it

20、 is used toexpress a resource the initial value is the large quantity of resources, when it used as amutex the initial value is 1, when it use to express a task is waiting for a flag the initialvalue is 0. Task wants to access resources or waits for the event to obtain should usea semaphore, if the

21、signal is less than 0 put the task on the status of block. Messagequeue is use for inter-task to send chunks of data, and message queue is a cyclestructure, stored in the queue is a pointer whitch point to a C structure. Whether thesignal is from a semphore or the message from the message queue have

22、 been abstractinto a event, so there needt to consider higher level communication details of tasks.Once the system equipment has power on,in-chip memory resources of the former64-byte is mapped to the beginning of the 0x00000000 address, this piece of memoryused to store interrupt vectors. QMGmini m

23、emory management is an optional module,no need for memory management can put its case removed from the core to reduce thesize of the kernel. Zoning QMGmini memory management implemented in a mannersimilar to the memory distribution memory barrels. Memory for each partition thatcontains the same number of block size

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论