c# multiprocessor

  • Thread starter Thread starter Pujo Aji
  • Start date Start date
P

Pujo Aji

Hello,

I'm looking some tutorial or book about programming C# multitreading in
multiprocessor. Is anyone has experiance?

Sincerely Yours,
Pujo Aji
 
You can still write threads, whether you have one CPU or multiples. The main
difference in a multiple CPU environment, that I've noticed, is that more
than one thread can actually execute at the same time. Where on a single CPU
thread 1 will have to be stopped by the OS so that thread 2 can get a time
slice. I've noticed over the years that using a Multi CPU set up tends to
show any threading issues I may have faster, and I believe that is due to
the running simultaneously of threads.

The concepts and implementation will be the same from your stand point.

--
Thanks
Wayne Sepega
Jacksonville, Fl


"When a man sits with a pretty girl for an hour, it seems like a minute. But
let him sit on a hot stove for a minute and it's longer than any hour.
That's relativity." - Albert Einstein
 
Hello Wayne,

Can you tell me what should I do if I would like to do programming with
more than 1 CPU, for example should my program run in as server first
before the thread able to be distributed automaticaly, or if my laptop
is a client How can I let my C# know which computers will be shared.

Basicaly,
If I just have two computers how can I setup so that it will run as
second CPU.

Thanks in advance

Sincerely Yours,
Pujo Aji
 
Ok, that is different than what I thought you were talking about. I would
suggest searching Google for Distributed Computing and go from there.

Simplistic description of what you need:

A server that each client would talk too, the server would have data that it
would hand off to each of the clients, the client would then do whatever
work is required of it on the data, then return the results to the server
and ask for more work.

Also would maybe want some way for the server to time out the data it gave
to the client, if it should have responded with a response in three days and
it didn't then the data can be given to another client to process.

hope this helps in someway.
 
Pujo -

I think if you write a multithreaded app, it will take advantage of multiple
processors, the framework/OS will abstract that for you.

In other words, .NET does not give you a way to do this

"Run this thread on processor #1".

- Sahil Malik
http://codebetter.com/blogs/sahil.malik/
 
Back
Top