Discussion:
buddy sys vs slab allocator
(too old to reply)
Stephen Tu
2008-08-14 03:46:49 UTC
Permalink
quick question:

what is an advantage of the buddy sys over slab, and vice versa? i know
that both suffer from the same pitfalls of internal fragmentation, and
both are relatively fast for small blocks. but what would set one apart
from the other?

note: this is inspired by the sp07 final :)
Jeremy Cowles
2008-08-14 03:54:50 UTC
Permalink
Buddy is variable sized blocks, which means less internal frag
Slab is bit-mapped, which is faster
Post by Stephen Tu
what is an advantage of the buddy sys over slab, and vice versa? i know
that both suffer from the same pitfalls of internal fragmentation, and
both are relatively fast for small blocks. but what would set one apart
from the other?
note: this is inspired by the sp07 final :)
[TA] Omar Akkawi
2008-08-14 03:55:13 UTC
Permalink
One advantage of buddy system over slab is that it can dynamically
change the size of the blocks it has available, thus reducing the
chances of internal fragmentation for a long sequence of small allocations.

One advantage of slab over buddy system is that there is less overhead.

This is not a comprehensive list, and should not be accepted as entirely
true. You should do what should always be done after getting answers
from somebody else, and check these answers against other sources. :)

- Omar Akkawi, CS 61C TA, Summer 2008
Post by Stephen Tu
what is an advantage of the buddy sys over slab, and vice versa? i know
that both suffer from the same pitfalls of internal fragmentation, and
both are relatively fast for small blocks. but what would set one apart
from the other?
note: this is inspired by the sp07 final :)
Loading...