Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. For each process, the Arachne module in kernel maintains a dynamically-sized kernel thread pool for each core in the system
    • The pool is initially empty and threads are created by need.
    • The new kernel threads are created using syscall `clone` with the starting function set to the Arachne main loop.
      • We do not need a different clone call because there is already a flag for indicating the type of thread in the existing mechanisms.
  2. When the kernel decides to allocate a core to a process, it takes one kernel thread from the corresponding pool and put it in the run queue
    • run queue is a per-cpu per-scheduling-class data structure

Q1: Can we have just one thread pool instead?

 

RELEASE A CORE VOLUNTARILY

...

Q5: Is the scheduling class going to be notified when threads are blocked on syscalls and woken?

The scheduling class interface Yes, the hook functions `dequeue_task` and `task_woken` of the `sched_class` is interface (defined at http://lxr.free-electrons.com/source/kernel/sched/sched.h?v=4.7#L1193. `dequeue_task` and `task_woken` h#L1193) will be called respectively when a task goes to sleep and when it's woken up.

SCHEDULING POLICIES IN KERNEL

...