Date: Mon, 27 May 2002 23:33:59 -0700 (PDT) From: Julian Elischer <julian@elischer.org> To: kai ouyang <oykai@msn.com> Cc: current@FreeBSD.org Subject: Re: why change: from proc to thread? Message-ID: <Pine.BSF.4.21.0205272329400.8764-100000@InterJet.elischer.org> In-Reply-To: <OE1048drPCbVpC9goDt000037e6@hotmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0205272329400.8764-100000>