Phobos The structure of PHOBOS


PHOBOS is a message passing system; that is, it consists of a number of components (called tasks) which communicate by sending short messages to each other. The transmission and routing of messages is carried out by the system kernel. There are a number of built in tasks which carry out essential system functions, and additional external tasks can be loaded and run as required. All tasks have the ability to access everything and indeed do anything.

The kernel

The kernel consists of:

  • A scheduler. This selects the next task to run, and gives it an allocation of time before the scheduler regains control. The scheduler operates a simple four level priority system using four separate CPU queues.
  • A system call handler. This handles software interrupts generated by tasks, and uses the register contents at the time of the interrupt to determine the service that has been requested by the task.
  • An interrupt handler. This simply routes each interrupt to the task that has chosen to link to it, except in the case of the clock interrupt.
  • A clock handler. For reasons of efficiency and timing, the clock interrupt handler is built into the kernel. It maintains a record of time since the system was started, and can send timed messages to tasks if requested to do so.

There is also a quantity of one-time initialisation code; in time, it is planned to make the space occupied by this code recoverable.

The built-in tasks

The current built-in tasks are:

  • The console task. This task handles all input from the keyboard, and output to the screen (except emergency messages frpom the kernel).
  • The diskette task. This provides a message-based interface for low level access to the diskette drive; it does not provide any kind of filing system, merely a method of reading and writing sectors. At present, this task is in its infancy, and it does no more than turn off the diskette drive motor after boot.

The external tasks

At this time, no external tasks exist.

Valid XHTML 1.0! Valid CSS!

This site is copyright © 2008 Bob Eager
Last updated: 11 Nov 2008