Dual Processor Question

Archive of the Sojourn3 General Discussion Forum.
Sarvis
Sojourner
Posts: 6369
Joined: Fri Jan 26, 2001 6:01 am
Location: Buffalo, NY, USA
Contact:

Dual Processor Question

Postby Sarvis » Wed Feb 05, 2003 11:02 pm

Ok, I've already heard a couple different answers to this... so figured I might be able to get the issue cleared up here. I'm running WindowsXP Professional, which has dual processor support, on a dual 450Mhz processor system. My roomates thought was that the OS would schedule a task between the two processors so that it would process nearly twice as fast. However, some people have told me that I'm basically running each task on a 450Mhz processor.

So, anyone wanna clear all this up for me?
<a href="http://www.code-haven.com">Code Haven</a> - For all your programming needs.

I detest what you write, but I would give my life to make it possible for you to continue to write. - Some Guy Who Paraphrased Voltaire
Myre
Sojourner
Posts: 111
Joined: Wed Jan 30, 2002 6:01 am
Location: cincinnati, oh, USA

Postby Myre » Wed Feb 05, 2003 11:06 pm

honestly, we are all just computer geeks on a text based mud....

what the hell could you possibly be running that would need a dual processor...not like sojourn is exactly system taxing!

oh well mindless drivel from someone who doesnt know yer answer...but has the perspective of 'who knows, and why should you care' it's not like you can change how the computer schedules to do it if it's set to do it a certain way!

worry about the important things in life...like where the next cheeseburger is comming from....and how to get Kwirl to make his signature tag far less annoying....
Bilraex
Sojourner
Posts: 162
Joined: Mon Jun 18, 2001 5:01 am
Location: Massachusetts
Contact:

Postby Bilraex » Wed Feb 05, 2003 11:17 pm

It will not split the task between the processors, the OS will schedule running tasks to alternate its threads between the processors, so no youre not getting 900mhz and for most applicatrions unless the program is smp aware having dual chips is useless.
Sarvis
Sojourner
Posts: 6369
Joined: Fri Jan 26, 2001 6:01 am
Location: Buffalo, NY, USA
Contact:

Postby Sarvis » Wed Feb 05, 2003 11:34 pm

Myre: Actually you can set a program's processor affinity in Windows XP. So basically I could set all programs on processor one, and Neverwinter Nights on processor two... but I doubt that would really show much improvement. :(

Bilraex: :(
<a href="http://www.code-haven.com">Code Haven</a> - For all your programming needs.

I detest what you write, but I would give my life to make it possible for you to continue to write. - Some Guy Who Paraphrased Voltaire
rylan
Sojourner
Posts: 2903
Joined: Fri Jan 26, 2001 6:01 am
Location: Hudson, MA

Postby rylan » Wed Feb 05, 2003 11:54 pm

Yeah, unfortunately Windows does not actually split individual tasks and have the cpus perform alternate (simultaneous) instructions on them. You'd need a real multiprocessor OS to do that :(
Azenilsee
Sojourner
Posts: 199
Joined: Sat Nov 03, 2001 6:01 am
Location: Kuala Lumpur, Malaysia
Contact:

SMP OS

Postby Azenilsee » Thu Feb 06, 2003 8:50 am

Hmm, I thought that Windows NT 4.0 and above was already SMP aware, but like Sarvis pointed out you can set the affinity for which program runs on which processor, but the improvements are basically nil. Only SMP aware programs should be able to utilitize your SMP setup, like Adobe Photoshop (and Quake III, if I'm not mistaken).
Azenilsee - Faern Dalharil
Yarash
Sojourner
Posts: 432
Joined: Thu Sep 05, 2002 5:01 am
Location: Monterey, CA

Postby Yarash » Thu Feb 06, 2003 2:30 pm

A couple years ago I was working for a company that produced a macintosh mp3 player/encoder. The programmer had to add special code that would allow the software to take advantage of dual processors.

When programs support dual processors, it's pretty sweet. I don't know if it's different on a pc, but it should also be noted that on the mac it would not operate at the total speed of both processors (though very close). For example, encoding a song without dual support might encode at 10x, and with support it would encode around 18x (not 20x).

- Mike
Raiwen
Sojourner
Posts: 430
Joined: Sun Jan 28, 2001 6:01 am
Location: Atlanta, Ga USA
Contact:

Postby Raiwen » Thu Feb 06, 2003 5:33 pm

Yarash wrote:The programmer had to add special code that would allow the software to take advantage of dual processors.


The programmer always has to take advantage of multiple processor support. You have things called threads and things called processes. Every process has at least one thread. A thread can be looked at as a thread of execution... ie.. the direction and flow of the program. A process can be looked at as an instance of a program. Most windows programs use threads for behind the scene stuff.. like how you can have multiple windows up, and if you get an IM message, it's task bar will flash blue, even if you're chatting in another window.

In your PC and even enterprise type unix's, a thread can only exist on a single processor. So, in one scenario, you can have 40 processes, each with one thread. If you had two processors, then the OS would split the processes over the two. Each processor would have 20 threads. Thus your computer would ultimately run faster.

Where your real power comes in, is if you had one program or process, and it could split up it's tasks using multiple threads. Now.. that one process can create 20 threads inside itself. Each thread would be split across the number of processors you had.

Here's the real deal:

Single processor: You have 20 programs running. Most of them are idle. Ie.. they are waiting for something to happen.. a message, you to type something. If you open your fractal program, your machine hauls to a crawl for 20 minutes as it draws your fractals. Why? That one program.. the fractal program can create MANY threads.. but you have one processor.. so they all run on the same processor.

Dual processor: you have 20 programs running. Most of them are idle. You open your fractal program, your machine hauls to a crawl for 10 minutes as it draws your fractals. That one program can now create multiple threads and split it across each processor.

But.. what if the fractal program CAN'T create threads? IE.. the programmer didn't design it to do that? Then EVEN on a dual system, you'll have that fractal program with one thread only running on ONE processor. Now.. your other programs will be split across both.. and your OS may assign more programs to run on the idle processor, so your computer may not crawl.. exactly.. but it still takes 20 minutes to draw your fractals.

Does that makes sense?

Return to “S3 General Discussion Archive”

Who is online

Users browsing this forum: No registered users and 52 guests