Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 May 2002 10:45:33 +0800
From:      "kai ouyang" <oykai@msn.com>
To:        "Julian Elischer" <julian@elischer.org>, <current@FreeBSD.org>
Subject:   Re:why change: from proc to thread?
Message-ID:  <OE79Dt82hZPuNoqRfH300007666@hotmail.com>

index | next in thread | raw e-mail

[-- Attachment #1 --]
Another problem:
  There are not the structure 'bio' in FreeBSD 4.x, but 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 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 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从网站得到更多信息。MSN Explorer 免费下载:http://explorer.msn.com/lccn

[-- Attachment #2 --]
<HTML><BODY STYLE="font:10pt verdana; border:none;"><DIV>Another problem:</DIV> <DIV>&nbsp; There are not the structure 'bio' in FreeBSD 4.x, but exist in 5.0. </DIV> <DIV>If I want to transfer some pseudo-device code from 4.x to 5.0, </DIV> <DIV>what rules about old 'buf' structure to the 'bio' structure?</DIV> <DIV>what relation of the 'bio' and 'buf' in FreeBSD5.0?</DIV> <DIV>Thank you!</DIV> <DIV>Best Regards</DIV> <DIV>&nbsp; Ouyang kai</DIV> <DIV>&nbsp;</DIV> <BLOCKQUOTE style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px"><BR>On Mon, 27 May 2002, kai ouyang wrote:<BR><BR>&gt; Hi,everybody<BR>&gt;&nbsp;&nbsp; I found many v_operations, such as VOP_UNLOCK, VOP_OPEN....., there<BR>&gt; all have a parameter(struct proc) in FreeBSD4.x, but, there all be<BR>&gt; changed to thread in FreeBSD5.0. why? And what relation of the proc<BR>&gt; and thread ?<BR>&gt;&nbsp;&nbsp; Thank you!<BR>&gt;<BR><BR>FreeBSD is plannig on supporting threads at a kernel level.<BR>To do this, the basic scheduling element becomes the thread instead of the<BR>process. For this reason, for example, locks must be held by threads<BR>instead of processes, and contexts are owned by threads instead of<BR>processes. This means that most functions will need a thread pointer<BR>instead of a process pointer. The "process" becomes basically an<BR>accounting abstraction and the holder of resources, where most of the<BR>kernel is more interested in the thread.<BR><BR>Each process has at least one thread, possibly many. Each thread is<BR>associated with exactly one process.<BR><BR><BR><BR>julian<BR><BR><BR></BLOCKQUOTE></BODY></HTML><br clear=all><hr>从网站得到更多信息。MSN Explorer 免费下载:<a href='http://explorer.msn.com/lccn'>http://explorer.msn.com/lccn</a><br></p>;
help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?OE79Dt82hZPuNoqRfH300007666>