design and implementation of an OS simulator