From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 24 09:22: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 5F4A516A41F for ; Tue, 24 Jan 2006 09:22:00 +0000 (GMT) (envelope-from pranavpeshwe@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.207]) by mx1.FreeBSD.org (Postfix) with ESMTP id C34AB43D49 for ; Tue, 24 Jan 2006 09:21:59 +0000 (GMT) (envelope-from pranavpeshwe@gmail.com) Received: by wproxy.gmail.com with SMTP id i31so1091361wra for ; Tue, 24 Jan 2006 01:21:59 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=KT/UDB3MPkrHlMX9Wi0B2p3VEWp8Ll9qnHQTaPMK3CspQ/b9P6HZqbZO89IWjJOabEiGMDhWiQgAtlA3knUpYlLuqSbmmpZh5Sdb0P0vv+jyEKflyS+tEHmK0OFE9wqMhjhi57nNtaAf9JQCUt1K/opf7LM1HTmJn8gtN9HrgIM= Received: by 10.54.122.13 with SMTP id u13mr6836012wrc; Tue, 24 Jan 2006 01:21:59 -0800 (PST) Received: by 10.54.99.13 with HTTP; Tue, 24 Jan 2006 01:21:59 -0800 (PST) Message-ID: Date: Tue, 24 Jan 2006 14:51:59 +0530 From: Pranav Peshwe To: freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Subject: 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 09:22:00 -0000 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 ? TIA. Regards, Pranav.