Integration Watch: A new twist on threads
November 15, 2008 —
(Page 1 of 3)
In 2004, Intel asked me to co-author a book for Intel Press on “Programming with Hyper-Threading Technology.” The resulting work was a comprehensive survey of parallel programming tools and APIs, with lots of how-to code and specific advice for programming on Intel hyperthreading chips. In the discussion of resource allocation, I presented numbers from my own investigations that supported the common wisdom regarding the optimal number of threads to use—namely, one thread per execution pipeline.
On hyperthreaded processors, as on today’s Core Duo chips, that meant two threads per processor. Similarly, on quad-core chips, the number would be four threads per processor. Using fewer threads leaves some processor resources to lie fallow while waiting for work; using more requires some threads to wait while others execute. So, a 1:1 mapping between threads and execution pipelines is just about perfect, both conceptually and in practice.
This ratio holds true if you’re writing parallel threads that keep the pipelines busy 100% of the time. In the dawning era of manycore processors, however, keeping many threads busy the whole time is a highly difficult task. What to do?
The answer, surprisingly, is to use smaller workloads, broken up over many more threads than there are pipelines. The overarching concept is that the smaller chunks of work can be scheduled for work whenever and however the OS scheduler dictates. If the scheduler is optimized for parallel work, it can load-balance very effectively with this approach, in a way that it could not with the older, 1:1 thread/processor assignments.
Consider a quad-core system. Under the classic approach, it would ideally support four threads of simultaneous execution. If one thread encountered a pause, however, its resources would lie unused until the pause ended. Another thread, working at 100%, could not offload work to the paused thread’s execution resources.
Now suppose the original workload had been broken up into more than four threads. Another thread could then be swapped in for the paused thread, and execution could continue apace. Situations in which there are more threads than pipelines can thus create the opportunity for load balancing.
Related Search Term(s): multicore, Intel
Share this link: http://sdt.bz/33046
Most Read Latest News Blog Resources
Taking enterprise architecture to the business side
Startup Corso is bringing out a cloud-based planning platform that ties into business plans
|
|
Top five apps to manage your workload
Web applications offer new ways to track your “to-do” lists
|
|
ComponentOne Releases a Collection of 40+ UI Widgets Powered by HTML5 and jQuery
ComponentOne has announced the 2012 release of Wijmo: a kit of UI widgets for HTML5 and jQuery development
|
|
Illumination Software Creator 4.2 adds 'Portal Blocks'
Radical Breeze today released version 4.2 of Illumination Software Creator for Linux, MacOS X and Windows
|
Taking enterprise architecture to the business side
Startup Corso is bringing out a cloud-based planning platform that ties into business plans
|
|
Top five apps to manage your workload
Web applications offer new ways to track your “to-do” lists
|
|
Not so fast when it comes to testing in the cloud
Developers face outsourcing, virtual lab management and mobile devices as obstacles
|
|
Xceed releases UX-focused suite for Microsoft’s WPF
"Blendables" helps match user experiences to developer visions
|
Are you at risk for burnout?
Burnout is a severe problem and it can strike at any time. Here's how to tell if you are nearing the edge.
|
|
Agility, mom, and apple pie
If we're to evaluate the state-of-the-art in software development, we should start with the values espoused in the Agile Manifesto.
|
|
RIM woos developers with free tablet
How do you get more apps ported to the BlackBerry PlayBook? By giving every developer a free tablet, of course!
|
|
GitHire: Use Headhunters to Find Your Perfect Programmer
Are you a hiring manager tired of scouring the job boards? Check out this new service that will find 5 people interested in your jobs.
|
The Hidden Costs of Software Licensing
Moving beyond paper-based software licensing to more flexible, software-based licensing is a business decision. There is a growing trend tow...
|
|
Case Study: You May Need a Development Mechanic
As a contractor for a major financial player in Germany, SOBEGE, a German-based consultancy specializing in embedded IT and web services, wa...
|
|
Ensuring Software Quality at a Major International Bank
One of the world’s leading international banks has adopted AgitarOne technology for delivering generated unit tests for their Java software...
|
|
Load Testing Adobe Flex Applications
Adobe Flex applications may be different from applications you’ve worked with before. For classic HTML web applications, the server does all...
|