In-class exercise solution for MIT 6.828 course(Operating System Engineering)