The behavior of scheduler in L4Linux on ARM architecture

Sean sean0920 at gmail.com
Sat May 9 09:29:02 CEST 2009


Dear

Now I am studying the scheduler design issue of DROPS including Fiasco and
L4Linux.
In the reference document, "L4Linux Porting Optimizations", it said that

"   In an L4Linux system two schedulers are active. One is in the L4 kernel
scheduling all L4
threads including L4Linux processes. The L4 scheduler uses static priorities
and schedules
threads with the same priority round-robin.

    The other scheduler is in the Linux server, deciding which Linux process
to run next. L4Linux
is designed in a way that from the view of the Linux server multiple user
processes can be
running in the L4 system. Furthermore, the Linux scheduler can only consider
those processes
that are blocked in the server. Consequently, the Linux server needs to
distinguish between user
processes being served by the Linux server and the ones running."

For the behavior of the scheduler in L4Linux, I got some questions below.


   1. In L4Linux, the process/thread will map to several L4 Threads. How the
   scheduler in the Linux Server considers user processes in L4Linux whether to
   execute in L4 system ? According to the document, does L4Linux scheduler
   only control the user process whether block or not?

   2. Based on the L4Linux source code from currently SVN, the behavior of
   schedule() function (kernel/sched.c line 4546) is
   => If next != prev, call context_switch() function
   => In context_switch() function (kernel/sched.c Line 2649), it calls
   architecture dependent function switch_to()
   => In switch_to() function (arch/l4/include/asm/arch-arm/system.h Line
   222), it calls l4x_switch_to() function and   __switch_to() function
   => In l4x_switch_to() function (arch/l4/kernel/arch-arm/dispatch.c Line
   170), it logs the message to Trace Buffer of Fiasco and set
   l4x_current_process
   => In __switch_to() function (arch/l4/kernel/arch-arm/switch_to.S Line
   5), it store the registers to CPU context of thread_info and load all regs
   saved previously

   Based on the source code analysis, it seems that when the L4Linux
   scheduler decide to do the context switch, the architecture dependent
   function __switch_to() will do the register restore and load. According to
   the document, I think the behavior here should set the corresponding thread
   status of prev and next user process to block or unblock these L4 threads.
   But here it does low level register restore and reload operations to change
   the current running process directly. It confuses me. Can anyone give me any
   ideas to address this?


Thanks a lot!

Best Regards,
Sean
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://os.inf.tu-dresden.de/pipermail/l4-hackers/attachments/20090509/c50a7eff/attachment.html>


More information about the l4-hackers mailing list