Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CPU usage - programmers perspective 1

Status
Not open for further replies.

Hondy

Technical User
Mar 3, 2003
864
GB
Hi

I hope this is aimed at the correct people.

Can anyone tell me if an old program which looks like an old 16-bit app is likely to make use of multi-core CPUs?

I mean will running the app on a 2.4GHz quad core have any benefit over a 3.8GHz single core. Being an old app is it going to make use of the multi-core CPU or is it going to run on only one of the cores? Or doesn't this matter at all and more cores = more speed?

i.e. What would be the benefit of running the 16 bit app on a dual quad core server (i.e. 2 quad cores, meaning 8 cores)

Would it run on 1 of the 8 cores or would it be ridiculously fast and run on all 8 because it doesn't know what CPU to bind to?

Thanks!



 
When using multiple cores (or multiple cpu's), each thread is being assigned a core (cpu) to run on when the thread is started. Once assigned a core, there is no way to change it. Also, one thread will not run on multiple cores.

But that does not mean that a single-threaded application does not benefit at all: Half (dual core) or 3/4 (quad core) of the other threads competing for cpu-time run at the other core.


Marcel
 
ok, i see what you are saying. How do you know how many threads an application will spawn, can it be measured?

Does this mean then that a single core can only handle one thread at a time? So pretty much all of the time, more cores are better?

thanks Marcel
 
Task Manager can show the number of threads per process. On the "Processes" page, choose "View" --> "Select columns" and check "Number of threads" (I guess it is something like that, on my Dutch system it is: On the "Processen" page, choose "Beeld" --> "Kolommen selecteren ..." and check "Aantal threads")

Marcel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top