The OS-9 family was popular for general-purpose computing and remains in use in commercial embedded systems and amongst hobbyists. Today, OS-9 is a product name used by both a Motorola 68000-series machine language OS and a portable (PowerPC, x86, etc.) version written in C, originally known as OS-9000.

History

The first version ("OS-9 Level One") , which dates back to 1979–80, was written in assembly language for the Motorola 6809 CPU, and provided a single 64 KB address space in which all processes ran. It was developed as a supporting operating system for the BASIC09 project, contracted for by Motorola as part of the 6809 development. A later 6809 version ("Level Two") takes advantage of memory mapping hardware, supported up to 2 MB of memory (ca 1980) in most implementations, and included a GUI on some platforms.

In 1983, OS-9/6809 was ported to Motorola 68000 assembly language and extended (called OS-9/68K); and a still later (1989) version was rewritten mostly in C for further portability. The portable version was initially called OS-9000 and was released for 80386 PC systems around 1989, then ported to PowerPC around 1995. These later versions lack the memory mapping facilities of OS-9/6809 Level Two simply because they do not need them. They used a single flat address space that all processes share; memory mapping hardware, if present, is mostly used to ensure that processes access only that memory they have the right to access. The 680x0 and 80386 (and later) MPUs all directly support far more than 1MB of memory in any case.

As a consequence of early pervasive design decisions taking advantage of the easily used reentrant object code capabilities of the 6809 processor, programs intended for OS-9 are required to be reentrant; compilers produce reentrant code automatically and assemblers for OS-9 offer considerable support for it. OS-9 also uses position independent code and data because the 6809 also supported it directly; compilers and assemblers supported position independence. The OS-9 kernel loads programs (including shared code), and allocates data, wherever sufficient free space is available in the memory map. This allows the entire OS and all applications to be placed in ROM or Flash memory, and eases memory management requirements when programs are loaded into RAM and run. Programs, device drivers, and I/O managers under OS-9 are all 'modules' and can be dynamically loaded and unloaded (subject to link counts) as needed.

The best known hardware (due to its low price and broad distribution) was the TRS-80 Color Computer (CoCo) and its clones such as the British Dragon series. Even on the CoCo, a quite minimalist hardware platform, it was possible under OS-9/6809 Level One to have more than one interactive user running concurrently (for example, one on the console keyboard, another in the background, and perhaps a third interactively via a serial connection) as well as several other non-interactive processes.

On a computer like an SS-50, machines which had more memory (for example, those from Gimix, Southwest Technical Products, etc.), and I/O controllers that did not load the CPU as did the CoCo, multiple users were common, even with only 64 KB of RAM (i.e., Level One). With hardware supporting memory management circuits (that is, address translation) and OS-9 Level 2, GUI use was successfully routine, even on the minimal resourced CoCo. This was several years prior to successful GUIs on the 16-bit IBM PC class machines, and many years prior to properly working multi-tasking, multi-user, access-controlled operating systems on IBM PC type machines or on any of Apple's machines.

OS-9's multi-user and multi-tasking capabilities make it usable as a general-purpose interactive computer system. Many third-party interactive applications have been written for it, such as the Dynacalcspreadsheet, the VED text formatter, and the Stylograph and Screditor-3 WYSIWYGword processors. TSC's nroff emulating formatter was ported to OS-9 by MicroWay, as well.

In mid 1980s, OS-9 was selected for the CD-i operating system. Around the same time, Microsoft approached Microware for acquisition of the company primarily because it was attracted by CD-RTOS, the CD-i operating system. The negotiation failed and no deal was made; Microware decided to remain independent.

In late 1980s, Microware released OS-9000, a more portable version of the operating system. The vast majority of the operating system kernel was rewritten in C leaving a handful of hardware-dependent parts in assembly language. A few "more advanced features" were added such as tree-like kernel module name space. OS-9000 was initially ported to the Motorola 680x0 family CPUs, Intel 80386, and PowerPC. The OS-9000/680x0 was a marketing failure and withdrawn very quickly probably because few customers wanted to try the fatter and slower operating system over the existing OS-9/680x0 proven record of stability. That the Motorola 680x0 family and VME board computer system vendors were nearing their end of life might have affected the unpopularity of OS-9000/680x0. Microware later started calling all of its operating systems including what had been originally called OS-9000 simply OS-9 and started shifting its business interest towards portable consumer device markets such as cellphones, car navigation, and multimedia.

In late 1980s and early 1990s, the Character Generators computers used in Broadcast Systems used OS-9 and OS-9000 extensively. The now defunct Pesa Electronica used OS-9 on their CGs such as CG 4722 and CG4733.

Name conflicts and court decisions

In 1999, nineteen years after the first release of OS-9, Apple Computer released Mac OS 9. Microware sued Apple that year for trademark infringement, although a judge ruled that there would be little chance for confusion between the two. Some Macintosh users who are unaware of Microware's relatively unknown OS-9 have posted to the news://comp.os.os9 newsgroup; not realising what OS-9 is.

In 2000, Radisys purchased the nearly bankrupt Microware to acquire the Intel IXP-1200 network processor resources. This acquisition infused Microware with needed capital and allowed Microware to continue OS-9 development and support. As of 2008, OS-9 is still supported by Radisys and Microware.

Technology

Modern and archaic design

