RetrOS - A simple operating system
Background:
You can read the project background here.
Writing an Operating System is not an easy task. Many are avaible today, for a pretty complete list, check this link.
Before the first line of code is put on paper (or screen), some design considerations need to be taken into account. E.g. what is the
purpose of your OS other than to have one? Does it need to be used in an environment where human life is at stake, e.g. an hospitals I.C.
Do you want it's main purpose to be a game OS? Do you want to use it for controlling electronics in modern cars? Washing machine perhaps? etc. etc.
When you figured out, what you want to achieve, it's time to find the kernel architecture that fits the purpose, or at least manages to come
close to it. As background information on this topic, I suggest you read this.
My personal objective is, just to write one from scratch. However, I do have some goals, that I would like to achieve.
- Compatibility with the Geneve and Power9 series. That is, it needs to run on those computers.
- Multi threaded, event driven kernel complete with asynchronous I/O.
- In the future, multi CPU capable.
For now, the first objective, which is more than enough challenge to achieve, is fine. ;-).
The CPU architecture used is the 99xx series from Texas Instruments. The TMS9995 and TMS99105A/110A to be precise. The first doesn't have user mode/supervisor mode
capabilities and thus severely limiting the kernel design that can be used. The latter two, do have these capabilities.
The Geneve and the first version of the Power9 both use a TMS9995. Future versions of the Power9 will use a TMS99110A. In order to avoid the
necessity of complete redoing the kernel architecture and thus the OS itself, an architerure will be chosen that fits the TMS991xx, but will run with limitations
on the TMS9995. It will be based on a Monolitic kernel design. The main reason for this, is that the CPU involved are 20 to 25 years old and compared to
today's CPU's, slow in execution. To speed up processing, as many basic funtions need to be integrated in the kernel to avoid unnecessary context switches.
Okay, I hear you say, the TMS99xx is a memory to memory based architecure so a context switch only involves a minimum of instructions. This is true, but the later versions
will run on a TMS991xx CPU, which supports user mode/supervisor mode. So, bringing basic functionality to user mode level, requires additional CPU clocks when context
switches from user- to supervisor mode are executed. When user mode I/O is initiated via restricted memory spaces, interrupts are generated (and thus context switches are involved)
to maintain integrity, the kernel has catch these and execute "replacement" routines. So to minimize context switch overhead, a monolitic kernel design has been chosen.
Project steps:
- Document high level kernel and OS structure.
- Work out a more detailed version of the previous step.
- Code a Geneve compatible version. This eases debugging for basic functionality.
- Add Power9 support.
Operating System design:
- Conceptual overview of RetrOS.
- Component overview of RetrOS.
- Detailed component description.
- TBD.
Project updates:
- 11/25/2005 - Initial thoughts.
Project related links:
Comments, ideas or suggestions:
Can be sent to: ti99@collosumus_NOSPAM_.net, please remove the _NOSPAM_ from the e-mail address. You can't be to careful with spam these days.
Last update: 10/25/2005.