If a multithreaded .NET application is executed on a computer with a
multicore processor. Will the application automatically run the threads on
different processor cores?
Regards Carl Johansson 9 1330
Carl Johansson wrote:
If a multithreaded .NET application is executed on a computer with a
multicore processor. Will the application automatically run the
threads on different processor cores?
The question is not stupid but the subject line is. Use a meaningful
subject line in the future.
And the answer is 'yes' (but not guaranteed to do so if the system is busy
with other programs).
>
Regards Carl Johansson
On Nov 17, 11:23*am, "Carl Johansson"
<carl.johans...@nogarbagehallde.comwrote:
If a multithreaded .NET application is executed on a computer with a
multicore processor. Will the application automatically run the threads on
different processor cores?
Regards Carl Johansson
Hi,
In theory that depends of the OS and in the case of .NET also of the
VM. It's the OS's schedule the one that select which process run
where. Potentially you can assure that the answer is yes, but it
depends of the other process running in the machine.
Carl Johansson wrote:
If a multithreaded .NET application is executed on a computer with a
multicore processor. Will the application automatically run the threads on
different processor cores?
Yes.
And you can prove it my making a simple "variable threaded"
code and show that it runs almost twice as fast with 2 threads
as with 1 thread.
Arne
"Carl Johansson" <ca************@nogarbagehallde.comwrote:
> If a multithreaded .NET application is executed on a computer with a multicore processor. Will the application automatically run the threads on different processor cores?
You've had 3 different replies here, and the correct response is more or
less a combination of them all.
The operating system maintains a big list of "ready to run" threads. When
any processor or core needs something to do, it picks the first thread in
that list (glossing over the details of priority and affinity).
Neither the system nor the processors care whether the threads are part of
one process or multiple processes. They're just threads. If your process
has 4 threads, and those 4 threads are the top 4 on the "ready-to-run"
list, then you'll own all 4 cores. If you have other processes running,
then you're probably sharing the cores with threads from those other
processes.
--
Tim Roberts, ti**@probo.com
Providenza & Boekelheide, Inc.
"Peter Duniho" <Np*********@nnowslpianmk.comskrev i meddelandet
news:op***************@petes-computer.local...
_We_ don't care so much whether you use an appropriate subject line, but
_you_ should care very much because posts with stupid subject lines often
just get ignored. There are also issues related to how your post makes
the best contribution to the community, in that it provides an
easily-searched item in an archive, but that's really secondary to your
own self-interest in having your question answered.
Using a search engine, such as "Google Groups", I guarantee that anyone
interested in threads and multicore processors will find my post, even
though the choice of subject line was unfitting.
I thought it was obvious that Ben's reply to my question as well as his
suggestion to use a meaningful subject line was very much appreciated.
I don't think of myself as overly sensitive. It's just that I was brought up
to use the word "please", regardless of context. Perhaps I'm getting old...
So, take the advice or leave it, but don't waste time getting offended by
the way it was given (and again, that's not a request; it's a suggestion
meant to help _you_).
Instead of using all those words ("and again, that's not a request; it's a
suggestion meant to help _you_"), I would simply have used the word
"please" to make the same point. That is: "So, please take the advice or
leave it, but please don't waste time getting offended by
the way it was given".
I'm sorry if I made you upset! Please let's focus on computer programming
from here on!
Regards Carl Johansson
Peter Duniho wrote:
On Wed, 19 Nov 2008 13:04:25 -0800, Carl Johansson
<ca**@forenamelastname.stwrote:
>[...] There are also issues related to how your post makes
>>the best contribution to the community, in that it provides an easily-searched item in an archive, but that's really secondary to your own self-interest in having your question answered.
Using a search engine, such as "Google Groups", I guarantee that anyone interested in threads and multicore processors will find my post, even though the choice of subject line was unfitting.
I'm not sure why you are choosing to debate a minor point, one I
clearly stated was secondary to your own self-interests. But since
you insist...
So when speaking to Carl, we'll include the following disclaimer at the top
of every post:
"Carl, if you want to fix your problem, please take the following actions:"
Then we can use the imperative throughout the rest of the message.
Ok, you can stop hyperventilating, you win!
Now, pretty please, with sugar on top, can we continue our focus on computer
programming!?
Regards Carl Johansson
"Peter Duniho" <Np*********@nnowslpianmk.comskrev i meddelandet
news:op***************@petes-computer.local...
On Wed, 19 Nov 2008 13:04:25 -0800, Carl Johansson
<ca**@forenamelastname.stwrote:
>Using a search engine, such as "Google Groups", I guarantee that anyone interested in threads and multicore processors will find my post, even though the choice of subject line was unfitting.
I'm not sure why you are choosing to debate a minor point, one I clearly
stated was secondary to your own self-interests. But since you insist...
[...]
On Thu, 20 Nov 2008 04:16:27 -0800, Carl Johansson
<ca**@forenamelastname.stwrote:
Ok, you can stop hyperventilating, you win!
For someone who is so concerned about being polite, you sure have an odd
habit of describing others in arbitrarily negative ways. Is that also a
consequence of how you were "brought up", or because you're "getting old"?
Now, pretty please, with sugar on top, can we continue our focus on
computer
programming!?
We have always been willing to maintain that focus, being side-tracked
only when others such as yourself insist.
Pete
Please!
"Peter Duniho" <Np*********@nnowslpianmk.comskrev i meddelandet
news:op***************@petes-computer.local...
On Thu, 20 Nov 2008 04:16:27 -0800, Carl Johansson
<ca**@forenamelastname.stwrote:
>Ok, you can stop hyperventilating, you win!
For someone who is so concerned about being polite, you sure have an odd
habit of describing others in arbitrarily negative ways. Is that also a
consequence of how you were "brought up", or because you're "getting old"?
>Now, pretty please, with sugar on top, can we continue our focus on computer programming!?
We have always been willing to maintain that focus, being side-tracked
only when others such as yourself insist.
Pete
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: rhat |
last post by:
I heard that beta 2 now makes ASP.NET xhtml compliant.
Can anyone shed some light on what this will change and it will break stuff
as converting HTML to XHTML pages DO break things. see,...
|
by: raz |
last post by:
Greetings all.
I apologize for what is almost certainly a stupid question, but I
can't figure this out, and have no more time for head bashing...
The short version: what is the appropriate...
|
by: IS |
last post by:
At the recommendation of several people in this newsgroup I have downloaded
two or three Compilers. One is the Beta version of Microsoft's Visual C++
2005.
I have entered a complete beginner code...
|
by: Ron Weldy |
last post by:
I read that you don't need .cs files to deploy but I suppose if you are
trying to reconstruct someone's work, you will need these files. Is that
correct?
|
by: rroman |
last post by:
I have a very simple form, takes information from the user, updates a SQL
database, now I just want to redirect to a "Thank You For Your Time" web page
within the same bowser. ASP. NET VB
| |
by: Adam Smith |
last post by:
I have posted this and similar questions repeatedly and can't even raise
a single response. I am being led to believe that this then 'Must be a
stupid question' although people say that there is no...
|
by: Alberto Salvati |
last post by:
Hi, List.
My company has a VERY BIG product base on db2 udb v7.x.
We want to di an upgrade to v9, but.... current db has a lot of
procedure (cobol..!).
Therefore, we've planned to rewrite this...
|
by: Lynx101 |
last post by:
Hi, Is this a stupid question?
Senario: Two tables linked together with an ID number.
Question: When using a combo box, which refences another table by
indexed autonumber, is there a way to...
|
by: AWW |
last post by:
Running XP - Visual Studio 2005 - VB
Want to have duplicate projects
- one safe and stable
- other for experimenting
Can't fine easy way to make duplicate project.
Stupid question? or stupid ME?...
|
by: Alec |
last post by:
Sorry guys, stupid question....
Am no programming expert and have only just started using php for
creating dynamic news pages.
Then I see a dynamic website without the php extension.
...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |