东北大学学报(自然科学版) ›› 2011, Vol. 32 ›› Issue (5): 654-657.DOI: -

• 论著 • 上一篇    下一篇

AVR单片机实时系统内存分配算法的研究

王家亮;赵海;潘荣;蔡鹏华;   

  1. 东北大学信息科学与工程学院;
  • 收稿日期:2013-06-19 修回日期:2013-06-19 发布日期:2013-04-04
  • 通讯作者: -
  • 作者简介:-
  • 基金资助:
    国家自然科学基金资助项目(60973022);;

Studies on the memory allocation algorithm of an AVR single chip real-time system

Wang, Jia-Liang (1); Zhao, Hai (1); Pan, Rong (1); Cai, Peng-Hua (1)   

  1. (1) School of Information Science and Engineering, Northeastern University, Shenyang 110819, China
  • Received:2013-06-19 Revised:2013-06-19 Published:2013-04-04
  • Contact: Wang, J.-L.
  • About author:-
  • Supported by:
    -

摘要: 由于AVR单片机存储资源十分有限,因此对内存的分配及使用会直接影响到整个系统的性能.对设计并实现的嵌入式操作系统iDCX 128的内存分配进行了测试,结果表明由于系统采用首次适应算法,在进行多次内存分配后,内存空间利用率不高.因此对其内存分配算法进行改进,通过修改内存区存储任务的堆栈结构及分配机制,使其成为最佳适应算法.实验结果表明改进后算法虽然浪费少量存储单元,并相应地增加了算法执行时间,但内存的整体利用率却得到了较大的提高.

关键词: 实时系统, 内存分配, 执行时间, 内存空间利用率, 系统测试

Abstract: Given the limited capacity of AVR single chip memory, memory allocation and utilization can directly affect entire system performance. Memory allocation testing of a self-designed embedded operating system iDCX 128 indicated that system memory-space utilization efficiency was low after numerous memory allocation events due to use of a first fit algorithm. The memory allocation algorithm was improved by altering the structure of tasks stored in the memory and the allocation mechanism was made into a best fit algorithm. Experimental results demonstrated that the improved algorithm caused a small number of wasted storage units with a corresponding increase in execution time. Nevertheless, overall memory utilization was greatly improved.

中图分类号: