文章目錄

Lab 6 QA

Q1

Is buddy allocator perfectly eliminate external fragmentation? If yes, prove it? If no, give an external fragmentation example.

會有機會沒有辦法 merge

| o | o | o | o |
| o |   | o |   |

Q2

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?

用更高 order 的 buddy 來連續分配多個 object

((8 * 4096) % 2049) / (8 * 4096)

Q3

What’s the benefit to prevent static allocation?

縮小 kernel size、可以動態決定記憶體位址

comments powered by Disqus