Font Size: a A A

Design And Realization Of Linux Memory Management

Posted on:2008-11-29Degree:MasterType:Thesis
Country:ChinaCandidate:F GaoFull Text:PDF
GTID:2178360248452108Subject:Computer software and theory
Abstract/Summary:PDF Full Text Request
Linux operating system uses memory management based on page, It uses buddy algorithm. In the buddy algorithm, it defines the buddy memory blocks. There are three qualifications. They must be the same size,consecutive address and divided from one bigger block. Such a request made on the management of the entire memory is very concise. But in some cases the system have enough consecutive memory , because they doesn't fit the buddy algorithm's definition they cann't be alloted to the processes. This will reduce the system memory utilization ratio.The paper extend the data structure free_area_t, add a linked list and a bitmap point into free_area_t and modifies the functions page_alloc, try_to_free_page_ok to find the memory blocks that have the same size and consecutive address doesn't be divided from the same block. When the original buddy algorithm can't allot the memory blocks, system will use the new linked list to find a appropriate block to fit the process need. When the memory is released, it redesign the searching function. This function will search the original buddy blocks, at the same time it also search the relaxed buddy blocks that only fit two qualifications of three, when system mergers the memory blocks It will search the bitmap to find out if the original buddy blocks in the free_list. If so, system will merger the original blocks first, if there is not original buddy blocks, system will search the new bitmap and merger the relax buddy blocks.the improved algorithm maintains two free memory list at the same time to realized the improvement.The result shows: the paper redesign the buddy algorithm , the improved algorithm can manage original buddy blocks and relax buddy blocks at the same time. This show the improvement is successful, the improved algorithm can enhance the system memory utilization ratio, leave the memory exchange and make the Linux to be used in more far_ranging applications.
Keywords/Search Tags:Memory Management, Buddy Algorithm, Memory Allocation, Memory Release
PDF Full Text Request
Related items