139,10 → 139,10 |
thread exits, its kernel structure usually stays in memory, until the |
thread is detached by another thread using <code>thread_detach()</code> |
function. Terminated but undetached threads are in the |
<constant>Undead</constant> state. When the thread is detached or |
<constant>Lingering</constant> state. When the thread is detached or |
detaches itself during its life, it is destroyed in the |
<constant>Exiting</constant> state and the <constant>Undead</constant> |
state is not reached.<figure float="1"> |
<constant>Exiting</constant> state and the |
<constant>Lingering</constant> state is not reached.<figure float="1"> |
<title>Transitions among thread states.</title> |
|
<mediaobject id="thread_states" xreflabel=""> |
162,28 → 162,28 |
</formalpara> |
|
<formalpara> |
<title>Pseudo Threads</title> |
<title>Fibrils</title> |
|
<para>HelenOS userspace layer knows even smaller units of execution. |
Each userspace thread can make use of an arbitrary number of pseudo |
threads. These pseudo threads have their own synchronous register |
context, userspace code and stack. They live their own life within the |
userspace thread and the scheduler does not have any idea about them |
because they are completely implemented by the userspace library. This |
implies several things:<itemizedlist> |
Each userspace thread can make use of an arbitrary number of fibrils. |
These fibrils have their own synchronous register context, userspace |
code and stack. They live their own life within the userspace thread and |
the scheduler does not have any idea about them because they are |
completely implemented by the userspace library. This implies several |
things:<itemizedlist> |
<listitem> |
<para>pseudothreads schedule themselves cooperatively within the |
time slice given to their userspace thread,</para> |
<para>fibrils schedule themselves cooperatively within the time |
slice given to their userspace thread,</para> |
</listitem> |
|
<listitem> |
<para>pseudothreads share FPU context of their containing thread |
<para>fibrils share FPU context of their containing thread |
and</para> |
</listitem> |
|
<listitem> |
<para>all pseudothreads of one userspace thread block when one of |
them goes to sleep.</para> |
<para>all fibrils of one userspace thread block when one of them |
goes to sleep.</para> |
</listitem> |
</itemizedlist></para> |
</formalpara> |