|
|
How do Linux Threads compare with other OSs'? NOTES: - Linux kernel-space threads areprocesses and are not handled differently from fork'ed tasks (unlike mostother multithreaded OS's). Therefore, process scheduling, cancelling, suspending,etc. is controlled via signals.
- Posix and Solaris link threadpriorities with mutexes and use the priority of a blocked thread's mutexto alter the priority of the blocking thread. Win32 and Linux let the schedulerdetermine what thread to elevate in priority.
- Solaris strangeness. Not applicable to mostother OS's.
- Signals are received on a per-threadbasis, but threads share signal handlers for a given signal.
- Posix specifies no functionalityfor suspending and resuming threads. Solaris implements it because theyneed it: the program can change certain thread's attributes unless it issuspended.
- Multiprocessor systems only.
- Win32 has no direct equivalent to unix'sfork() 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-levelthreads you will use at once. The number of kernel-level threads (i.e.concurrency level) is then determined as min([max number of threads touse],[number of available processors]).
|