/ Resources / Design / Structural Overview

RCOS.java Home PageSystem DescriptionDomain Analysis
RCOS.java is divided into the following sections:

Hardware

CPU

Initially, the RCOS.java CPU will be based on the P-Code machine used in the original RCOS. The intention is to reuse the existing RCOS PLL compiled code. The operation of the CPU has been modified slightly to support the concept of pages.

The PLL/2 compiler which was included in the original version is being replaced by a full C/C++ compiler. This compiler produces P-Code and may be modified from the Java version to compile itself which opens the possibility of being able to compile programs from within RCOS.java.

For the truly keen, it may be possible in the future to use the Java Virtual Machine (JVM) as the CPU and the other features of a Java Virtual Machine. This would not only allow people to understand basic concepts of OS design but also the workings of the Java Virtual Machine.

Disk

The disk sub-system was written by Brett Carter and modified by Andrew Newman.

The disk sub-system is fairly small because of the desire to produce a graphical represenation of the allocation/deallocation of disk blocks by the file system.

Terminal and Memory (RAM)

The Terminal provides the physical interface to the user including the keyboard and the visual display unit.

Memory consists of two sections. The first is the CPU cache. This is dynamically adjusted to fit the current program into it. The main reason is to increase speed and reduce complexity. Secondary RAM holds all loaded programs and stores them in two sections: process code and stack.

Operating system

Kernel

RCOS.java uses a micro-kernel based, message passing structure. The kernel is responsible solely for a number of platform specific functions including:

Message passing

Standard operating system functions are divided into a number of components. All communication between these components must be in the form of messages. All messages pass through the Post Office component that is responsible for delivering messages to the correct destinations.

Intention is that theoretically that different components could be located on different computers.

The Post Office may also be able to be used to hide the animation from the rest of the operating system classes. All the important OS events take the form of messages that pass through the Post Office. Rather than litter the implmentation of the OS components with messages to the Animator the Post Office has been written automatically to forward all messages it receives to the Animator (as well as the actual recipent).

The Animator class can then decide whether or not it wants to do anything as a result of the message.

Other OS Functions

Remaining operating system responsibilites are divided into seperate components (each a Java class in RCOS.java) including:

Animation

The Animation system is hidden from the remainder of the system by the Post Office Animator class. Responsibilities of the animation system includes: