Re:why change: from proc to thread?

2002-05-29 Thread Julian Elischer

kthreads are not threads, but, rather, kernel processes..
they have a separate 'proc' structure.
(they are badly named..)


On Wed, 29 May 2002, kai ouyang wrote:

 
 Thank you! I know a little more. From the kthread_create() function, I
 find Both 4.x and 5.0 are implemented by fork1(). I am puzzled about
 the structure thread and the structure proc only are different terms.
 How or what part source code can I find the difference thread
 realization between 4.x and 5.0?
 


To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re:why change: from proc to thread?

2002-05-28 Thread kai ouyang
 Thank you! I know a little more. From the kthread_create() function, I find Both 4.x and 5.0 are implemented by fork1(). I am puzzled about the structure thread and the structure proc only are different terms. How or what part source code can I find the difference thread realization between 4.x and 5.0?  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 theprocess. For this reason, for example, locks must be held by threadsinstead of processes, and contexts are owned by threads instead ofprocesses. This means that most functions will need a thread pointerinstead of a process pointer. The "process" becomes basically anaccounting abstraction and the holder of resources, where most of thekernel is more interested in the thread.Each process has at least one thread, possibly many. Each thread isassociated with exactly one process.julian´ÓÍøÕ¾µÃµ½¸ü¶àÐÅÏ¢¡£MSN Explorer Ãâ·ÑÏÂÔØ£ºhttp://explorer.msn.com/lccn


Re:why change: from proc to thread?

2002-05-28 Thread kai ouyang
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 theprocess. For this reason, for example, locks must be held by threadsinstead of processes, and contexts are owned by threads instead ofprocesses. This means that most functions will need a thread pointerinstead of a process pointer. The "process" becomes basically anaccounting abstraction and the holder of resources, where most of thekernel is more interested in the thread.Each process has at least one thread, possibly many. Each thread isassociated with exactly one process.julian´ÓÍøÕ¾µÃµ½¸ü¶àÐÅÏ¢¡£MSN Explorer Ãâ·ÑÏÂÔØ£ºhttp://explorer.msn.com/lccn