Green Threads - Performance

Performance

On a multi-core processor, native thread implementations can automatically assign work to multiple processors, whereas green thread implementations normally cannot. Green threads can be started much faster on some VMs. On uniprocessor computers, however, the most efficient model has not yet been clearly determined. Benchmarks on computers running the (ancient) Linux kernel version 2.2 have shown that:

  • Green threads significantly outperform Linux native threads on thread activation and synchronization.
  • Linux native threads have slightly better performance on I/O and context switching operations.

When a green thread executes a blocking system call, not only is that thread blocked, but all of the threads within the process are blocked. To avoid that problem, green threads must use asynchronous I/O operations, although the increased complexity can be hidden by implementing separate native I/O processes which cooperate with green threads.

Read more about this topic:  Green Threads

Famous quotes containing the word performance:

    No performance is worth loss of geniality. ‘Tis a cruel price we pay for certain fancy goods called fine arts and philosophy.
    Ralph Waldo Emerson (1803–1882)

    When a book, any sort of book, reaches a certain intensity of artistic performance it becomes literature. That intensity may be a matter of style, situation, character, emotional tone, or idea, or half a dozen other things. It may also be a perfection of control over the movement of a story similar to the control a great pitcher has over the ball.
    Raymond Chandler (1888–1959)

    To vote is like the payment of a debt—a duty never to be neglected, if its performance is possible.
    Rutherford Birchard Hayes (1822–1893)