Intel® Moderncode for Parallel Architectures
Support for developing parallel programming applications on Intel® Architecture.

multicore programming

vipinco2003
Beginner
528 Views
How a system written for single core architecture can take performance gain when run on a multicore platform?
0 Kudos
2 Replies
jimdempseyatthecove
Honored Contributor III
528 Views

Any system consists of an operating system plus system utilities and user application programs.

Most recent operating systems support multi-processor and multi-core platforms. Windows XP will support two processors, each with multiple cores. Similar with Linux and Mac operating systems.

A user system, even with applications written for single core (single processor) environment, will experience benefits from running on a multi-core system. This is due to the fact that the operating system can schedule different utilities, driver activities and different applications to run concurrently on the number of available cores. An example would be burning a music CD while browsing the internet and/or downloading updates from the internet.

Jim Dempsey

0 Kudos
Dmitry_Vyukov
Valued Contributor I
528 Views
vipinco2003:
How a system written for single core architecture can take performance gain when run on a multicore platform?


If program uses multiple threads (initially for blocking IO, or to simplify system structure, or to increase responsiveness etc), then it can take direct advantage of multicore. Threads will be just running in parallel.
But it's not so simple, many programs which uses multiple threads, but initially was written for single core, runs slower on multicore, not faster. And the way to fix it as simple as "SetProcessAffinity(GetCurrentProcess(), 1)". If it was written for single core, then let it be running on single core :)

Programs which uses only one thread unlikely can take advantage of multicore... However it depends.
And there is another moment. When I need to convert several video files, I just run 2 or 3 copies of inherently single-threaded video converter on my quad-core system, and I still have 1 idle core for browser :)

0 Kudos
Reply