OS-9 (especially the 68K version and thereafter) clearly distinguishes itself from the prior generation of embedded operating systems in many aspects.

When compared with more modern operating systems such as Linux, however, OS-9 lacks many features used extensively in today's applications.

Kernel is entirely written in assembly language (OS-9/68K) using simple internal data structures, reducing flexibility and improvement scope. performance was also affected for some operations, but assembly language helped with the speed issue.

Systems without MMU have no memory protection against illegal access, nor per process memory protection.

A small set of inter-process communication tools; initially, rather like classic Unix; only signals and data modules were available as part of the OS in early versions. Semaphores (called "events") were added later.

Task scheduling

(The discussion herein is based on OS-9/68K V2.x. Other versions may differ.)

Strictly speaking, OS-9 is a very soft real-time operating system for many reasons.

Tasks (processes) are scheduled based on priorities with aging. Each process has its age initialized with the given priority value. The process scheduler lets a runnable process with the highest age value run. When a process is given a CPU time slice, its age value is decremented by one. When a process's age value reaches zero, the age value is re-initialized with the priority value. Processes with the same age value are chosen in a round-robin manner.

Interrupt services are monolithic. No provision for separation between immediate (top-half) and deferred (bottom half) services.

Kernel modules

Comparisons with Unix

OS-9's notion of processes and I/O paths is quite similar to that of Unix in nearly all respects, but there are some significant differences:

The file system is not a single tree, but instead is a forest with each tree corresponding to a device.

OS-9 does not have a Unix-style fork() system call--instead it has a system call which creates a process running a specified program, performing much the same function as a fork-exec or a spawn.

OS-9 processes keep track of two "current directories" rather than just one; the "current execution directory" is where it will by default look first to load programs to run (which is of course similar to the use of PATH environment variable under UNIX). The other is the current data directory.

OS-9 has had a modular design from the beginning, influenced by notions of the designers of the 6809 and how they expected software would be distributed in the future (see the three-part series of articles in Jan-Mar 1979 Byte by Terry Ritter, et al of Motorola who designed the CPU).

The module structure requires more explanation:

*OS-9 keeps a "module directory", a memory-resident list of all modules that are in memory either by having been loaded, or by having been found in ROM during an initial scan at boot time.

*When one types a command to the OS-9 shell, it will look first in the current module directory for a module of the specified name and will use it (and increase its link count) if found, or it will look on disk for an appropriately named file if not.

*In OS-9/6809 and OS-9/68000, the module directory is flat, but OS-9000 made the module directory tree-structured. The OS-9000 shell looks in one's alternate module directory for a MODPATH environment variable, analogous to the PATH variable in all versions, indicating the sequence of module directories in which to look for pre-loaded modules.

*Modules are not only used to hold programs, but can also be created on the fly to hold data, and are the way in which OS-9 supports shared memory.

OS-9/non-68000 supports POSIX threads. A single process can start any number of threads.

21st century uses

Versions of OS-9/68K run on a wide variety of 68000 family platforms, including the Sharp X68000 in Japan, some personal computers intended by their designers as upgrades from the Color Computer (e.g., the 68070 and 68340-based MM/1, and on other computers from Frank Hogg Laboratories, PEP, and Delmar Co.) It was also ported to the Atari ST by Recc-o-ware in the early 1990s, and was distributed by Cumana in Europe. A port to the Amiga is also purported to exist.

OS-9/68K is also found in some embedded applications, including the Quanta Delta television broadcast character generator, still in production by ScanLine Technologies in Utah. While the user-level interface code on this system started at boot time, there was a hidden, undocumented keyboard sequence that would provide a user with a root shell prompt in a scroll window on the device's edit-channel monitor.

In the embedded market, where OS-9 has found application in such devices as the Fairlight CMI synthesizers, robotics, in-car navigation systems, and Philips' Compact Disc-Interactive (CD-i) industry standard.

The TRS-80 Color Computer (and clones) still has users and an annual conference in Chicago; as of 2007 the 17th Annual "Last" Chicago CoCoFest is scheduled for April 2008. A group of Canadian programmers rewrote OS-9/6809 Level II for the CoCo 3 (w/ address translation hardware) for efficiency, and to take advantage of the native mode of the Hitachi 6309. Today's serious CoCo users now typically have replaced the 68B09E in the CoCo 3 with an Hitachi 63B09E and run the rewrite, called NitrOS9. The combination is surprisingly fast, considering that it runs on an expressly low cost, 8-bit computer system.

The DigiCart/II Plus audio playback unit runs OS-9/68K. It is a solid state replacement for radio station style cart players. These units are used in radio and at places like Walt Disney World where they play park announcements.

Trivia/Easter Eggs

The OS-9 version 2.4 manual had this entry describing UNIX in the Glossary of Appendix C of "Using Professional OS-9":

UNIX:

An operating system similar to OS-9, but with less functionality and

special features designed to soak up excess memory, disk space and CPU

time on large, expensive computers.

This entry was, curiously, removed in the version 3.0 manual.

The OS-9 shell had an easter egg in its command history function, invoked by CTRL-A. Upon a fresh boot, the command history was supposedly empty, but if the user typed a single space followed by a backspace, then hit CTRL-A, the names of the authors would be displayed: 'by K. Kaplan, L. Crane, R. Doggett'.