The course project is the design and implementation of a simple operating system for a simple hypothetical machine: the Z502 computer. You are given a simulator for the Z502 machine, along with a number of test programs that exercise the required features of your operating system. You are required to write your version of the OS502 operating system and, optionally, any special test programs that you desire.
The remainder of this document gradually introduces the components of the project and the minimum requirements of each project part of your operating system. In order to finish each project part, it is only necessary to read this document as far as the assignment for that phase, along with related reading from the course textbook, lecture notes, and the appendices of this document. You may, however, find it interesting to read through the entire document to get a perspective on the whole project, and to plan ahead for later phases.
The two project parts cover the following general areas:
Throughout the project you will have considerable flexibility in designing your own algorithms and data structures. There are also many interesting ways in which the minimum project requirements can be extended, and you are welcome to explore in any direction that interests you. When making design decisions, you will often find yourself making efficiency tradeoffs (for example, between the time required to perform an operation and the space required for the associated data structures). You should explain such decisions in your documentation. In some cases, you may be able to imagine an extremely efficient and sophisticated design that would be rather complicated to implement. You should avoid such solutions unless you have first implemented and debugged a straightforward solution. The amount of work required to design, implement and debug a straightforward solution is already considerable, and you are not required to go beyond the basic requirements. In blunt terms, please resolve efficiency/simplicity tradeoffs in favor of simplicity, even if you are aware that such a choice would not be acceptable in a real operating system. If you wish, and if time and resources allow, you may consider implementing more complex designs after the minimum project is complete. This method of development should also enhance the modularity of your operating system, as once your system is working, you should be able to substitute an easy but inefficient algorithm for a more complicated design without endangering other components of your code.
Your operating system will be written for the Z502 computer, a hypothetical machine designed for use in this Computer Systems course. The Z502 machine is a 32bit/word minicomputer. Its advanced multi-register CPU sports numerous instructions, virtual memory support, and a multi-level interrupt scheme.
The Z502's advanced architecture has several features that are of particular interest to Operating System designers: (For the details of the Z502 machine, including registers, instruction set, and memory management support, see Appendix A.)
Because the Z502 is intended as a general purpose machine, it is available in several configuration options. The amount of memory, address translation scheme, and number of disks can all be varied. An operating system for the Z502 should be tailored for the address translation scheme, but should, of course, run with any number of disks and amount of memory.
To aid your development of an operating system we provide a simulator (not hypothetical, we hope) for the Z502 machine on your "real" machine OS. The combination of Your "Real" Machine Operating System (YRMOS) and the simulator constitutes the environment for your development effort.
The Z502 simulator is a program that provides a thorough simulation of our hypothetical Z502 computer. As shown in Figure 1.1, your operating system will run under the control of the simulator, while the simulator runs under the control of YRMOS. The simulator simulates privileged instructions, Z502 devices, and interrupts. Upon system startup, i.e., when the simulator is first invoked from YRMOS, the simulator performs necessary initialization (i.e., simulating hardware bootstrap) and transfers control to the entry point of the operating system (i.e., the function os_init() in the operating system). From the point of view of your operating system, the behavior of the simulator is virtually identical to that of the Z502 machine described in the previous subsection and detailed in Appendix A.
The development environment comes with test programs designed to measure your success in implementing OS502. (described in Appendix B).
The unrealistic aspects of the project fall into two categories: hardware simplifications in the Z502 that remove certain complexities that occur in real systems, and unrealistically simple requirements for the operating system functionality.