RE: [Algorithms] Multithreading with Hardware Acceleration
Brought to you by:
vexxed72
From: Chris B. <Chr...@ma...> - 2000-08-21 04:51:25
|
Thanks guys. I was only planning on about ~3-4 threads(input+networking, file, video, main, (sound?)) Each thread has a threadsafe queue. Then to communicate with it I just send it a message throught the queue(like a pointer to where the data is it need to do it's work. I was once playing with WildTangets Gamedriver and profiled the 'explore' sample app to see where all the CPU time went. Just about all of it was spent in the nVidia driver, so I was betting that they were just doing a whole bunch of waits as bits were being rendered. Tom, while your way is correct (sleep(0) to return control to the OS to reschedule), and is a nice way of doing it, shouldn't the scheduler still switch to another thread if one is waiting and is of the same or higher priority? The reason I'm interested in this is that it'll give gains on single processors as well as the dual's. Chris -----Original Message----- From: Charles Bloom [mailto:cb...@cb...] Sent: Monday, 21 August 2000 2:22 PM To: gda...@li... Subject: RE: [Algorithms] Multithreading with Hardware Acceleration Of note here is the famed Windows 9x anomaly of rapid decreases in performance when the running thread count goes over 32 (roughly). NT and 2k seem (relatively) free of this problem. At 05:02 AM 8/21/00 +0100, you wrote: >Some people go mad with threads and create them all over the place, e.g. one >for each AI character. That's possibly a little over the top, but can work. >You need to beware of the pitfalls of threading as well as the advantages, >but it sounds like you're aware of some of the problems already. ------------------------------------------------------- Charles Bloom cb...@cb... http://www.cbloom.com _______________________________________________ GDAlgorithms-list mailing list GDA...@li... http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list |