[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [f-cpu] Winograd DCT on my seul.org account



On Mon, Apr 22, 2002 at 12:43:41PM +0200, Juergen Goeritz wrote:
> On Mon, 22 Apr 2002, Christophe wrote:
[...]
> >I'm speaking about parallel execution per instruction, not per thread
> >(instructions in a thread are still serialized). So long as we get no real cpu
> >able to execute parallel instructions, there is no real gain for anything for a
> >true parallelism. Yes, a parallel language is okay to see what is independent
> >(the good point) and shall be surely better than C but we will still have a lot
> >of overhead due to the use of multithreading (stack space and switching for
> >example). So if a CPU has power enough, we tend to use it more in serial way
> >than parallel way since there is no real reason to think a multithreading would
> >*ALWAYS* run better.
> 
> What do you mean by better? It may not be faster at all on
> a single processor due to the extended overhead. But there
> is one advantage compared to sequential programming. The
> parallel threads could communicate with each other in new
> ways if you think of each thread as a unique entity...

Threads work best if they don't have to communicate with each other,
no matter if they're running on 1 CPU or 1000.  Communication usually
means that you have to synchronize the sender and receiver thread, and
the faster one will have to wait. In an MP system, you can run another
thread instead, but synchronization and context switching still take
some time -- and the more threads communicate with each other, the more
synchronization overhead you'll have. Therefore, `fine-grained' threading
doesn't work well (e.g. threads that return quickly or communicate a lot).

-- 
 Michael "Tired" Riepe <Michael.Riepe@stud.uni-hannover.de>
 "All I wanna do is have a little fun before I die"
*************************************************************
To unsubscribe, send an e-mail to majordomo@seul.org with
unsubscribe f-cpu       in the body. http://f-cpu.seul.org/