本文已被:浏览 1729次 下载 2325次
Received:April 16, 2017 Revised:May 02, 2017
Received:April 16, 2017 Revised:May 02, 2017
中文摘要: 本文针对Linux内核实现的伙伴系统进行了抽象分析,并通过实例演示了算法的执行过程. 分析了用于物理地址空间管理的三级数据结构及其关系. 在此基础上,详细描述了用于分配和回收页框的伙伴算法. 对于待回收的内存块而言,计算其伙伴的索引及合并内存块的索引是回收操作的关键,讨论了相关计算方法的几条结论并予以证明.
Abstract:The buddy system implemented in the Linux kernel is studied, and the process of buddy algorithm is demonstrated with examples. There are three levels of data structure dedicated to manage page frames in physical address space. Firstly, these data structures and their relationships are presented. Then, the buddy algorithm used to allocate and deallocate page frames is described in detail. As far as a memory block to be deallocated is concerned, how to calculate the index of its buddy and coalesced memory block is the key point of deallocating operation. Several conclusions pertaining to this calculation are dealt with and proved.
文章编号: 中图分类号: 文献标志码:
基金项目:
Author Name | Affiliation |
XUE Feng | School of Mathematics & Computer Science, Anhui Normal University, Wuhu 241002, China |
Author Name | Affiliation |
XUE Feng | School of Mathematics & Computer Science, Anhui Normal University, Wuhu 241002, China |
引用文本:
薛峰.Linux内核伙伴系统分析.计算机系统应用,2018,27(1):174-179
XUE Feng.Buddy System Analysis in Linux Kernel.COMPUTER SYSTEMS APPLICATIONS,2018,27(1):174-179
薛峰.Linux内核伙伴系统分析.计算机系统应用,2018,27(1):174-179
XUE Feng.Buddy System Analysis in Linux Kernel.COMPUTER SYSTEMS APPLICATIONS,2018,27(1):174-179