Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 06 Feb 1997 15:13:01 -0800
From:      Julian Elischer <julian@whistle.com>
To:        Simon Shapiro <Shimon@i-Connect.Net>
Cc:        "Justin T. Gibbs" <gibbs@narnia.plutotech.com>, freebsd-hackers@freebsd.org, freebsd-scsi@freebsd.org
Subject:   Re: Contigious (spelling?) allocation in kernel
Message-ID:  <32FA657D.446B9B3D@whistle.com>
References:  <XFMail.970206131700.Shimon@i-Connect.Net>

next in thread | previous in thread | raw e-mail | index | archive | help
Simon Shapiro wrote:
> 

> All this brings me to another question.  How can I create another kernel
> thread?  What I am trying to do is have several execution threads in the
> kernel, each responsible for a given task.  All I see in the drivers I
> read so far is a single thread, associated wit hthe calling user process.
> Another thread is invoked by the interrupt handler.  I want a couple more.
> 
> One ugly way to do it is to have a ``daemon'' which makes a known system
> call (ioctl) which is never returned.  Aside from being ugly, it has a
> problem at boot time;  The daemon is not there until way after init has
> started.

you can use timeouts to get schedules kernel activity..
it's not a thread though. We don't really have kernl threads in a 
totally separate context however.

> 
> What I am after is something that could resemble the swapper.
> Linux has few of them and they become very handy.  Especially on an SMP
> machine.

well you could do what the swap daemon does.. it's started from the
kernel..
it's more a kernel PROCESS than a kernel thread.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?32FA657D.446B9B3D>