From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <062cdd35803159da481404d97805739f@plan9.bell-labs.com> To: 9fans@cse.psu.edu Subject: Re: [9fans] proccreate() and threadcreate()? From: "rob pike, esq." MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Date: Tue, 4 Jun 2002 11:55:24 -0400 Topicbox-Message-UUID: a4c33a44-eaca-11e9-9e20-41e7f4b1d025 Sape should post his slides from this course, but this set has a section about how to use them you might find interesting. http://plan9.bell-labs.com/cm/cs/who/rob/lec5.pdf Meanwhile, you're right that the man page seems to have lost, if it ever had, a concise description of the relationship between procs and threads. They are mutually schedulable, but different: a proc represents a new process in the operating system that may block, for example in a read call, while other processes continue to run. Threads are coroutines within a proc; if a thread blocks in a system call, all threads in that proc also block. On the other hand, threads within a proc do not execute in parallel at the instruction level, so access to shared variables is safer between threads than procs. But see the slides above for a description of how to use them in practice. Also I believe the Acme paper has a description. -rob