Re: looking for info on kernel_thread

Stephen C. Tweedie (sct@redhat.com)
Wed, 14 Apr 1999 21:04:07 +0100 (BST)


Hi,

On Tue, 13 Apr 1999 13:04:29 -0500, pwhiting@fury.ittc.ukans.edu said:

> Thanks for the answer on preemptiveness. In retrospect (now that
> I have the answer) I realize it was probably a dumb question. Where
> is the best source of information on kernel threads?

That's because they just look like any other process/thread. They just
execute forever in kernel mode (as if they were in a never-ending system
call), so they don't need any user-mode address space. There is no
other difference.

> There isn't much discussion of them in the source code. I am
> interested in how they are scheduled - it appears they are running at
> a very high priority.

No, they are scheduled just like any other process. Some kernel threads
might artificially raise their priority, but user processes can do the
same too.

> It also appears that they are normal processes in the view of the
> scheduler as I can not see any special code to handle them in
> kernel/sched.c. Am I free to alter the priority of a kernel thread?

Sure!

--Stephen

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/