[BACK]Return to overview.html CVS log [TXT][DIR] Up to [local] / prex-old / doc / html / doc

File: [local] / prex-old / doc / html / doc / overview.html (download) (as text)

Revision 1.1, Tue Jun 3 09:38:43 2008 UTC (15 years, 11 months ago) by nbrk
Branch point for: MAIN

Initial revision

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <title>Prex Technology Overview</title>
  <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type">
  <meta name="keywords" content="Prex, embedded, real-time, operating system, RTOS, open source, free">
  <meta name="author" content="Kohsuke Ohtani">
  <link rel="stylesheet" type="text/css" href="../default.css" media="screen">
  <link rel="stylesheet" type="text/css" href="../print.css" media="print">
</head>
<body>
<div id="top">
</div>
<div id="middle">

<table id="content" cellpadding="0" cellspacing="0">
  <tbody>

    <tr>
      <td id="header" colspan="2" valign="top">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td id="logo">
            <a href="http://prex.sourceforge.net/">
            <img alt="Prex logo" src="../img/logo.gif" border="0"
            style="width: 281px; height: 56px;"></a>
          </td>
          <td id="brief" align="right" valign="bottom">
            An Open Source, Royalty-free,<br>
	    Real-time Operating System
          </td>
        </tr>
        </table>
      </td>
    </tr>

    <tr>
      <td id="directory" style="vertical-align: top;">
      <a href="http://prex.sourceforge.net/">Prex Home</a> >
      <a href="index.html">Document Index</a> >
      Technology Overview
    </tr>
    <tr><td class="pad" colspan="2" style="vertical-align: top;"></td></tr>

    <tr>
      <td id="main" style="vertical-align: top;">
      <h1>Prex Technology Overview</h1>

<i>Version 1.1, 2005/09/01</i>

<h3>Table of Contents</h3>
<ul>
  <li><a href="#component">Prex Components</a></li>
  <li><a href="#microkernel">Microkernel</a></li>
  <li><a href="#driver">Device Drivers</a></li>
  <li><a href="#server">System Servers</a></li>
  <li><a href="#lib">Emulation Libraries</a></li>
  <li><a href="#loader">Boot Loader</a></li>
</ul>
<br>

<h2 id="component">Prex Components</h2>
<p>
The following figure illustrates the Prex components.
</p>
<img alt="Prex Overview" src="img/overview.gif" border="1"
style="width: 600px; height: 416px;"><br>

<i><b>Figure 1. Prex Components</b></i>
<p>
The Prex microkernel provides only fundamental functions to abstract
a processor and minimum hardware. In addition, it provides some real-time
support functions for a real-time task.
The microkernel also provides standard kernel services
for the device drivers.
There exists a strict interface for the thin layer called
as "Architecture Dependent Layer" in the microkernel.
</p>
<p>
The other basic OS functions like process, file system, networking etc.,
are provided by system server tasks.
There is no characteristic difference between server tasks and normal tasks.
The tasks will communicate with other by using IPC message via a microkernel.
Prex will also provide some interface emulation libraries for an application
interoperability.
Although the server tasks are required to run UNIX processes, a native
real-time task can work without any system servers.

</p>

<h2 id="microkernel">Microkernel</h2>

The design policies for the Prex kernel are as follows:
<ul>
  <li><b>Simple &amp Small</b>: Move OS functions to user mode as much as possible.</li>
  <li><b>Easy to Port</b>: Define common interface for various processor architectures.</li>
  <li><b>POSIX Support</b>: Provide minimum kernel support for POSIX.</li>
  <li><b>Real-time Capable</b>: Execute native real-time tasks directory on the Prex kernel.</li>
</ul>

Kernel has responsibility to handle the following items.
<ul>
  <li><b>Object</b> - holds a queue of messages.</li>
  <li><b>Message</b> - is used to communicate between threads.</li>
  <li><b>Task</b> - is a container which holds threads, memory maps, and objects.</li>
  <li><b>Thread</b> - is a minimum execution unit including processor's register state.</li>
  <li><b>Scheduler</b> - decides which thread can use processor.</li>
  <li><b>Virtual Memory</b> - provides memory protection, virtual address mapping.</li>
  <li><b>Timer</b> - manages timer lists for applications &amp drivers.</li>
  <li><b>Exception</b> - is a hardware interrupt or event from processor.</li>
  <li><b>Device</b> - provides common interface to access device drivers.</li>
  <li><b>Synchronize Object</b> - supports mutexes, condition variables, semaphores.</li>
  <li><b>System</b> - provides some useful system functions. e.g. statistics, log, time etc.</li>
