Font Size: a A A

Improvement And Implementation Of Memory Management Based On μC/OS-Ⅱ

Posted on:2011-07-24Degree:MasterType:Thesis
Country:ChinaCandidate:N LiFull Text:PDF
GTID:2178360302981922Subject:Computer application technology
Abstract/Summary:PDF Full Text Request
μC/OS-Ⅱis a Embedded Real-Time Operating System which contains the properties of open source,powerful transplantable capability,curing,being deprived,multi-tasks,and high stability.At present,μC/OS-Ⅱhas been widely applied in many fields.As an excellent embedded real-time operating system,the dynamic memory management ofμC/OS-Ⅱonly supports fixed-size partitions,but there is dynamic allocation of non-fixed partition needs in the practical applications.It requires thatμC/OS-Ⅱis to realize the function of dynamic memory management program.In this paper,we found that the Buddy algorithm which has many advantages,such as, memory applied for in the constant time,data structures designed ingenious,predictability well based on the research and analysis of the current classical dynamic memory management algorithms.However,if there are the free partners which the size of 2n will be merged into the size of the list of 2n+1.The size of 2n block in the list will be reduced due to the combined operation,but the system may be immediately need the size of 2n block.So we must spit from the list of 2n+1.Thus,we must transform it according to the requirement which contains the properties of efficient,reliable and fast requirement to embedded system memory.Firstly,to modify the data structures of Buddy algorithm,2k pages of free list will be divided into BuddyBusy free list and BuddyFree free list.Secondly,this subject will redesign the function of allocation and recovery not to make the memory merge immediately after the release of the merger according to the modified data structures. Not only enough memory blocks to satisfy memory request,but also to reduce the time.At the time of the memory allocation,when the request of length of free block is 2k,firstly BuddyBusy free list should be allocated.When BuddyBusy free list is empty,the allocation of BuddyFree free list is considered.In memory recovery,it links free block into appropriate free list according to the state of Buddy blocks.Without immediately merging,until the memory request can not be met immediately,to try to merge.Finally, transplants the improved Buddy algorithm into the kernel ofμC/OS-Ⅱof embedded real time operating system. Experimental data shows that the improvedμC/OS-Ⅱembedded real-time operating system,memory management module has a higher memory utilization,and effectively reduces memory fragmentation.
Keywords/Search Tags:Embedded Systems, Memory Management, Buddy Algorithm, μC/OS-II
PDF Full Text Request
Related items