Topsy - a teachable operating system

This report describes the design and implementation of the Topsy operating system, a simple and tiny micro kernel for teaching purposes. Hyperlinked source code and examples are available from the following webpage: Topsy is a small operating system which has been designed for teaching purposes (Topsy stands for Teachable OPerating SYstem). It constitutes the framework for the practical exercises related to the course Computer Engineering II. This course is taught at the Department of Electrical Engineering at ETH Zürich and deals with the basic concepts of operating systems. When planning and working out the lecture we thought about the best way how to teach this subject. In our opinion the concepts can best be learned by a combination of theory and practice, so we were looking for an operating system which serves as 1. a basis for practical exercises, enabling the students to apply the knowledge acquired in the lecture lessons, and 2. an example how basic principles can be implemented in a real operating system. For us it was essential that the desired system improves the student's comprehension in the fields of process parallelism, communication and synchronization, interfacing hardware and memory management. Though there is a myriad of operating systems (OS) for almost any hardware platform , none of these OSs fulfils the requirements we have, which are in particular: • Simplicity: Powerful kernels tend to be too large and over-featured. Many algorithms are tuned for speed, lacking a simple formulation. Also, many unnecessary modules are found in kernels for performance reasons. • Readability: OS code is often obscured due to its historical origin and lots of options and hardware variants being supported. • Hardware independence: While most systems claim to be portable, we found that the effort of porting a complex existing system is comparable to building a new simple one. • Transparency: For didactic reasons we favor clear program code instead of efficient realizations. The basic principles implemented in an OS have to be easily comprehensible by the students. Most OSs are designed for efficiency. • Lecture compatibility: Since this is a course for students in the second academic year, we have to take into account what they have learned so far. One implication is the use of the C programming language because it was introduced in the lecture Computer Engineering I. So we have decided to develop a new operating system from scratch. Our main goal …