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:
“The way to go to the circus, however, is with someone who has seen perhaps one theatrical performance before in his life and that in the High School hall.... The scales of sophistication are struck from your eyes and you see in the circus a gathering of men and women who are able to do things as a matter of course which you couldnt do if your life depended on it.”
—Robert Benchley (18891945)
“Tennis is more than just a sport. Its an art, like the ballet. Or like a performance in the theater. When I step on the court I feel like Anna Pavlova. Or like Adelina Patti. Or even like Sarah Bernhardt. I see the footlights in front of me. I hear the whisperings of the audience. I feel an icy shudder. Win or die! Now or never! Its the crisis of my life.”
—Bill Tilden (18931953)
“True balance requires assigning realistic performance expectations to each of our roles. True balance requires us to acknowledge that our performance in some areas is more important than in others. True balance demands that we determine what accomplishments give us honest satisfaction as well as what failures cause us intolerable grief.”
—Melinda M. Marshall (20th century)