## Fast Allocation and Deallocation with an Improved Buddy System (2003)

### Cached

### Download Links

Citations: | 4 - 0 self |

### BibTeX

@MISC{Brodal03fastallocation,

author = {Gerth Stølting Brodal and Erik D. Demaine and J. Ian Munro},

title = {Fast Allocation and Deallocation with an Improved Buddy System },

year = {2003}

}

### OpenURL

### Abstract

We propose several modifications to the binary buddy system for managing dynamic allocation of memory blocks whose sizes are powers of two. The standard buddy system allocates and deallocates blocks in Θ(lg n) time in the worst case (and on an amortized basis), where n is the size of the memory. We present three schemes that improve the running time to O(1) time, where the time bound for deallocation is amortized for the first two schemes. The first scheme uses just one more word of memory than the standard buddy system, but may result in greater fragmentation than necessary. The second and third schemes have essentially the same fragmentation as the standard buddy system, and use O(2 (1+ √ lg n) lg lg n) bits of auxiliary storage, which is ω(lg k n) but o(n ε) for all k ≥ 1 and ε> 0. Finally, we present simulation results estimating the effect of the excess fragmentation in the first scheme.

### Citations

244 |
The design and implementation of the 4.4BSD operating system
- McKusick, Bostic, et al.
- 1996
(Show Context)
Citation Context ...y disadvantage being that blocks must be powers of two in size, the buddy system is used in many modern operating systems, in particular most versions of UNIX, for small block sizes. For example, BSD =-=[19]-=- uses the buddy system for blocks smaller than a page, i.e., 4 kilobytes. The classic description of the buddy system is Knuth's [14]. Because our work is based on the standard buddy system, we review... |

67 |
A fast storage allocator
- Knowlton
- 1965
(Show Context)
Citation Context ...ghout this paper we assume standard operations on a word of size 1 + lg n or so bits can be performed in constant time. 1.1 Buddy System The (binary) buddy system was originally described by Knowlton =-=[12, 13]-=-. It is much faster than other heuristics for dynamic memory allocation, such as first-fit and best-fit. Its only disadvantage being that blocks must be powers of two in size, the buddy system is used... |

38 | Buddy systems
- Peterson, Norman
- 1977
(Show Context)
Citation Context ...Peterson [24] proposed the weighted buddy system which allows blocks of sizes 2 k and 3 2 k for all k. All of the above schemes are special cases of the generalization proposed by Peterson and Norman =-=[21]-=- and a further generalization proposed by Russell [23]. Page and Hagins [20] proposed an improvement to the weighted buddy system, called the dual buddy system, which reduces the amount of fragmentati... |

15 | Computation of the least significant set bit
- Brodnik
- 1993
(Show Context)
Citation Context ...included as an instruction in many modern machines. Newer Pentium chips do it as quickly as an integer addition. It can also be computed in constant time using boolean and basic arithmetic operations =-=[2]-=-. Another very simple method is to store a lookup table of the solutions for all bitstrings of length #(# log n) for some constant # > 0, using #(n # ) words of space; cut the bitvector into #1/## chu... |

15 |
Disk file allocation based on the buddy system
- Koch
- 1987
(Show Context)
Citation Context ... dual buddy system, which reduces the amount of fragmentation to nearly that of the binary buddy system. Another slight modification to the weighted buddy system was described by Bromley [3, 4]. Koch =-=[15]-=- proposed another variant of the buddy system that is designed for disk-file layout with high storage utilization. 3 The fragmentation of these various buddy systems has been studied both experimental... |

13 |
A class of dynamic memory allocation algorithms
- Hirschberg
- 1973
(Show Context)
Citation Context ...In Exercise 2.5.31 of his book, Knuth [14] proposed the use of Fibonacci numbers as block sizes instead of powers of two, resulting in the Fibonacci buddy system. This idea was detailed by Hirschberg =-=[10]-=-, and was optimized by Hinds [9] and Cranston and Thomas [7] to locate buddies in time similar to the binary buddy system. Both the binary and Fibonacci buddy systems are special cases of a generaliza... |

12 | Tailored-list and recombination-delaying buddy systems - Kaufman - 1984 |

11 |
Improving the performance of buddy systems
- Page, Hagins
- 1986
(Show Context)
Citation Context ...s 2 k and 3 2 k for all k. All of the above schemes are special cases of the generalization proposed by Peterson and Norman [21] and a further generalization proposed by Russell [23]. Page and Hagins =-=[20]-=- proposed an improvement to the weighted buddy system, called the dual buddy system, which reduces the amount of fragmentation to nearly that of the binary buddy system. Another slight modification to... |

11 |
Statistical properties of the buddy system
- Stigler
- 1970
(Show Context)
Citation Context ... system that is designed for disk-file layout with high storage utilization. 3 The fragmentation of these various buddy systems has been studied both experimentally and analytically by several papers =-=[4, 6, 18, 21, 22, 23]-=-. 1.3 Results In this paper we present three schemes that improve the running time of allocations and deallocations in the standard buddy system to O(1) time, where the time bound for deallocation is ... |

10 |
A weighted buddy method for dynamic storage allocation
- Shen, Peterson
- 1974
(Show Context)
Citation Context ...nd Thomas [7] to locate buddies in time similar to the binary buddy system. Both the binary and Fibonacci buddy systems are special cases of a generalization proposed by Burton [5]. Shen and Peterson =-=[24]-=- proposed the weighted buddy system which allows blocks of sizes 2 k and 3 2 k for all k. All of the above schemes are special cases of the generalization proposed by Peterson and Norman [21] and a fu... |

