Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Jan 2006 09:14:54 -0800
From:      Julian Elischer <julian@elischer.org>
To:        Scott Long <scottl@samsco.org>
Cc:        freebsd-hackers@freebsd.org, Pranav Peshwe <pranavpeshwe@gmail.com>
Subject:   Re: Difference between a kthread and an ordinary process.
Message-ID:  <43D6608E.6060506@elischer.org>
In-Reply-To: <43D63F5F.9080203@samsco.org>
References:  <cdfd7d6d0601240121l3a58bf1cg29b608f178bb1098@mail.gmail.com> <43D63F5F.9080203@samsco.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Scott Long wrote:

> Pranav Peshwe wrote:
>
>> Hello,
>>          When a kthread is created using the kthread_create (9)
>> function, i found out that a new instance of struct proc is created
>> and allocated for the thread just as in case of a creation of a new
>> process.Also, the thread is assigned a pid as in the case of a
>> process.
>>   What is the difference between a kernel thread and a normal process
>> created using fork ? except the address space sharing with swapper and
>> kernel mode execution of the kthread. Is a kthread effectively just a
>> process always running in kernel mode ?
>>
>
> That is exactly what a kthread is.  There is some work in process to 
> make them true threads within one or more processes.
>

see http://www.freebsd.org/~julian/kthread.diff

> Scott
> _______________________________________________
> freebsd-hackers@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to 
> "freebsd-hackers-unsubscribe@freebsd.org"




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?43D6608E.6060506>