Build an Operating System from Scratch: A Project for an Introductory Operating Systems Course
American University 4400 Massachusetts Ave, NW Washington, DC 20016 (202) 885-2011
This paper describes a semester project where students design an operating system from the ground-up, capable of booting from a floppy disk on an actual machine. Unlike previous projects of this kind, this project was designed for students with only one semester of programming experience and no prior exposure to data structures, assembly language, or computer organization. Students nevertheless wrote a full system consisting of system calls, program execution, a file system, a command-line shell, and support for multiprocessing. The project was assigned to a class and successfully completed by nearly every student. students write a system to run directly on a computer without simulators or software underneath. Well-known examples of such systems include Minix and GeekOS, and are usually intended for upper-level or graduate courses. These systems, typically approximating Unix, tend to be intricate and complex, and include substantial amounts of prewritten code (14886 lines for Minix and 4202 lines for GeekOS) [5,8]. The complexity of the systems make them difficult to assign to students at smaller liberal arts colleges which offer only one operating systems course. My objective, described in this paper, is to construct a simple "baremetal" teaching operating system suitable for a small computer science program. The operating system described in this paper is under 1/4 the size of GeekOS, making it one of the smallest and simplest teaching operating systems yet developed. There are several key advantages to such a project over a higherlevel project that isolates students from the machine. First, students gain a deeper understanding of the computer itself, experiencing first-hand how such concepts as segmentation, interrupt-vectors, and memory...