Skip to content

Lab 06

Compare
Choose a tag to compare
@JingWangTW JingWangTW released this 03 Jun 07:40
· 61 commits to LAB-06 since this release

NCTU OSDI Lab 6: Allocator

Documentation: Lab 6

Lab 6 Demo Release

Required

  • Required 1
    • Implement the buddy system for contiguous pages allocation.
  • Requried 2
    • Implement the API for register a fixed-size allocator.
    • Implement the API for allocate and free for fixed-size object.
  • Required 3
    • Implement a varied-sized allocator.

Elective

  • Elective 1
    • Implement the startup allocator.
  • Elective 2
    • Replace the static memory allocator with the dynamic memory allocator in your kernel.

Questions

  • Is buddy allocator perfectly eliminate external fragmentation? If yes, prove it? If no, give an external fragmentation example.
  • If the registered object size is 2049 byte, one page frame can only fit in one object. Hence the internal fragmentation is around 50%. How to decrease the percentage of the internal fragmentation in this case?
  • What’s the benefit to prevent static allocation?