 |
Linux Threads Home Page: How do Linux Threads compare with other OSs'?
How do Linux Threads compare with other OSs'?
NOTES:
- Linux kernel-space threads are
processes and are not handled differently from fork'ed tasks (unlike most
other multithreaded OS's). Therefore, process scheduling, cancelling, suspending,
etc. is controlled via signals.
- Posix and Solaris link thread
priorities with mutexes and use the priority of a blocked thread's mutex
to alter the priority of the blocking thread. Win32 and Linux let the scheduler
determine what thread to elevate in priority.
- Solaris strangeness. Not applicable to most
other OS's.
- Signals are received on a per-thread
basis, but threads share signal handlers for a given signal.
- Posix specifies no functionality
for suspending and resuming threads. Solaris implements it because they
need it: the program can change certain thread's attributes unless it is
suspended.
- Multiprocessor systems only.
- Win32 has no direct equivalent to unix's
fork() system call, but you can fake it with the CreateProcess() and CreateRemoteProcess()
calls [and a little luck].
- SIGIO and SIGALARM are multiplexed.
- There is a function "nthread_self()"
to get the ID of the calling thread.
- You can specify how much user-level
threads you will use at once. The number of kernel-level threads (i.e.
concurrency level) is then determined as min([max number of threads to
use],[number of available processors]).
|