2,7 → 2,7 |
<chapter id="time"> |
<?dbhtml filename="time.html"?> |
|
<title>Time management</title> |
<title>Time Management</title> |
|
<para>Time is one of the dimensions in which kernel, as well as the whole |
system, operates. It is of special importance to many kernel subsytems. |
13,7 → 13,7 |
to implement timeouting versions of synchronization primitives.</para> |
|
<section> |
<title>System clock</title> |
<title>System Clock</title> |
|
<para>Every hardware architecture supported by HelenOS must support some |
kind of a device that can be programmed to yield periodic time signals |
84,7 → 84,7 |
<para>Kernel subsystems can register a callback function to be executed |
with a specified delay. Such a registration is represented by a kernel |
structure called <classname>timeout</classname>. Timeouts are registered |
via <code>timeout_register()</code> function. This function takes a pointer |
via <code>timeout_register</code> function. This function takes a pointer |
to a timeout structure, a callback function, a parameter of the callback |
function and a delay in microseconds as parameters. After the structure is |
initialized with all these values, it is sorted into the processor's list |
91,8 → 91,8 |
of active timeouts, according to the number of clock interrupts remaining |
to their expiration and relatively to already listed timeouts.</para> |
|
<para>Timeouts can be unregistered via <code>timeout_unregister()</code>. |
This function can, as opposed to <code>timeout_register()</code>, fail when |
<para>Timeouts can be unregistered via <code>timeout_unregister</code>. |
This function can, as opposed to <code>timeout_register</code>, fail when |
it is too late to remove the timeout from the list of active |
timeouts.</para> |
|
107,11 → 107,11 |
</section> |
|
<section> |
<title>Generic clock interrupt handler</title> |
<title>Generic Clock Interrupt Handler</title> |
|
<para>On each clock interrupt, the architecture specific part of the clock |
interrupt handler makes a call to the generic clock interrupt handler |
implemented by the <code>clock()</code> function. The generic handler takes |
implemented by the <code>clock</code> function. The generic handler takes |
care of several mission critical goals:</para> |
|
<itemizedlist> |
128,7 → 128,7 |
</listitem> |
</itemizedlist> |
|
<para>The <code>clock()</code> function checks for expired timeouts and |
<para>The <code>clock</code> function checks for expired timeouts and |
decrements unexpired timeout expiration counters exactly one more times |
than is the number of missed clock signals (i.e. at least once and |
possibly more times, depending on the missed clock signals counter). The |
141,7 → 141,7 |
</section> |
|
<section> |
<title>Time source for userspace</title> |
<title>Time Source for Userspace</title> |
|
<para>In HelenOS, userspace tasks don't communicate with the kernel in |
order to read the system time. Instead, a mechanism that shares kernel |