Skip to main content
gamedev.net
🔒 Locked

Multithreading

Started by masonium Dec 21, 2001 at 4:47 PM 2 replies 250+ views
NuffSaid
NuffSaid
No you don''t. However, having multiprocessors would be ideal as the load gets to be split among the processors (how evenly its split depends on you).
==========================================In a team, you either lead, follow or GET OUT OF THE WAY.
merlin9x9
merlin9x9
Not at all. The operating system gives each thread a certain amount of time to execute, based upon its priority level and other things. But that time is fixed and will run out. Then the OS lets another thread execute and so-on. So, all threads will get a chance at CPU time on the same CPU. This way, it looks like many things are happening at once on that single CPU, but the threads are just being interlaced really quickly. Now, with multiple processors, the kernel will put different threads on different processors, but beyond x threads on x processors, the interlacing thing still happens. If you intend your app to be run on significant multiprocessing machines, you''ll probably want to help the OS out by telling with affinity masks and such. Otherwise, since the OS pretty much takes care of this for you, you don''t have to worry about it--you''ll use the same code as with the multiprocessor code.
Shannon Barber
Shannon Barber
On boot, Windows has about 200 threads running.

Magmai Kai Holmlor

"Oh, like you''ve never written buggy code" - Lee

"What I see is a system that _could do anything - but currently does nothing !" - Anonymous CEO
The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.