Subversion Repositories HelenOS-doc

Rev

Rev 75 | Rev 77 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 75 Rev 76
Line 35... Line 35...
35
      <listitem>
35
      <listitem>
36
        <para>memory management context.</para>
36
        <para>memory management context.</para>
37
      </listitem>
37
      </listitem>
38
    </itemizedlist>
38
    </itemizedlist>
39
 
39
 
40
    <para>The most narrow sence refers to the the synchronous register
40
    <para>The most narrow sense refers to the the synchronous register
41
    context. It includes all the preserved registers as defined by the
41
    context. It includes all the preserved registers as defined by the
42
    architecture. To highlight some, the program counter and stack pointer
42
    architecture. To highlight some, the program counter and stack pointer
43
    take part in the synchronous register context. These are the registers
43
    take part in the synchronous register context. These registers must be
44
    that must be preserved across a procedure call and during synchronous
44
    preserved across a procedure call and during synchronous context
45
    context switches.</para>
45
    switches.</para>
46
 
46
 
47
    <para>The next type of the context understood by the kernel is the
47
    <para>The next type of the context understood by the kernel is the
48
    asynchronous register context. On an interrupt, the interrupted execution
48
    asynchronous register context. On an interrupt, the interrupted execution
49
    flow's state must be guaranteed to be eventually completely restored.
49
    flow's state must be guaranteed to be eventually completely restored.
50
    Therefore the interrupt context includes, among other things, the scratch
50
    Therefore the interrupt context includes, among other things, the scratch
Line 253... Line 253...
253
      <title>Processor load balancing</title>
253
      <title>Processor load balancing</title>
254
 
254
 
255
      <para>Normally, for the sake of cache locality, threads are scheduled on
255
      <para>Normally, for the sake of cache locality, threads are scheduled on
256
      one of the processors and don't leave it. Nevertheless, a situation in
256
      one of the processors and don't leave it. Nevertheless, a situation in
257
      which one processor is heavily overloaded while others sit idle can
257
      which one processor is heavily overloaded while others sit idle can
258
      occur. HelenOS deploys special kernel threads to help to mitigate this
258
      occur. HelenOS deploys special kernel threads to help mitigate this
259
      problem. Each processor is associated with one load balancing thread
259
      problem. Each processor is associated with one load balancing thread
260
      called <code>kcpulb</code> that wakes up regularily to see whether its
260
      called <code>kcpulb</code> that wakes up regularly to see whether its
261
      processor is underbalanced or not. If yes, the thread attempts to
261
      processor is underbalanced or not. If it is, the thread attempts to
262
      migrate threads from other overloaded processors to its own processor's
262
      migrate threads from other overloaded processors to its own processor's
263
      run queues. When the job is done or there is no need for load balancing,
263
      run queues. When the job is done or there is no need for load balancing,
264
      the thread goes to sleep.</para>
264
      the thread goes to sleep.</para>
265
 
265
 
266
      <para>The balancing threads operate very gently and try to migrate low
266
      <para>The balancing threads operate very gently and try to migrate low