Originally posted by: EagleKeeper
Requires smarts and design issues.
Easy to set up a deadlock if not careful.
Experience required with multi-threaded design and processers
Originally posted by: Chaotic42
Ok, these are the answers that I was looking for
I don't know anything about multithreaded programming, so I was curious. Thanks.
Anyone know of any good books on the subject?
Originally posted by: Codewiz
Originally posted by: Chaotic42
Ok, these are the answers that I was looking for
I don't know anything about multithreaded programming, so I was curious. Thanks.
Anyone know of any good books on the subject?
If you are in college try and take an Operating Systems class. That is where I learned about threading and forks in unix.
On single processor system single-threaded app will run faster, sinec there is no overhead of context switching and data locking.
I have the option for one OS class. I'm not too sure if it will cover Unix.
Originally posted by: Argo
On single processor system single-threaded app will run faster, sinec there is no overhead of context switching and data locking.
Originally posted by: mjquilly
Originally posted by: Argo
On single processor system single-threaded app will run faster, sinec there is no overhead of context switching and data locking.
not true, multi-treaded programs can indeed execute faster on a single proc machine; suppose one thread is waiting for i/o while another simple needs some cpu time w/o the need to wait for the other thread....
Humpph, there's nothing extreme about it at all, as Heifetz explained.Originally posted by: Argo
Originally posted by: mjquilly
Originally posted by: Argo
On single processor system single-threaded app will run faster, sinec there is no overhead of context switching and data locking.
not true, multi-treaded programs can indeed execute faster on a single proc machine; suppose one thread is waiting for i/o while another simple needs some cpu time w/o the need to wait for the other thread....
That's an extreme case... Plus, it's going to be VERY difficut (and i highlight the word very) to write something like that. This comes from a person with 2 years of experience...
CS 342: Control StructuresAnyone know of any good books on the subject?
Blocking guy, blocking. Whenever there is IO the process stalls and cycles are wasted.On single processor system single-threaded app will run faster, sinec there is no overhead of context switching and data locking.
Originally posted by: Argo
Originally posted by: mjquilly
Originally posted by: Argo
On single processor system single-threaded app will run faster, sinec there is no overhead of context switching and data locking.
not true, multi-treaded programs can indeed execute faster on a single proc machine; suppose one thread is waiting for i/o while another simple needs some cpu time w/o the need to wait for the other thread....
That's an extreme case... Plus, it's going to be VERY difficut (and i highlight the word very) to write something like that. This comes from a person with 2 years of experience...
NOPing out code doesn't make it disappear... the CPU still spends some time on it (unless you jump over it)
If you're referring to what I said, I phrased that poorly. The spinlock macros are #ifdef'd so that if a UP kernel is being compiled they don't do anything and the compiler optimizes them out.
