Microware OS-9

Under the Hood: The Microware OS-9 Architecture

OS-9 utilizes an advanced modular software structure that creates an optimum balance of speed and protection for the embedded systems and applications. OS-9 runs faster compared to microkernel operating systems, and offers an increased level of security compared to monolithic architectures. All modules and components that make up an OS-9 system–including the kernel, file managers, drivers and applications–are stored as logical OS-9 memory modules. Each memory module is a self-contained program consisting of module header, module body, and a Cyclic Redundancy Check (CRC) value. These logical software components are easy to create and manage, while ensuring high availability of the OS-9 platform.

Microware OS-9 supports three types of protective boundaries:

The user/system state boundary: User state code uses the processor’s non-privileged instruction set, and the operating system’s user-state system calls. These restrictions let the operating system contain the application within processor boundaries.

Process boundaries: Each process is granted access to resources by the operating system. OS-9 prevents processes from erroneously or maliciously disturbing other processes’ resources without proper authorization. If the system is using a memory management unit, OS-9 uses it to enforce memory access protection rules. If there is no MMU, OS-9 still makes an effort to enforce protection rules.

User/group protection: Each process, each module, and (for most file systems) each file has an associated owner. OS-9 uses ownership and permissions to administer access to resources.

The OS-9′s real-time kernel allows multiple independent applications to execute simultaneously through task switching and inter-process communication facilities. All OS-9 programs run as processes containing at least one lightweight process (thread), but may also contain an effectively unlimited number of threads. Within a process, these lightweight processes share memory, I/O paths, and other resources in accordance with the POSIX threads specification and API.

OS-9 schedules threads using a fixed-priority preemptive scheduling algorithm with round-robin scheduling within each priority. The priority levels can be divided into a range that supports aging and a higher-priority range that uses strict priority scheduling. Each process can access any system resource by issuing the appropriate OS-9 service request. At every scheduling point, OS-9 compares the priority of the thread at the head of the active queue to the priority of the current thread. It contextually switches to the thread on the active queue if its priority is higher than the current processes’ priority. Aging artificially increases the effective priority of the threads in the active queue as time passes. At defined intervals, time slicing returns the current thread to the active queue behind other threads at the same priority.