From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <4f401b5e85e84529d735d843658353f5@plan9.bell-labs.com> From: "Russ Cox" To: 9fans@cse.psu.edu Subject: Re: [9fans] proccreate() and threadcreate()? MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Date: Tue, 4 Jun 2002 10:54:38 -0500 Topicbox-Message-UUID: a4bde38c-eaca-11e9-9e20-41e7f4b1d025 > It is a nive question. Will somebody tell me the differences > between proccreate() and threadcreate() functions? Programming > point of view both seem to behave exactly the same! Threads are arranged into procs. Threads within a proc are scheduled cooperatively whereas the procs are scheduled preemptively by the Plan 9 scheduler. Threadcreate makes a new thread in the same proc as the calling thread. Proccreate makes a new proc and starts a new thread running in it. The thread(2) man page describes this. For more information on threads and procs see the Alef User's Guide, linked at http://plan9.bell-labs.com/~rsc/thread.html#8 Russ