From owner-freebsd-current Tue May 28 19:45:43 2002 Delivered-To: freebsd-current@freebsd.org Received: from hotmail.com (oe79.pav0.hotmail.com [64.4.33.221]) by hub.freebsd.org (Postfix) with ESMTP id 2535A37B405 for ; Tue, 28 May 2002 19:45:37 -0700 (PDT) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Tue, 28 May 2002 19:45:37 -0700 X-Originating-IP: [210.74.136.33] From: "kai ouyang" To: "Julian Elischer" , Subject: Re:why change: from proc to thread? Date: Wed, 29 May 2002 10:45:33 +0800 MIME-Version: 1.0 X-Mailer: MSN Explorer 7.00.0021.1900 Content-Type: multipart/alternative; boundary="----=_NextPart_001_0002_01C206FD.F536B150" Message-ID: X-OriginalArrivalTime: 29 May 2002 02:45:37.0117 (UTC) FILETIME=[E98338D0:01C206BA] 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 ------=_NextPart_001_0002_01C206FD.F536B150 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable Another problem: There are not the structure 'bio' in FreeBSD 4.x, but exist in 5.0. =20 If I want to transfer some pseudo-device code from 4.x to 5.0, =20 what rules about old 'buf' structure to the 'bio' structure? what relation of the 'bio' and 'buf' in FreeBSD5.0? Thank you! Best Regards Ouyang kai 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 th= e 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=B4=D3=CD=F8=D5=BE=B5=C3=B5=BD=B8=FC=B6=E0=D0=C5=CF=A2=A1=A3MSN Exp= lorer =C3=E2=B7=D1=CF=C2=D4=D8:http://explorer.msn.com/lccn ------=_NextPart_001_0002_01C206FD.F536B150 Content-Type: text/html; charset="gb2312" Content-Transfer-Encoding: quoted-printable
Another proble= m:
  There are not the structure 'bio' in FreeBSD 4.x, bu= t exist in 5.0.
If I want to transfer some pseudo-device code= from 4.x to 5.0,
what rules about old 'buf' structure to the= 'bio' structure?
what relation of the 'bio' and 'buf' in Free= BSD5.0?
Thank you!
Best Regards
  O= uyang kai
 

On Mon, 27 May 2002, kai ouyang wrote:

> H= i,everybody
>   I found many v_operations, such as VOP_UN= LOCK, VOP_OPEN....., there
> all have a parameter(struct proc) in F= reeBSD4.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 k= ernel level.
To do this, the basic scheduling element becomes the thre= ad instead of the
process. For this reason, for example, locks must be= held by threads
instead of processes, and contexts are owned by threa= ds instead of
processes. This means that most functions will need a th= read pointer
instead of a process pointer. The "process" becomes basic= ally an
accounting abstraction and the holder of resources, where most= of the
kernel is more interested in the thread.

Each process h= as at least one thread, possibly many. Each thread is
associated with = exactly one process.



julian




=B4=D3=CD=F8=D5=BE=B5=C3=B5=BD=B8=FC=B6=E0=D0= =C5=CF=A2=A1=A3MSN Explorer =C3=E2=B7=D1=CF=C2=D4=D8=A3=BAhttp://explorer.msn.com/lccn

------=_NextPart_001_0002_01C206FD.F536B150-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message