The contents of these functions was derived from code used in the
Massachusetts Institute of Technology's 6.828 advanced operating
systems course.
I deleted the contents of these functions and then rewrote them from
scratch without reference to the earlier code, working only from the
function comments (which I wrote earlier).