/ Resources / Design / Domain Analysis

RCOS.java Home PageStructural OverviewApplication Analysis
RCOS.java is to be an object-oriented (Java is an OO language), animated operating system used for operating system education. Relelvant domains include object-oriented operating systems and other educational operating systems

Object-Oriented Operating Systems

Choices

Choices is an object oriented operating system written in C++. It is considerablly more OO than the original RCOS code and as a project Choices has shown that OO operating systems provide significant software engineering advantages. A PhD thesis describing the Choices application interface, process management and memory management is available from the Internet (follow the link to Choices above). I have a paper based copy.

The same thesis concludes that there aren't a great many "truly" OO operating systems. RCOS falls under the category of kernel based operating system.

Choices is a complete OO environment. Even application programs are designed to be OO and make use of OS services by a specialised means. This is probably beyond the scope of RCOS.java.

8088 Details

Memory

Divided into 8 bit bytes, instructions can also operate on 16 bit words.

8088 can address 1Mb of RAM by using 20 bit physical addresses (PCs reserve addresses greater than 640K for console display and ROM s/w).

Uses two 16 bit logical addresses to form the one 20 bit physical address of the form SEGMENT:OFFSET. Translation is performed by SEGMENT*16 + OFFSET. Multiplying by 16 = to add low-order 0.

8088 does not support any form of memory management

Interrupts

First 1K of memory from 00000 to 003FF is used for interrupt vectors. Interrupt vector is a four byte segment:offset address of code to be executed upon receipt of a h/w or s/w interrupt. 1K gives space for 256 interrupt vectors.

Registers

8088 contains 12 16-bit registers, an instruction pointer and a 16-bit FLAGS register, summarised in following table.
Register Use
AX general purpose
BX general purpose
CX general purpose
DX general purpose
SP stack pointer
BP base pointer
SI source index
DI destination index
CS code segment
DS data segment
ES extra segment
SS stack segment
IP instruction pointer
FLAGS flags word
CS:IP - segment:offset address of the next instruction
DS:?? - offset for data
SS:SP - stack address
SS:BP - point to the stack frame on the run-time stack

Educational Operating Systems

Problems students have with Operating Systems

The content of an OS course is often very theoretical. Most of the problems in operating systems is taking general, theoretical discussion and extending it and seeing it in a real life situation. A realistic project is especially important in undergraduate operating systems courses, where many of the concepts are best taught, we believe, by example and experimentation. Nachos paper Problems that students have include

Big picture or base knowledge

Processes

Concurrency

Memory Management

Disk and File management

RCOS

Most obvious candidate, the experience of designing (at least observing the design) and using RCOS will aid development of RCOS.java. Problems with RCOS that need fixing

Nachos

Wayne A. Christopher, Steven J. Procter, Thomas E. Anderson, The Nachos Instructional Operating System, Proceedings Usenix Winter Technical Conferences, San Diego, January 1993, pp 25-29
Challenges in building Nachos

Nachos assignments used to demonstrate

Aim is to provide the simplest implementation for each sub-system to provide a working base. The students are asked to add functionality and improve performance. Nachos is about 2500 lines of code, half of which are devoted to interface descriptions and comments.

Nachos features

Nachos threads normally non-preemptive but has a command line option that causes threads to be time-sliced at "random".

Nachos CRC

Please note the information contained on the following pages is obtained directly from the Nachos source code.

Devices Interrupts CPU and machine
Network File System Threads
Synchronization User Programs Miscelanous

Tunix

Robert Switzer, Operating Systems: A Practical Approach, Prentice-Hall, 1993
Operating system in C but with architecture similar to RCOS including

All Tunix processes (MM, FM, IPCM etc) are implemented as independent UNIX processes.

You can't execute user programs with TUNIX not directly anyway. You can by linking a UNIX C program with some stubs that uses messages to communicate.

Tunix Threads

Following table summarises Tunix threads.
Function Purpose
thrd_init() Called only once and must be called before other thread routines. Initializes the thread system and saves the context. Used for when a thread_end is reached, control passes back to instruction just after thread_init.
thrd_start() Start new thread (and generate new context)
thrd_end() terminates previously started thread and destroy corresponding context, switch to any non-suspended threads, otherwise restart context saved by thread_init
thrd_sleep( EVENT ev ) suspend thread until EVENT occurs, if other threads active switch to them otherwise start context saved by thrd_init
thrd_wakeup( EVENT ev ) All threads that are suspended on EVENT are waken up.

File System

Implements a very UNIX like file system with superblocks, inodes etc Modules in Tunix file system include

Memory Management

Uses the abstraction region (also used by Unix). Each process owns several regions Tunix further divides regions into pages and assumes that it has h/w paging support.

Modules in Tunix MM include

Process Management

Implements management system between RCOS and UNIX, closer to UNIX.

Modules include

IPC

Implement semaphores, messages and shared memory.

OSP

Tunis

Holt, R. Concurrent Euclid, the UNIX System and TUNIS, Addison-Wesley, 1983

Minix

Xinu

PRMS