On Fri, Nov 04, 2005 at 11:13:29 +0100, Oliver Korpilla wrote:
> Hello!
>
> I'm working on embedded projects, and am currently putting some of the
> more performance-critical stuff into kernel space.
>
> I did just wonder: Is there anything resembling a Linux process/thread
> or a VxWorks task in kernel space? Or this way round: Are there
> schedulable entities with priority able to run a function I supply.
There is nothing *LIKE* process/thread in kernel space. Process/thread
*DO* run kernel code.
a) Every task (process/thread -- schedulable entity) sometimes runs in
kernel space -- when executing a syscall.
b) There is nothing saying they ever have to return to userland.
c) There is even nothing saying that a task must have a userland.
Indeed, it does not.
d) "kernel threads", as they are called are created by call
kernel_thread (from inside kernel, usually module init function). It
takes a function to execute as an argument.
Additionally there are the tasklets, that you can use to schedule
_short_ function to run when possible.
> It's important that there no such constraints like "only one per cpu" or
> "one in the whole system".
There is no such constraint. There can be many kernel tasks and they
will be scheduled on whichever CPU is available.
--
Jan 'Bulb' Hudec <bulb@xxxxxx>
Attachment:
signature.asc
Description: Digital signature