Community
cancel
Showing results for 
Search instead for 
Did you mean: 
vipinco2003
Beginner
50 Views

multicore programming

How a system written for single core architecture can take performance gain when run on a multicore platform?
0 Kudos
2 Replies
jimdempseyatthecove
Black Belt
50 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

Dmitry_Vyukov
Valued Contributor I
50 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 :)

Reply