</ul>

<h2 id="driver">Device Drivers</h2>
<p>
Prex device drivers work in kernel mode.
All device drivers are stored in one single driver module, and this is
separated from the kernel module.
The driver module is linked with the kernel at boot time, and all device
drivers are initialized at that time.
</p>
<p>
The interface between the kernel and drivers are defined clearly as
"Driver Kernel Interface (DKI)". The kernel provides the following services
for device drivers.
</p>
<ul>
  <li>Device object service</li>
  <li>Kernel memory allocation</li>
  <li>Physical page allocation</li>
  <li>Interrupt handling service</li>
  <li>Scheduler service</li>
  <li>Timer service</li>
  <li>Debug service</li>
</ul>

<h2 id="server">System Servers</h2>
<p>
The Prex tasks can communicate with each other by sending message to the
specific object, as illustrated below.
</p>

<img alt="Microkernel bus" src="img/ipc.gif" border="1"
style="width: 482px; height: 333px;"><br>

<i><b>Figure 2. Prex message passing</b></i>

<p>
Prex provides some standard server tasks to support generic OS functions
that are removed from the kernel. The server tasks include:
</p>
<ul>
  <li>Process server</li>
  <li>File system server</li>
  <li>Exec server</li>
  <li>Network server</li>
  <li>Boot server</li>
</ul>
<p>
A server task will create its object named like "fs", "proc", or "exec"
in the kernel object name space.
Each user mode task will send a message to these objects in order to use
the server services.
</p>
<p>
A server task can re-send the received message to another task.
This mechanism can allow servers to "forward" the specific message
to another server.
For example, the proxy server will forward a received message to
the remote proxy server via network.
</p>

<h2 id="lib">Emulation Libraries</h2>
<p>
Prex provides some libraries to emulate POSIX interfaces. They will include
standard UNIX system calls, pthread, and real-time extension.
The typical works of these libraries are to pack the application's
request into a message, and send it to the appropriate server.
It will encapsulate the message structure defined by each server task.
For example, an application can use fork() system call as a library routine,
which will automatically send the message to the process server.
So, there is no need to modify the source code of the existing UNIX
applications to run it on Prex.
</p>

<img alt="OS Emulation" src="img/emulate.gif" border="1"
style="width: 485px; height: 331px;"><br>
<i><b>Figure 3. OS Emulation</b></i>

<p>
The emulation libraries can be made not only for POSIX
but also for API of other OS. This allows Prex to support the execution
of various different OS applications without changing the system servers.
The developers will benefit from the source level compatibility of
existing applications.
</p>

<h2 id="loader">Boot Loader</h2>
<p>
Prex provides the OS boot loader if it is required on the target platform.
The boot loader will support the following minimum functions:
</p>
<ul>
  <li><b>Minimum Setup:</b> Program some essential registers for processor
      or hardware. e.g. disabling interrupts</li>
  <li><b>Boot Information:</b> Collect some boot information if it needed. e.g. memory size</li>
  <li><b>Program Loading:</b> Copy some programs to RAM if it is needed. e.g. kernel, driver,
    boot tasks etc.</li>
</ul>
<p>
Since the boot mechanism depends on the hardware of each system,
its design is not strictly defined.<br>
Note: It's better to use existing boot loader if possible.
</p>

      </td>
    </tr>
    <tr>
      <td id="footer" colspan="2" style="vertical-align: top;">
        <a href="http://sourceforge.net">
        <img src="http://sourceforge.net/sflogo.php?group_id=132028&amp;type=1"
        alt="SourceForge.net Logo" border="0" height="31" width="88"></a><br>
        Copyright&copy; 2005-2007 Kohsuke Ohtani
      </td>
    </tr>

  </tbody>
</table>

</div>
<div id="bottom"></div>

</body>
</html>