Performance increase from a dual CPU Windows XP Pro system runningmultiple applications?

H

Howard R. Hansen

Earlier this year the question and answer shown at the end of this
message was posted in this news group. However, when I posted the
question and reply on Silicon Investor a knowledgeable reader said the
answer was wrong. The essence of his response was: "If you have two
CPUs, the two highest-priority ready threads are going to run
simultaneously - whether they are in the same application or different
applications." Right know because Windows XP Pro is a symmetric
multiprocessing operating system I believe the response posted in this
news group earlier this year was in error. "Symmetric multiprocessing
allows either system or user tasks to run on any processor."

Hence what is the correct answer? In a dual CPU system can Windows XP
Pro send one application program to one CPU, send a second application
program to the other CPU and run the two programs simultaneously?

Thanks in advance for your help, Howard


">Lets say you have two programs, neither of which are multithreaded. If
you have a dual processor system, will windows send the workload of
both of them to the same processor or is it smart enough to send them
separate processors?"

"Ahhh, No.
Windows will not send different programs to different CPUs. It WILL send
some of its own processes to the 2nd cpu, but it will not load program A to
CPU A, and program B to CPU B.
Sorry.

Harry"
 
N

Nik Simpson

Howard said:
Earlier this year the question and answer shown at the end of this
message was posted in this news group. However, when I posted the
question and reply on Silicon Investor a knowledgeable reader said
the answer was wrong.


Correct, the answer you recieved was wrong.

Hence what is the correct answer? In a dual CPU system can Windows XP
Pro send one application program to one CPU, send a second application
program to the other CPU and run the two programs simultaneously?

The correct answer is that both applications and the OS consist of one or
more threads, each thread has its own scheduling priority and state. The OS
maintains a table of the priority/state of all threads, i.e. ready to run,
waiting for I/O, blocked for synchronization etc. At each scheduling
interval (or if one the currently active threads is no longer able to run or
has used up its timeslice) the scheduler picks highest priority threads that
are ready to run and assigns them to CPUs. In the case of two single
threaded programs there is no reason why both could not be running
simultaneously on seperate processors, its simply a question of thread
priority and thread state.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top