473,320 Members | 2,073 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Running software on Dual or Quad core CPU

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?

Thanks
harry

Feb 16 '07 #1
12 8747
"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

Feb 16 '07 #2
"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.
Feb 16 '07 #3
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.

Feb 16 '07 #4
On Feb 16, 9:04 am, "William LaMartin" <lamar...@tampabay.rr.com>
wrote:
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?
William,

Probably not. It sounds like the threads would spend an awful lot of
time in an idle state waiting for the IO complete. In this particular
example I'm skeptical that a multicore system would provide a
significant benefit.

But, in general a CPU intensive application written using more than
one thread could benefit from having more than one CPU.

Brian

Feb 16 '07 #5
"William LaMartin" <la******@tampabay.rr.comwrote in
news:ue**************@TK2MSFTNGP03.phx.gbl:
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.
Yes - long running processes should be done via Delegates or Worker
Threads.
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?
Yes - but 3 threads might be overkill ;-)

Multi-threading is application specific - I guess you have to analyze how
your application works to optimize it to it's fullest potential.
Feb 16 '07 #6
this is a pleasent thread; it makes me understand a little bit better.

I was of the understanding that they were going to have to go 'visual
fred' on us again in order to support multi-cores since this is what
all the large sites like cnet.com and thereqister.co.uk seems to imply

On Feb 16, 9:15 am, Spam Catcher <spamhoney...@rogers.comwrote:
"William LaMartin" <lamar...@tampabay.rr.comwrote innews:ue**************@TK2MSFTNGP03.phx.gbl:
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.

Yes - long running processes should be done via Delegates or Worker
Threads.
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?

Yes - but 3 threads might be overkill ;-)

Multi-threading is application specific - I guess you have to analyze how
your application works to optimize it to it's fullest potential.

Feb 16 '07 #7
pf******@hotmail.com wrote in news:1171659973.172705.202190
@j27g2000cwj.googlegroups.com:
I was of the understanding that they were going to have to go 'visual
fred' on us again in order to support multi-cores since this is what
all the large sites like cnet.com and thereqister.co.uk seems to imply
In a sense - because many developers lack the experience with multi-
threading, a lot of applications need to be re-written to take advantage of
multi-cores.

