microkernel icon indicating copy to clipboard operation
microkernel copied to clipboard

[kernel] Move Execution of Side Effect Kernel Calls to Dedicated Kernel Thread

Open ppenna opened this issue 9 months ago • 2 comments

Description

Nanvix embraces an asymmetric kernel design. That is, when a user-level thread invokes a kernel call, that call is dispatched for execution as follows:

  • If the kernel call does not have any side effects, it is executed by the underlying kernel thread that is associated to the user-level thread that made the call (local execution).
  • If the kernel call does have side effects, it is dispatched for execution on a dedicated kernel thread that handles side effect kernel calls (remote execution).

We should change or implementation to meet this design. Currently, our implementation runs all kernel calls locally.

What should be done?

  • Identify kernel calls that have side effects
  • Move execution of side effect kernel calls to handle_syscall()
  • Fix dispatch logic in do_kcall() accordingly

Related Files

https://github.com/nanvix/microkernel/blob/17de3a67c131a2085738cab7e28de2302918ceeb/src/kernel/kcall/mod.c

ppenna avatar May 03 '24 16:05 ppenna