Original Post
🔒 Locked
Multithreading
Advertisement
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.
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
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
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement