且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在双核或四核CPU上运行软件

更新时间:2023-02-27 11:37:16

"harry" <no@spam.thankswrote in message
news:Op****************@TK2MSFTNGP03.phx.gbl...
Just wondering, if one has Dual or Quad core CPU and one is running
multiple different programs, or multiple copies of the same program, does
the operating system (XP or 2003) run each individual program on seperate
cores? or does one need to do something when starting the programs on the
command line or through code to force them to run on seperate cores?

They could both use either cores and switch between while running. You don''t
need to do anything.

>
Thanks
harry



"Michael C" <no****@nospam.comwrote in
news:Od*************@TK2MSFTNGP05.phx.gbl:
They could both use either cores and switch between while running. You
don''t need to do anything.

Also the performance benefit of multiple cores really depends if there was
any multi-threading done to the application.


When you say multi-threading done to the application, do you simply mean
that within the program you start several different threads to accomplish
various things.

For example, I just wrote an application to go out on the Internet and
gather three pieces of information from a server. I had it do this in three
separate threads. Is this the type of thing that would benefit from more
than one core?

"Spam Catcher" <sp**********@rogers.comwrote in message
news:Xn**********************************@127.0.0. 1...
"Michael C" <no****@nospam.comwrote in
news:Od*************@TK2MSFTNGP05.phx.gbl:
>They could both use either cores and switch between while running. You
don''t need to do anything.


Also the performance benefit of multiple cores really depends if there was
any multi-threading done to the application.