Home :: International :: Manuals :: Howto :: FAQ :: Man Pages :: Email Login

 
 

 

How do Linux Threads compare with other OSs'?

FeaturePosixSolarisWin32Linux
KernelBBCLDCEFSUJKLtLWPNtPCtPtQtRex
User-/Kernel-spacen/aK&UKKKK?UKKUUUUUU
CancellationX--X-XXX--
Priority Scheduling[1]XXXX--XX--
Priority InversionHandling [2]XXX?------
Mutex AttributesXX-?-XX---
Shared and PrivateMutexesXX-?------
Thread AttributesXX-X-XXX--
SynchronizationXXXX-XXXX-
Stack Size ControlXXXXXX-XX-
Base Address Control[3]XX-n/a-X----
Detached ThreadsXX-XXXX---
Joinable ThreadsXX-X-XX-X-
Per-ThreadData Handling FunctionsXXXX-XXX--
Per-Thread SignalHandlingXXXXXXX[4]X[8]X[4]-
Condition VariablesXX??-XX-X-
SemaphoresXXXX---XX-
Thread ID ComparisonXX-X--XXX[9]-
Call-Once FunctionsXX-X--X?--
Thread Suspension[5]-XXX--XX--
Specifying Concurrency-XX[6]-----X[10]-
Readers/WriterShare Locking [3]-X--------
Processor-specificThread Allocation--X-------
Fork All Threads[7]-X-X---X--
Fork CallingThread Only [7]XX-?--X-X-

NOTES:

  1. 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.
  2. 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.
  3. Solaris strangeness. Not applicable to mostother OS's.
  4. Signals are received on a per-threadbasis, but threads share signal handlers for a given signal.
  5. 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.
  6. Multiprocessor systems only.
  7. 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].
  8. SIGIO and SIGALARM are multiplexed.
  9. There is a function "nthread_self()"to get the ID of the calling thread.
  10. 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]).


[Left Arrow]

[Home]

[Book Search]

[Mailbox]

[Right Arrow]

[Previous Page][First Page][Dictionary][Email Author][Next Page]
 
 
 
 
Google
  Web Linuxinfor   
 

Home :: Copyright :: Privacy :: Credits :: Get a free Linuxinfor Email Account

Document on this page is part of "Linux Threads Home Page". See Index Page for more info about Authorship and Copyright.

1999-2008 Linuxinfor.com. No rights reserved.