gnuk/ChibiOS_2.0.2/docs/html/goals.html
2010-08-10 12:11:02 +09:00

67 lines
4.9 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>ChibiOS/RT: Project Goals</title>
<link href="custom.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<table style="text-align: center; width: 100%;" border="0"
cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td style="width: 80px;"><img alt="ChibiOS/RT Logo" src="logo_small.png"></td>
<td><big><big>ChibiOS/RT</big></big><br><br>Architecture - Reference Manual - Guides</td>
<td style="width: 80px;"></td>
</tr>
</tbody>
</table>
<hr size="1">
<!-- Generated by Doxygen 1.6.3 -->
<div class="navigation" id="top">
<div class="tabs">
<ul>
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="navpath"><a class="el" href="main.html">ChibiOS/RT</a>
</div>
</div>
<div class="contents">
<h1><a class="anchor" id="goals">Project Goals </a></h1><h2>Another RTOS?</h2>
<p>The first question to be answered is: there was really the need for YET ANOTHER RTOS?<br/>
There are several reasons:</p>
<ul>
<li>The ChibiOS/RT ancestor was created more than 15 years ago and while it had far less features than the current product it was complete and functioning. ChibiOS/RT is just a new (and silly) name given to something created when there were not many free RTOSes around (actually none, at least none in my knowledge, there was no widespread Internet at that time).</li>
<li>When, after a while, I needed a RTOS again, none of the existing FOSS projects met my expectations or my ideas of how a RTOS should be, not even close (see below). I decided that work on that old project was a better idea than contribute to, or fork, something else.</li>
<li>I wanted another toy.</li>
</ul>
<h2>Why is it different?</h2>
<p>Well, there are some design choices that should be explained and contribute to make ChibiOS/RT a peculiar design. Nothing really new in itself but the whole is interesting:</p>
<h3>Static design</h3>
<p>Everything in the kernel is static, nowhere memory is allocated or freed, there are three allocator subsystems but those are options and not part of core OS. Safety is something you design in, not something you can add later.</p>
<h3>No tables, arrays or other fixed structures</h3>
<p>The kernel has no internal tables, there is nothing that must be configured at compile time or that can overflow at run time. No upper bounds, the internal structures are all dynamic even if all the objects are statically allocated.</p>
<h3>No error conditions and no error checks</h3>
<p>All the system APIs have no error conditions, all the previous points are finalized to this objective. Everything you can invoke in the kernel is designed to not fail unless you pass garbage as parameters, stray pointers as examples. The APIs are not slowed down by parameter checks, parameter checks (and consistency checks) do exist but only when the debug switch is activated.<br/>
All the static core APIs always succeed if correct parameters are passed. Exception to this are the optional allocators APIs that, of course, can report memory exhausted.</p>
<h3>Very simple APIs</h3>
<p>Each API should have the parameters you would expect for that function and do just one thing with no options.</p>
<h3>Fast and compact</h3>
<p>Note, first "fast" then "compact", the focus is on speed and execution efficiency and then on code size. This does not mean that the OS is large, the kernel size with all the subsystems activated weighs around <b>5.3KiB</b> and can shrink down around to <b>1.2Kib</b> in a minimal configuration (STM32, Cortex-M3). It would be possible to make something even smaller but:</p>
<ol type="1">
<li>It would be pointless, it is already <em>really</em> small.</li>
<li>I would not trade efficiency or features in order to save few bytes.</li>
</ol>
<p>About the "fast" part, the kernel is able to start/exit over <b>220,000 threads per second</b> on a 72MHz STM32. The Context Switch takes <b>1.2 microseconds</b> on the same STM32.</p>
<h3>Tests and metrics</h3>
<p>I think it is nice to know how an OS is tested and how it performs before committing to use it. Test results on all the supported platforms and performance metrics are included in each ChibiOS/RT release. The test code is released as well, all the included demos are capable of executing the test suite and the OS benchmarks, see <a class="el" href="testsuite.html">Testing Strategy</a>. </p>
</div>
<hr size="1"><address style="text-align: right;"><small>
Generated on Sun Jul 11 13:13:09 2010 for ChibiOS/RT by&nbsp;<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.6.3</small></address>
</body>
</html>