Changes between Version 6 and Version 7 of scheduler


Ignore:
Timestamp:
Aug 29, 2017, 3:20:12 PM (7 years ago)
Author:
alain
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • scheduler

    v6 v7  
    2121A thread generally enter in the BLOCKED state, when a given resource is not available, by calling the thread_block() function that set the relevant bit in the <blocked> bit-vector. It returns to the READY state when another thread releases the blocking resource, and call the thread_unblock() function, that reset the relevant bit. The thread_unblock() function can be called by any thread running in any cluster.
    2222
    23 This simple blocking / unblocking mechanism is well suited to the Multi-Kernel-Hybrid architecture, as it is uses simple remote_write accesses.
     23This simple blocking / unblocking mechanism is well suited to the Multi-Kernel-Hybrid architecture, as it uses simple local / remote_write accesses.
    2424
    2525== C) Scheduling policy ==
    2626
    27 Each scheduler maintains two separate, circular, lists of threads: one list of KERNEL threads, and one list of USER threads. A KERNEL threads have a higher priority than the USER threads, and each list is handled with a round-robin priority. When the sched_yield() function is called to perform a context switch for a given core, it implement the following policy:
     27Each scheduler maintains two separate, circular, lists of threads: one list of KERNEL threads, and one list of USER threads. The KERNEL threads have a higher priority than the USER threads, and each list is handled with a round-robin priority. When the sched_yield() function is called to perform a context switch for a given core, it implement the following policy:
    2828 1. It scan the KERNEL list to find a READY thread. It executes this KERNEL thread if found.
    2929 1. If no KERNEL thread is found, it scan the USER list to fin a READY thread. It executes this USER thread if found.
    30  1. If there is no KERNEL thread and no USER thread (other than the calling thread), the calling thread continues execution. if possible.
     30 1. If there is no KERNEL thread and no USER thread (other than the calling thread), the calling thread continues execution.
    3131 1. If there is no READY thread, it executes the IDLE thread.
    3232
    33 The kernel has the possibility to force the selection of a given thread, identified by the sched_yield() function argument. This is used to reduce the latency of the RPCs.
     33The kernel has the possibility to force the selection of a given thread, identified by the sched_yield() function argument. This is used to reduce the RPC latency, using an IPI (Inter-Processor-Interrupt) to force
     34a context switch on a given remote core, and force execution of the relevant RPC thread..
    3435
    3536== D. Delayed Context Switches ==