Threads and mulitcore processors.

Forum thread started by seagoat on Wed, 2012-01-18 22:28

I do not profess to be a either a hardware or software expert. I know Haiku is threaded OS. And I know when I run Haiku on my single core Atom there are two virtual cores. When AMD realised its "cheap" 6 core and then recently its "cheap" 8 core there was talk that most software couldn't make use of all those extra cores. But I am right in thinking that Haiku would just soak up (as needed) and exploit all that extra grunt because of its architecture. Not sure what you would do with all that extra power.

Comments

Not so much

I think Haiku provides all the low-level means for apps to scale by use of application threads, scheduled independently on different cores, that e.g. Linux, Windows and Mac OS X does. (I'm not sure if we have a core pinning facility yet, so as to avoid core hopping and its cache-related performance loss. But that's more of an optimization.)

On most platforms and in most programming languages you need to actively design applications to be multithreaded (or whatever other concept of concurrency is given), for the apps to be able to run concurrently on multicore processors. Haiku is no exception. I don't know of any silver bullet to concurrency. (But some say that functional programming languages lend themselves better to concurrency.) Many language support concurrency and provide APIs which are usually voluntary.

The Haiku API forces a dedicated thread per window shown, accompanie