Multi-core cpus can distribute application instances across more than 1 CPU
automatically (Actually Window's Scheduler does that) - which means you can
run more applications at once. However, for an application to run faster,
it'll need to be multi-threaded.
Feb 17 '07 #8
Spam

can you plz expand on this more?

so.. if I launch a VB.net console app using a windows schedule
context; it is more capable of using multi-cores or processors??

On Feb 17, 2:52 am, Spam Catcher <spamhoney...@rogers.comwrote:
pfc_s...@hotmail.com wrote in news:1171659973.172705.202190
@j27g2000cwj.googlegroups.com:
I was of the understanding that they were going to have to go 'visual
fred' on us again in order to support multi-cores since this is what
all the large sites like cnet.com and thereqister.co.uk seems to imply

In a sense - because many developers lack the experience with multi-
threading, a lot of applications need to be re-written to take advantage of
multi-cores.

Multi-core cpus can distribute application instances across more than 1 CPU
automatically (Actually Window's Scheduler does that) - which means you can
run more applications at once. However, for an application to run faster,
it'll need to be multi-threaded.

Feb 19 '07 #9
On Feb 19, 4:33 pm, "PFC Sadr" <pfc_s...@hotmail.comwrote:
Spam

can you plz expand on this more?

so.. if I launch a VB.net console app using a windows schedule
context; it is more capable of using multi-cores or processors??
I think what spam meant was that a VB.NET (or VB 2005) application
(like any application) must make use of more than one thread to
realize the performance advantage of multicore processors. Windows
will automatically affinitize threads within processes so there's
nothing special required beyond making your application
multithreaded. It is important to note, however, that a poorly
implemented multithreaded application may not necessarily see a gain
in performance.

Feb 20 '07 #10
"Brian Gideon" <br*********@yahoo.comwrote in
news:11**********************@a75g2000cwd.googlegr oups.com:
On Feb 19, 4:33 pm, "PFC Sadr" <pfc_s...@hotmail.comwrote:
>Spam

can you plz expand on this more?

so.. if I launch a VB.net console app using a windows schedule
context; it is more capable of using multi-cores or processors??

I think what spam meant was that a VB.NET (or VB 2005) application
(like any application) must make use of more than one thread to
realize the performance advantage of multicore processors.
Yes exactly - for an application to be "faster" under multi-core it
needs to be multi-threaded.

However, that does not mean multi-core CPUs are useless for non-multi-
threaded applications. Windows has the ability to distribute different
applications (which are really threads) to different CPUs. So even if
the application is single threaded, it can run on one core, while
another application can run on a second core.
>Windows
will automatically affinitize threads within processes so there's
nothing special required beyond making your application
multithreaded. It is important to note, however, that a poorly
implemented multithreaded application may not necessarily see a gain
in performance.
I agree, using multi-threading in a wrong or incorrect fashion can cause
the application to act in an unpredicatable fashion (random crashes,
corrupted data, unreproducable results, etc.). Before implementing a
multi-threaded application, some cursory knowledge about how threading
works is useful (mandatory? :-)
Feb 20 '07 #11
PFC Sadr wrote:
Spam

can you plz expand on this more?

so.. if I launch a VB.net console app using a windows schedule
context; it is more capable of using multi-cores or processors??

On Feb 17, 2:52 am, Spam Catcher <spamhoney...@rogers.comwrote:
>pfc_s...@hotmail.com wrote in news:1171659973.172705.202190
@j27g2000cwj.googlegroups.com:
>>I was of the understanding that they were going to have to go 'visual
fred' on us again in order to support multi-cores since this is what
all the large sites like cnet.com and thereqister.co.uk seems to imply
In a sense - because many developers lack the experience with multi-
threading, a lot of applications need to be re-written to take advantage of
multi-cores.

Multi-core cpus can distribute application instances across more than 1 CPU
automatically (Actually Window's Scheduler does that) - which means you can
run more applications at once. However, for an application to run faster,
it'll need to be multi-threaded.

From what I recall, if you were to launch two instances of the
application, the scheduler can launch one instance on one cpu and the
other instance on the other cpu.

If you want that single instance to be multi-threaded, then you need to
write the application to be multi-threaded. VB.Net can do multi-threaded
applications with no problems. I do it all the time for background
processes.
Feb 20 '07 #12

"CodeMonkey" <sp******@suck.comwrote in message
news:%2***************@TK2MSFTNGP04.phx.gbl...
PFC Sadr wrote:
>Spam

can you plz expand on this more?

so.. if I launch a VB.net console app using a windows schedule
context; it is more capable of using multi-cores or processors??

On Feb 17, 2:52 am, Spam Catcher <spamhoney...@rogers.comwrote:
>>pfc_s...@hotmail.com wrote in news:1171659973.172705.202190
@j27g2000cwj.googlegroups.com:

I was of the understanding that they were going to have to go 'visual
fred' on us again in order to support multi-cores since this is what
all the large sites like cnet.com and thereqister.co.uk seems to imply
In a sense - because many developers lack the experience with multi-
threading, a lot of applications need to be re-written to take advantage
of
multi-cores.

Multi-core cpus can distribute application instances across more than 1
CPU
automatically (Actually Window's Scheduler does that) - which means you
can
run more applications at once. However, for an application to run
faster,
it'll need to be multi-threaded.


From what I recall, if you were to launch two instances of the
application, the scheduler can launch one instance on one cpu and the
other instance on the other cpu.

If you want that single instance to be multi-threaded, then you need to
write the application to be multi-threaded. VB.Net can do multi-threaded
applications with no problems. I do it all the time for background
processes.
In addition, the framework itself is multi-threaded to the extent that most
call backs (delegates) are run on a different thread.

Mike Ober.
Feb 20 '07 #13

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

25
by: John Gibson | last post by:
Hi, all. I need to upgrade my dual Xeon PostgreSQL engine. Assuming similar memory and disk sub-systems, I am considering a Quad Xeon system vs. a Dual Itanium for PostgreSQL. I believe that...
13
by: Pieter | last post by:
Hi, Maybe a little bit off-topic, but it still seemd the best place to ask for it :-) I'm planning to buy a new development laptop, and I would like to buy an AMD, Dual Core,-bit But none of...
23
by: Simon Wittber | last post by:
I've just bought a new notebook, which has a dual core CPU. I write cross platform games in Python, and I'd really like to be able to use this second core (on my machine, and on user's machines)...
5
by: robert | last post by:
Simple Python code obviously cannot use the dual core by Python threads. Yet, a program drawing CPU mainly for matrix computations - preferably with Numeric/SciPy - will this profit from a dual...
7
by: kunal | last post by:
Hello Friends, I am facing a strange problem which i would like to share with you people and get ur ideas and knowledge about it. Whenever i try to run a C++ program after successfully compiling i...
8
by: Andy | last post by:
Hi guys, I'm sorry, I'm not sure this is the correct group to be asking this kind of question... I'm going to develop a software package that includes a web server (and PHP code) , a...
4
by: jim-on-linux | last post by:
Python help, I have a number of clients running a program built with python 2.5. One has just purchased an HP with a duel core processor, 2.2G with .099g ram. On the new hp, when they try...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.