Quote:
Originally posted by lyle_s
You're confusing parallelism (things occurring simultaneously) with concurrency (things appearing to occur simultaneously through interleaving of operations).
Threads offer concurrency on a uniprocessor machine, and some combination of parallelism and concurrency on a multiprocessor machine.
You don't need SMP for threads to work.
Lyle
|
Whoops ! Busted
it's a fair cop.
Yes, that is true, you don't need SMP for threads to work. At the time of my original posting fr0ggeh was also on the forums, so I was hoping to pump him for some more information in real time. But he didn't reply at the time.
On a single processor the "offer" of concurrency is pretty weak, since concurrency through forking's there. Sure using threads as a lightweight "process" has certain advantages regarding allocations and sharing, but at the end of the day unless you're running a MP machine threading gets a "big whoopee". Just like you can run PVM (parallel virtual machine) software on a standalone machine - big whoopee.
I know threads will "work" on a single processor. The original question was so vague - did he want to know how to link "-lpthreads" because he was getting link errors, or something else ? I had hoped to open a dialogue, but didn't. I'm not confused by parallelism/concurrency - I am however a bit dirty on the usefulness of threading. I had a stint of programming using pthreads and I have decided that one may as well use PVM instead considering the hardware situation (glut of old boxes being thrown away, begging to be clustered for a song).