9 |
Internal fragmentation in a class of buddy systems
- Russell
- 1977
(Show Context)
Citation Context ... allows blocks of sizes 2 k and 3 2 k for all k. All of the above schemes are special cases of the generalization proposed by Peterson and Norman [21] and a further generalization proposed by Russell =-=[23]-=-. Page and Hagins [20] proposed an improvement to the weighted buddy system, called the dual buddy system, which reduces the amount of fragmentation to nearly that of the binary buddy system. Another ... |

8 |
Memory fragmentation in buddy methods for dynamic storage allocation
- Bromley
- 1980
(Show Context)
Citation Context ...m, called the dual buddy system, which reduces the amount of fragmentation to nearly that of the binary buddy system. Another slight modification to the weighted buddy system was described by Bromley =-=[3, 4]-=-. Koch [15] proposed another variant of the buddy system that is designed for disk-file layout with high storage utilization. 3 The fragmentation of these various buddy systems has been studied both e... |

7 | A lazy buddy system bounded by two coalescing delays per class. Operating Systems Review - Barkley, Lee - 1989 |

7 |
A simplified recombination scheme for the Fibonacci buddy system
- Cranston, Thomas
- 1975
(Show Context)
Citation Context ...f Fibonacci numbers as block sizes instead of powers of two, resulting in the Fibonacci buddy system. This idea was detailed by Hirschberg [10], and was optimized by Hinds [9] and Cranston and Thomas =-=[7]-=- to locate buddies in time similar to the binary buddy system. Both the binary and Fibonacci buddy systems are special cases of a generalization proposed by Burton [5]. Shen and Peterson [24] proposed... |

7 |
A programmer’s description of L6
- Knowlton
- 1966
(Show Context)
Citation Context ...ghout this paper we assume standard operations on a word of size 1 + lg n or so bits can be performed in constant time. 1.1 Buddy System The (binary) buddy system was originally described by Knowlton =-=[12, 13]-=-. It is much faster than other heuristics for dynamic memory allocation, such as first-fit and best-fit. Its only disadvantage being that blocks must be powers of two in size, the buddy system is used... |

6 | Fast Allocation and Deallocation with an Improved Buddy System
- Demaine, Munro
(Show Context)
Citation Context ...is paper includes several results that appeared in preliminary form in the proceedings of the 19th Conference on the Foundations of Software Technology and Theoretical Computer Science (FST & TCS'99) =-=[8]-=-. + Supported by the Carlsberg Foundation (contract number ANS-0257/20). Partially supported by the Future and Emerging Technologies Programme of the EU under contract number IST-1999-14186 (ALCOMFT) ... |

6 |
Algorithm for locating adjacent storage blocks in the buddy system
- Hinds
- 1975
(Show Context)
Citation Context ...nuth [14] proposed the use of Fibonacci numbers as block sizes instead of powers of two, resulting in the Fibonacci buddy system. This idea was detailed by Hirschberg [10], and was optimized by Hinds =-=[9]-=- and Cranston and Thomas [7] to locate buddies in time similar to the binary buddy system. Both the binary and Fibonacci buddy systems are special cases of a generalization proposed by Burton [5]. She... |

6 | A watermark-based lazy buddy system for kernel memory allocation - Lee, Barkley - 1989 |

6 |
On the worst case performance of buddy systems
- Lloyd, Loui
- 1985
(Show Context)
Citation Context ... system that is designed for disk-file layout with high storage utilization. 3 The fragmentation of these various buddy systems has been studied both experimentally and analytically by several papers =-=[4, 6, 18, 21, 22, 23]-=-. 1.3 Results In this paper we present three schemes that improve the running time of allocations and deallocations in the standard buddy system to O(1) time, where the time bound for deallocation is ... |

5 |
A buddy system variation for disk storage allocation
- Burton
- 1976
(Show Context)
Citation Context ...inds [9] and Cranston and Thomas [7] to locate buddies in time similar to the binary buddy system. Both the binary and Fibonacci buddy systems are special cases of a generalization proposed by Burton =-=[5]-=-. Shen and Peterson [24] proposed the weighted buddy system which allows blocks of sizes 2 k and 3 2 k for all k. All of the above schemes are special cases of the generalization proposed by Peterson ... |

5 | Design and evaluation of a watermark-based lazy buddy system - Lee, Barkley - 1989 |

4 |
An improved buddy method for dynamic storage allocation
- Bromley
- 1976
(Show Context)
Citation Context ...m, called the dual buddy system, which reduces the amount of fragmentation to nearly that of the binary buddy system. Another slight modification to the weighted buddy system was described by Bromley =-=[3, 4]-=-. Koch [15] proposed another variant of the buddy system that is designed for disk-file layout with high storage utilization. 3 The fragmentation of these various buddy systems has been studied both e... |

4 |
Worst case performance of weighted buddy systems
- Chowdhury, Srimani
- 1987
(Show Context)
Citation Context ... system that is designed for disk-file layout with high storage utilization. 3 The fragmentation of these various buddy systems has been studied both experimentally and analytically by several papers =-=[4, 6, 18, 21, 22, 23]-=-. 1.3 Results In this paper we present three schemes that improve the running time of allocations and deallocations in the standard buddy system to O(1) time, where the time bound for deallocation is ... |

4 |
Dynamic storage allocation
- Knuth
- 1968
(Show Context)
Citation Context ... (NSERC).sThis work was supported by the Natural Science and Engineering Research Council of Canada (NSERC) and the Canada Research Chair in Algorithm Design. 1 1 Introduction The binary buddy system =-=[14]-=- is a well-known system for maintaining a dynamic collection of memory blocks. Its main feature is the use of suitably aligned blocks whose sizes are powers of two. This makes it easy to check whether... |