A State Machine Language for the Undergraduate Operating Systems Course

Assigning projects in an undergraduate operating systems course that includes a mix of software development students and information technology students, many without a background in assembly language and machine architecture, can be challenging. Assigning low level simulation code or operating system modules can lead to frustration and failure for some students. Also, that approach takes too long to explore more than a few basic algorithms. Assigning paper projects may be uninteresting and can lead to rote memorization. This paper explores the approach of requiring students to write state machines, using a notation based on State Diagrams of the Unified Modeling Language, that implement the core logic of various CPU schedulers, page replacement algorithms, disk scheduling algorithms, and other operating system mechanisms. This approach concentrates student efforts more on analysis and less on low level coding. The paper explores the Python-based compiler technology and runtime system used to implement the state machine simulation framework, along with several example assignments, auxiliary tools for visualization, deficiencies in the current framework, and their remedies.