Assignment 9, due Apr 11
Part of
the homework for 22C:112, Spring 2008
|
Always, on every assignment, please write your name legibly as it appears on your University ID and on the class list! All assignments will be due at the start of class on the day indicated (usually a Friday). The only exceptions to this rule will be by advance arrangement unless there is what insurance companies call "an act of God" - something outside your control. Homework must be turned in on paper and in class! Late work may be turned in to the teaching assistant's mailbox, but see the late work policy. Never push late work under someone's door!
a) Discuss the performance benefits of rewriting this code so that it is lazy. (0.5 points)
b) Discuss the performance penalties of rewriting this code so that it is lazy. (0.5 points)
a) Identify the two distinct causes of internal fragmentation in the binary buddy system. (0.5 points)
b) Of the above, one of them is eliminated in boundary-tag heap mangers, while the other may become worse. Explain. (0.5 points)
A question: Which of these differences suggests the need for using a different heap manager for application heaps and heaps used within the operating system. Explain. (0.5 points)
A question: Write a C #define for memory() that makes this actually work as a legal notation within a C program. Your solution will involve casting integer to pointer, and it should work on both the left-hand side of an assignment and on the right-hand side of an assignment. (0.5 points)