System Design
As said in the specification overview, the system design is really your detailed implementation plan. It will take the rough sketch from the architecture sketch and fill the sketch with details to make it a full-blown design. It will detail the following:
Kernel Structure
The kernel you are writing will naturally decompose into a set of modules. You need to have an answer to the following questions:
- Which modules exist?
- What functionality sits in each module?
- Which functions do the module expose to other modules?
- What do these functions achieve?
- Which parameters do the functions take?
- All externally exposed and non-trivial internal data structures have to be described.
- All non-trivial algorithms used in the module.
- Which other modules does each module depend on?
This part is the hard part of the operating system design. Once this part is done, the rest is a small matter of programming; all the hard thinking should have been done once the kernel structure is described at this level.
OS API
The API (Application Programming Interface) for user programs in your operating systems.
- Which calls exists?
- What parameters do they take?
- What do they achieve?
- How is the OS API invoked, technically (function call, trap, or other mechanism)?
- Any important data structures that are needed for user programs to communicate with the kernel?
- How are programs represented (how do you find the code of a program to start)?
- How can programs that need to communicate locate each other?
User Programs
- Which user programs will exist?
- What will they do?
- How will they do this?
- Are there any non-trivial algorithms that need to be designed?
- How will sets of dependent programs start?
Implementation Schedule
To structure the implementation work, you should create an implementation schedule that details:
- The order of implementation for kernel modules, APIs, and user programs.
- Dependencies between the implementation tasks ("kernel module X can only be tested when Y and Z are completed).
- A work plan for who will implement which module
- A very approximate time plan for the implementation work: when do you expect each piece of work to begin and end?
Creating this schedule can be quite hard. Do not worry too much about the precise timing. The important parts are to:
- Decide which modules can be written early and brought together to be tested.
- Decide which modules have to wait for others to be completed before they can be integrated into the operating system.
- Determine which work can be performed in parallel, so that you make good use of your limited time.
- Remember that testing and debugging the integrated system is going to take a lot of time! Coding is usually the smallest part of a larger implementation effort like this!
General Advice
- You want to have a system that can run as early as possible (even if it does not do anything). Use stubs for functions, dummy user programs, just to get something that runs.
- Keep it simple. Do not create overly complex designs. Do the basic simple things first, make it fancy if you have the time.
- Once again, make sure to allow plenty of time for testing and debugging. It takes more time than you think.