From owner-freebsd-current Mon May 27 23:40:16 2002 Delivered-To: freebsd-current@freebsd.org Received: from rwcrmhc53.attbi.com (rwcrmhc53.attbi.com [204.127.198.39]) by hub.freebsd.org (Postfix) with ESMTP id AEEE437B403 for ; Mon, 27 May 2002 23:40:11 -0700 (PDT) Received: from InterJet.elischer.org ([12.232.206.8]) by rwcrmhc53.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020528064011.XMV11659.rwcrmhc53.attbi.com@InterJet.elischer.org>; Tue, 28 May 2002 06:40:11 +0000 Received: from localhost (localhost.elischer.org [127.0.0.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id XAA09888; Mon, 27 May 2002 23:34:00 -0700 (PDT) Date: Mon, 27 May 2002 23:33:59 -0700 (PDT) From: Julian Elischer To: kai ouyang Cc: current@FreeBSD.org Subject: Re: why change: from proc to thread? In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, 27 May 2002, kai ouyang wrote: > Hi,everybody > I found many v_operations, such as VOP_UNLOCK, VOP_OPEN....., there > all have a parameter(struct proc) in FreeBSD4.x, but, there all be > changed to thread in FreeBSD5.0. why? And what relation of the proc > and thread ? > Thank you! > FreeBSD is plannig on supporting threads at a kernel level. To do this, the basic scheduling element becomes the thread instead of the process. For this reason, for example, locks must be held by threads instead of processes, and contexts are owned by threads instead of processes. This means that most functions will need a thread pointer instead of a process pointer. The "process" becomes basically an accounting abstraction and the holder of resources, where most of the kernel is more interested in the thread. Each process has at least one thread, possibly many. Each thread is associated with exactly one process. julian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message