Homebrew Mini-Computer

armandoacostawong@gmail.com

:: The H1OS Operating System

These notes describe the very first approach to an Operating System (H1OS) which development has not started yet.

H1OS is planed to be a "simple" multiprogramming operating system oriented to batch processing offering support for tapes as the only storage mean. Some of its features may look bizarre as seen from our modern prospective but that's only because H1OS has been designed for a batch processing work flow as opposite as nowadays familiar interactive multi-user environments. Actullay, H1OS is not meant to be innovative in any respect but just to do the job in a simple way.

Overview

H1OS is oriented to batch processing and tapes. It employs multiprogramming to allow up to 16 processes to run at the same (scheduled) time. It does not implement the notion of "user": the "Monitor" (command interpreter) is intended to a professional operator and employs a dedicated terminal for it. Applications are not supposed to be interactive but the OS does not prevent the programmer from doing so in which case a separate terminal will be required for that purpose.

H1OS does not implement protected mode either as the Heritage/1 minicomputer does not offer support for that. Different processes are given separate stacks but those share the same physical (64K) address space. Preemptive scheduling does its best for isolating misbehaving processes but nothing can prevent a buggy program from corrupting other's processes code or data or even those for the Operating System itself.

System configuration relies heavily on the operator who will need to setup applications before they run. The setup of a particular program includes manual assignment of resources such as tape drives, printers and terminals. Loading/Unloading of Run-Time Libraries, as well as other OS-related task are also under the Operator's control. Most of this work, however, can be automated by the use of configuration files residing on tape.

If non of this sounds too much inviting... welcome to the Heritage/1 world!

Architecture

The H1OS Operating System consists of a Kernel and a set of Service Processes.

The Kernel is a set of independent routines providing basic functionality such as memory allocation and low-level access to peripherals. These routines are invoked from applications by the mean of "system calls" consisting of software interrupts. Kernel routines are said to be "critical" as they must execute from top to bottom without interruptions hence they must be designed to return rapidly in order to avoid system "freezing". Among these Kernel routines is the processes Scheduler.

Service processes are long-term execution programs sharing a time-sliced space that we call the "Multiprogramming Space" (MPS) under the Scheduler's control. As opposite, we introduce the notion of "Kernel Programming Space" (KPS) to refer to the "critical-region" code occurrence. Application and OS Service Processes share the same MPS. Among Service Processes is the commands interpreter or Monitor which provides the human interface for the Operator.

A key distinction between KPS and MPS code is that the former utilizes fixed global variables located in a dedicated portion of the memory addressing space that we call the "Kernel Data Area" whereas the later utilizes memory granted by the OS upon request, located in the Heap.

Apart from the Kernel, Monitor and OS Services, the Operating System allows for installable Run-Time Libraries (RTL) such as those provided by languages. RTL code is placed in the Heap and executes either in the MPS or the KPS as we shall see later.

Memory Map

From the OS prospective the computer's memory is divided in the following portions:

------------------------------------------------------------------ 
H1OS MEMORY MAP 
------------------------------------------------------------------ 
0000-00ff  (256 words ): Interrupt Vectors 
0100-1fff  (rest of 8K): Kernel Data Area followed by Kernel Code 
2000-...   (4K to 52K ): Heap 
f000-ffff  (4K        ): Peripheral dual-port buffers 
------------------------------------------------------------------ 

Interrupt vectors are used by both internal CPU-generated interrupts and software interrupts (See Interrupts Architecture in the Old Site).

The Kernel Data Area holds different global structures used by the Kernel such as the Process Schedule Table and the Memory Allocation Table among many others.

Kernel code follows. As mentioned, this is a set of separate short routines placed one after another.

Starting at address 2000 is the Heap (remaining memory) where all application code and data will be allocated. Operating System service processes and Run-Time Libraries are also placed in this area.

The Heap is managed by the Kernel in terms of "paragraphs" of 256 words each. As Heritage/1 memory increments in steps of 4K words, the size of the Heap can expand from 16 paragraphs (4K) to 32 paragraphs (52K).

The bottom 4K portion of the addressable space (f000-ffff) is not populated with actual RAM chips installed in the Core Unit but reserved for peripherals. In this range, peripherals will allocate their buffers which are wired as dual-port memory. Buffers may be of different sizes depending of the peripheral's design.

A typical configuration will have 32K words of RAM installed in the Core Unit from 0000 to 7fff. This makes a Heap of 24K words. The bottom portion (f000-ffff) will still reserved for peripherals dual-port buffers.

Homebuilt CPUs WebRing

JavaScript by Qirien Dhaela

Join the ring?

David Brooks, the designer of the Simplex-III homebrew computer, has founded the Homebuilt CPUs Web Ring. To join, drop David a line, mentioning your page's URL.
He will then add it to the list. You will need to copy this code fragment into your page.