████████  ██                   ██                                            ██████     ████████
 ██░░░░░░  ░██                  ░██                                           ░█░░░░██   ██░░░░░░██
░██        ░██  ██████    █████ ░██  ██ ███     ██  ██████   ██████  █████    ░█   ░██  ██      ░░
░█████████ ░██ ░░░░░░██  ██░░░██░██ ██ ░░██  █ ░██ ░░░░░░██ ░░██░░█ ██░░░██   ░██████  ░██
░░░░░░░░██ ░██  ███████ ░██  ░░ ░████   ░██ ███░██  ███████  ░██ ░ ░███████   ░█░░░░ ██░██    █████
       ░██ ░██ ██░░░░██ ░██   ██░██░██  ░████░████ ██░░░░██  ░██   ░██░░░░  ██░█    ░██░░██  ░░░░██
 ████████  ███░░████████░░█████ ░██░░██ ███░ ░░░██░░████████░███   ░░██████░██░███████  ░░████████
░░░░░░░░  ░░░  ░░░░░░░░  ░░░░░  ░░  ░░ ░░░    ░░░  ░░░░░░░░ ░░░     ░░░░░░ ░░ ░░░░░░░    ░░░░░░░░
            
 Mirrors for Slackware and some Slackware related projects.

 Server info/status page
Linux Threads Home Page: How do Linux Threads compare with other OSs'?

How do Linux Threads compare with other OSs'?

Feature Posix Solaris Win32 Linux
Kernel BB CL DCE FSU JK Lt LWP Nt PCt Pt Qt Rex
User-/Kernel-space n/a K&U K K K K ? U K K U U U U U U
Cancellation X - - X - X X X - -
Priority Scheduling [1] X X X X - - X X - -
Priority Inversion Handling [2] X X X ? - - - - - -
Mutex Attributes X X - ? - X X - - -
Shared and Private Mutexes X X - ? - - - - - -
Thread Attributes X X - X - X X X - -
Synchronization X X X X - X X X X -
Stack Size Control X X X X X X - X X -
Base Address Control [3] X X - n/a - X - - - -
Detached Threads X X - X X X X - - -
Joinable Threads X X - X - X X - X -
Per-Thread Data Handling Functions X X X X - X X X - -
Per-Thread Signal Handling X X X X X X X[4] X[8] X[4] -
Condition Variables X X ? ? - X X - X -
Semaphores X X X X - - - X X -
Thread ID Comparison X X - X - - X X X[9] -
Call-Once Functions X X - X - - X ? - -
Thread Suspension [5] - X X X - - X X - -
Specifying Concurrency - X X[6] - - - - - X[10] -
Readers/Writer Share Locking [3] - X - - - - - - - -
Processor-specific Thread Allocation - - X - - - - - - -
Fork All Threads [7] - X - X - - - X - -
Fork Calling Thread Only [7] X X - ? - - X - X -

NOTES:

  1. 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.
  2. 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.
  3. Solaris strangeness. Not applicable to most other OS's.
  4. Signals are received on a per-thread basis, but threads share signal handlers for a given signal.
  5. 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.
  6. Multiprocessor systems only.
  7. 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].
  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-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]).


[Left Arrow]

[Home]

[Book Search]

[Mailbox]

[Right Arrow]

[Previous Page] [First Page] [Dictionary] [Email Author] [Next Page]