Also, assume that current-ar gives the pointer to the current activation record, that prev-ar(a) gives a pointer to the previous activation record on the stack under the activation record a, and that global-ar refers to the activation record at the base of the stack to hold all global variables.
Assume that memory is word addressable, assume that block(p), for any pointer into the heap, returns the heap block containing the referent of p. If p is a pointer to an address outside the heap, block(p) returns nil.
Assume that the heap manager includes a word in each heap block that is available for use by a grabage collector. If b points to a heap block, b->gc is this word.
Part A: Write detailed pseudocode for a mark-sweep garbage collector that will work in this environment
Part B: Suggest an implementation of the block(p) function. This is not trivial!
The Problem: How does such a kernel differ from the kind of microkernel discussed by Tannenbaum in Chapter 9?