Date: Mon, 27 Nov 2000 17:10:31 -0500 From: David Petrou <dpetrou@cs.cmu.edu> To: freebsd-questions@freebsd.org, freebsd-hackers@freebsd.org Subject: thread model questions Message-ID: <20001127171031.D417@auchroisk.pdl.cs.cmu.edu>
next in thread | raw e-mail | index | archive | help
hi. i've searched the handbook, tutorial, FAQ, and parts of the mailing list archives but haven't found direct answers to the following questions. i hope you don't mind answering them for me; it will save me a lot of time looking through the code, and / or writing test cases: let's say i'm running 4.x-stable. 1. if i use the pthreads interface, is each thread a process that happens to share the same addr space (like linux), or are all the threads part of the same single process (same PID)? 2. is the threading preemptive? or do i have to explicitly yield? 3. if preemptive, does that occur at user-level, or by the kernel? (and how costly is it?) 4. if one thread makes a system call that could block for some time, will another thread be automatically chosen? or will the whole collection of threads sleep until the call returns? 5. if i signal a particular thread, is the signal delivered to one thread or to all the threads in the process? 6. if a thread or process (terminology sucks) enters the kernel, can the scheduler preempt it and select another thread / process to run? (q.v., what many people call having kernel threads.) or will that process / thread dominate the system until it voluntarily relinquishes the processor? 7. are there other threads interfaces besides pthreads that i should be aware of? what are the differences? e.g., assuming freebsd supports a clone()-like interface, do some threads packages use it while others do as much as they can without kernel support? i'm probably forgetting some questions, but these are the bulk. i'm just wondering what the current thread model is as i contemplate moving my development to FreeBSD. thanks, david p.s.: please include me in any responses as i'm not subscribed to FreeBSD lists at the moment. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001127171031.D417>