Archived

This topic is now archived and is closed to further replies.

Antony52

Dual CPU And Game Support.

Recommended Posts

I have a dual PIII 1,26GHz PC.If we lets say add their speeds then we are talking about a 2,53GHz machine.However how many games if any support dual cpu.I have been told that the games are using a 15% from the second cpu only.When are we going to see dual cpu support?What programming technics are necessary for making a game support 2 cpu''s and more?

Share this post


Link to post
Share on other sites
Remember that, in general, the OS gets to decide which processes use which CPUs, not the programs.

To use more than one CPU effectively you really need a threaded programming model. Games don''t really do much concurrent processing, although most could benefit a little from doing more than they actually do. The problem is that the gains for games are quite small - very small on single-processor systems, which comprise the overwhelming majority - compared to the problems of synchronising data between threads.

[ MSVC Fixes | STL | SDL | Game AI | Sockets | C++ Faq Lite | Boost | Asking Questions | Organising code files | My stuff ]

Share this post


Link to post
Share on other sites
You can...

A)switch to Unix/Linux and use one of the dual chip kernels

B)siwtch to Apple Computers. This is what I did.

C)Beg MS to make software that doesn''t suck (like that''ll ever happen)

Windows is just not a good OS system. It has no support for featurs like true multithreading, and tends to crash 2x a day (even Windows XP/2000).

Share this post


Link to post
Share on other sites
quote:
Original post by Evangelion
...stuff...


Do you have any idea what you are talking about, or are you just trolling? Would you care to explain how switching to Linux will make a single-threaded game run faster on a dual CPU machine? Could you please explain exactly what is wrong with NT''s multiprocessor/multithreading support?

Share this post


Link to post
Share on other sites
quote:
Original post by Evangelion
You can...

A)switch to Unix/Linux and use one of the dual chip kernels

B)siwtch to Apple Computers. This is what I did.

C)Beg MS to make software that doesn't suck (like that'll ever happen)

Windows is just not a good OS system. It has no support for featurs like true multithreading, and tends to crash 2x a day (even Windows XP/2000).


Please inform you before posting such bullshit
First of all Windows NT (thus 2000 and XP) HAS multiprocessor support and multithreading.
9x HAS multithreading (I can't remind that I was forced to close a program before I use another in 9x), but no multiprocessor support (but you aren't forced to use that OS, which is crappy IMHO)
Even the multithreading of 9x is preemptiv ("true" in your words)
Mac OS 9 used non-preemptiv mutlithreading ("not true"), and I think 9x is older.
My Windows XP installation crashed last time a month ago, which was a driver problem not a fault of MS.
I usualy start my machine once a day without a reboot if I'm not forced to do so.
And there is VERY good software produced by MS, especially Office, IE and Visual Studio (there is no IDE for Linux which is as good as VS)


[edited by - noVum on December 24, 2002 4:29:45 PM]

[edited by - noVum on December 24, 2002 4:35:21 PM]

Share this post


Link to post
Share on other sites
quote:
Original post by Mathematix
One of your CPUs is enough to run all of today''s games smoothly. Why do you need dual CPU support?


More efficient use of available computing power should always be a goal. What you''re saying is a bit like "well, our processors of today can run all todays game, why do we need to build faster processors?" We''re not around to build today''s games, we''re around to build tomorrow''s games.

If you can use the computers'' processors efficiently you could increase framerate or add more features, which is basicly what all game programming has as it''s goal anyway when you come some way into a project. Doing this in a scalable way is a huge challenge, but a worthy one.

An interesting problem posed by this is that Windows OSes for instance have quite bad emulation of multiprocessing (i.e. timeslicing between threads), and if you only have one processor you''d probably want to run singlethreaded or with only a few threads.

By the way, is there any way to find out how many processors different systems run on?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Original post by Evangelion
You can...

A)switch to Unix/Linux and use one of the dual chip kernels

B)siwtch to Apple Computers. This is what I did.

C)Beg MS to make software that doesn''t suck (like that''ll ever happen)

Windows is just not a good OS system. It has no support for featurs like true multithreading, and tends to crash 2x a day (even Windows XP/2000).
If you don''t like Microsoft and like to bullshit them, there are tons of forums for that. But give up spereading your shit here. You obviously don''t know anything about multithreaded programming. Get a life instead of spamming here.

NT based systems do support dual CPUs. But if you write a single threaded application you will not benefit for that. Also, just creating threads without knowing when threads are approprite won''t help you - neither on *nix nor Windows platforms.

Share this post


Link to post
Share on other sites
quote:
Original post by noVum

Please inform you before posting such bullshit
First of all Windows NT (thus 2000 and XP) HAS multiprocessor support and multithreading.



XP home edition do not have multiprocessor support.


Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:

Mac OS 9 used non-preemptiv mutlithreading ("not true", and I think 9x is older.



Okay the troller was off base, but don''t forget to mention Mac OS X. Mac OS X has SMP with all the behind-the-scenes thread balancing goodness. Most people have bad ideas about Macs based off of 9 and prior releases. Things are different now. The Mac OS X version of Quake3 is actually multithreaded and takes advantage of SMP. I''ve seen a noticible different on my dual CPU machine, but my GF2 maxes out quickly so I''m unsure if it saturates both CPU''s.

Share this post


Link to post
Share on other sites
quote:
Original post by Anonymous Poster
I''ve seen a noticible different on my dual CPU machine, but my GF2 maxes out quickly so I''m unsure if it saturates both CPU''s.


I would say no - not with Quake 3 and this graphics card. The logic behind quake does not eat too much CPU, unless you run the server for some other computers :-)



Regards

Thomas Tomiczek
THONA Consulting Ltd.
(Microsoft MVP C#/.NET)

Share this post


Link to post
Share on other sites
As long as you are running a SMP enabled OS then all you have to do is use threads effectively in your application. (For Windows that would be 2000 server/advanced server, XP professional, and NT.)

Now, the problem with games is that multithreading rarely gives you much of a speed increase. There just isn''t a ton of room for it. The best gain you will see is from overall system performance when playing a game. I like to play games in windowed mode so that I can do other things while waiting. Take for instance Asheron''s Call 2. It is a processor hog but with 2 processors I can easily read email, view game websites, etc. while waiting around for other players (maybe we are healing, traveling around, etc.)

As for only a %15 increase, that is not accurate. 3DSMAX and many other rendering packages can realize up to a 45% decrease in rendering times when using multi-processor machines. My dual 1ghz processor box renders frames almost exactly twice as fast as my single 900mhz processor machines.

If you want more explanation of this, check out Tom''s Hardware Guide for his article on Hyperthreading. It talks about how threads help/hinder games etc.

Bottom Line: With 2 CPUs your system will generally run more smoothly than with 1. Just don''t expect to see 600 fps in Quake instead of 300. Personally, I always build dual processor machines for myself.


LostLogic
www.lostlogic.com
Author, Multiplayer Game Programming
Author, Strategy Game Programming with Direct X 9 (Not yet released)

Share this post


Link to post
Share on other sites
In general, the only thing you have to do to enable SMP support on a compatible version of Windows (2000, XP Pro, .NET Server), is to write your program with multithreading. The nice thing is, the kernel will decide which threads execute on which processors (This can be overridden by a call to..I believe it''s SetProcessorMask(), but I could be wrong). The concerns with SMP are the same as with multithreading (using mutexes, critical sections to make sure memory isn''t written to by > 1 thread at the same time), etc...

Share this post


Link to post
Share on other sites