Font Size: a A A

Study On Optimizing The Embeded Real-Time Operating System Dynamic Memory Management

Posted on:2012-05-07Degree:MasterType:Thesis
Country:ChinaCandidate:Y W ChiFull Text:PDF
GTID:2218330362958879Subject:Software engineering
Abstract/Summary:PDF Full Text Request
As we know, dynamic memory management module in embedded real-time operating system is very important. Because the resource-limited embedded system has many restrictions on memory usage, meanwhile it has high demand on space and time efficiency of the dynamic memory management algorithm, so it is very difficult to optimize it.This paper studies on specific dynamic memory management problems in work. The experiment target is one low-end feature phone based on ARM926EJS core with 16M RAM in it. In this mobile set many applications run, and especially some of them have to use much dynamic memory. After the system running for a long period of time, some problems tend to occur, including the action of memory allocating taking too much time, even allocating fail.In this paper I test the dynamic memory management performance, find the bottle neck, and optimize it.The solution of this paper to solve the optimization problems of dynamic memory management algorithms in embedded real-time operating system is:(1) Research and choose the appropriate dynamic memory management module testing system. The common test system includes simulation test system and real test system. After study, I choose real test system.(2) Research and determine how to measure dynamic memory management time efficiency and space efficiency. The common method to measure the time efficiency is to calculate the statistics of applications allocation and free memory action time, which the shorter is better. The common parameter to measure the space efficiency is memory fragment rate, which the lower is better.(3) Research and determine advantages and disadvantages of common dynamic memory management algorithm and its possible combinations. The common dynamic memory management algorithm includes first fit, best fit, simple segregated, segregated fit, buddy system and deferred coalescing.(4) Study the actual memory usage rule of applications. The common rule includes memory using pattern, memory size distributing rule and memory time distributing rule.(5) Write codes for dynamic memory management algorithms, and use the real trace as input of the testing programs to test, combine, study, and gradually optimize each algorithm. The algorithms that have been implemented on PC include first fit LIFO algorithm, first fit addressed order algorithm, best fit addressed order algorithm, segregated fit addressed order algorithm, buddy system, simple segregated algorithm and deferred coalescing algorithm.The specific work of this paper includes:(1) Run some typical applications that use a large number of memory in mobile set. And capture the real trace of memory allocation and free process data.(2) Playback and simulate on PC, determine its memory usage rules. And the memory usage rules mainly include Peaks mode and Plateaus mode. The memory size distributing rule is that the memory which the applications allocated is mainly in small size. The memory time distributing rule is that most memory left time is less than 1 millisecond.(3) Write code on PC for 14 kinds of common algorithms of embedded system. Test, analyze and gradually optimize these algorithms with the trace from mobile set.By the research, this paper finally determines the most optimal algorithms combination is: segregated fit + simple segregated + deferred coalescing, which is 50% better in time efficiency than best fit while the same in space efficiency.
Keywords/Search Tags:dynamic memory management of embedded system, memory fragmentation rate, memory usage pattern, segregated fit, deferred coalescing
PDF Full Text Request
Related items