From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 24 17:15:00 2006 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7303716A41F for ; Tue, 24 Jan 2006 17:15:00 +0000 (GMT) (envelope-from julian@elischer.org) Received: from a50.ironport.com (a50.ironport.com [63.251.108.112]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5833643D66 for ; Tue, 24 Jan 2006 17:14:58 +0000 (GMT) (envelope-from julian@elischer.org) Received: from unknown (HELO [192.168.2.4]) ([10.251.60.68]) by a50.ironport.com with ESMTP; 24 Jan 2006 09:14:57 -0800 X-IronPort-Anti-Spam-Filtered: true Message-ID: <43D6608E.6060506@elischer.org> Date: Tue, 24 Jan 2006 09:14:54 -0800 From: Julian Elischer User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.11) Gecko/20050727 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Scott Long References: <43D63F5F.9080203@samsco.org> In-Reply-To: <43D63F5F.9080203@samsco.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, Pranav Peshwe Subject: Re: Difference between a kthread and an ordinary process. X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Jan 2006 17:15:00 -0000 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"