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:
“To vote is like the payment of a debta duty never to be neglected, if its performance is possible.”
—Rutherford Birchard Hayes (18221893)
“There are people who think that wrestling is an ignoble sport. Wrestling is not sport, it is a spectacle, and it is no more ignoble to attend a wrestled performance of suffering than a performance of the sorrows of Arnolphe or Andromaque.”
—Roland Barthes (19151980)
“The audience is the most revered member of the theater. Without an audience there is no theater. Every technique learned by the actor, every curtain, every flat on the stage, every careful analysis by the director, every coordinated scene, is for the enjoyment of the audience. They are our guests, our evaluators, and the last spoke in the wheel which can then begin to roll. They make the performance meaningful.”
—Viola Spolin (b. 1911)