节点文献
ATmega128微控制器嵌入式内核的分析与改进
Analysis and Improvement an Embedded Kernel on the MCU of ATmega128
【作者】 闫丽;
【导师】 牛连强;
【作者基本信息】 沈阳工业大学 , 计算机软件与理论, 2005, 硕士
【摘要】 嵌入式网络技术的关键是通过嵌入式网络服务器为传统的非标设备上网提供一个协议转换工具并为用户管理这些设备提供软硬件支持。随着嵌入式技术的发展,出现了基于微处理器的体积小、成本低的嵌入式网关产品。但这些产品大都基于传统的单任务模式来开发的,不仅难以保证系统的实时性和可靠性,而且对于复杂应用来说开发效率较低。本文结合嵌入式网络应用对嵌入式系统的要求,在较典型的基于ATmegal28的硬件设备平台和Ethernut操作系统软件平台上,对如何解决上述问题进行了研究和探讨。本文首先详细阐述了Ethernut多任务内核的体系结构,通过对内核Nut/OS中任务管理、任务调度机制、中断管理、任务间同步与通信机制、时间定时器管理和内存管理的分析,总结了内核的特点,并提出了相应的策略以适应实时性系统的需要。为了解决内核Nut/OS实时性较弱的问题,分析了影响其实时性的因素,引入了抢占式任务调度策略,以及在中断处理函数内进行调度的机制。针对非抢占式内核中大量使用的不可重入函数问题,采用设置全局标志的方式进行不可重入函数检索,并通过关中断方法实现函数可重入。随之,利用软件方式解决了单片机ATmegal 28的硬件不支持中断嵌套问题。其次,分析了内核Nut/OS因缺乏内存保护策略而导致系统的可靠性降低问题,根据嵌入式系统中内存管理的特殊性,比照PC机通用内存保护策略,设计了基于ATmegal 28的内存保护策略以及可供扩展的保护策略。最后,将本文所提出的策略在前述硬件平台上进行了实验,对改进前后两种内核的任务切换时间和最大中断禁止时间进行了比较,并分析了改进后的内核性能。
【Abstract】 The key of the embedded network technology is an embedded network server that offers an agreement transformation tools for traditional nonstandard equipments and offers the software and hardware to support for users who manage these. With the development of embedded technology, embedded network imprison products appear, which are based on small and low cost microprocessor. But these products were mostly come to develop by the traditional mode of single task, it is not only difficult with the real-time character and dependability of the security system, but also very low to develop efficiency for the complicated applications. According to the requisition for embedded system of network applications, on the more typical equipment platform of hardware based on ATmega128 and software platform of Ethernut operating system, above-mentioned problems are to be researched and discussed in this thesis.At first, the system structure of Ethernut kernel is explained in detail in this thesis, the characteristic of the kernel is summarized by analyzing the task management, task scheduling mechanism, interrupt management, simultaneity and communication mechanism, timer management and memory management in kernel Nut/OS, therefore in order to meet the need of the real-time character system the corresponding tactics are put forward.In this thesis, in order to solve the problem that the kernel Nut/OS real-time character is weaker, the factors influencing real-time character are analyzed, and preemptive scheduling tactics is introduced, at the same time scheduling in ISR is realized. Through the mechanism of search unrepeatable function by the way of setting up overall sign, and through the Exit Critical method realizes repeating solve the problem of using unrepeatable function in non_preemptive kernel. Thereupon, utilizing the software way to solve the problem of one-chip computer ATmega128 does not support interrupt nesting.Secondly, the thesis analyses kernel Nut/OS cause systematic dependability reduce issue because of lacking the memory and protecting the tactics, according to the particularity ofmemory management in the embedded system, compare to the tactics of memory protection in PC, designed the tactics of memory protection based on ATmega128 and expanding tactics.Finally, experiments are made on the above-mentioned hardware platform according to the tactics put forward in this thesis. Context Switching time and interrupt forbid time are compared to each other before and after improvement, and the kernel performance after improving is analyzed.
【Key words】 Multithreading Kernel Nut/OS; Preemptive; Real-Time Character; Dependability;
- 【网络出版投稿人】 沈阳工业大学 【网络出版年期】2005年 05期
- 【分类号】TP393.09
- 【被引频次】3
- 【下载频次】200