Re: Parallel Python




In article <mailman.2544.1168455985.32031.python-list@xxxxxxxxxx>,
Sergei Organov <osv@xxxxxxxxx> writes:
|>
|> Do you mean that POSIX threads are inherently designed and implemented
|> to stay idle most of the time?! If so, I'm afraid those guys that
|> designed POSIX threads won't agree with you. In particular, as far as I
|> remember, David R. Butenhof said a few times in comp.programming.threads
|> that POSIX threads were primarily designed to meet parallel programming
|> needs on SMP, or at least that was how I understood him.

I do mean that, and I know that they don't agree. However, the word
"designed" doesn't really make a lot of sense for POSIX threads - the
one I tend to use is "perpetrated".

The people who put the specification together were either unaware of
most of the experience of the previous 30 years, or chose to ignore it.
In particular, in this context, the importance of being able to control
the scheduling was well-known, as was the fact that it is NOT possible
to mix processes with different scheduling models on the same set of
CPUs. POSIX's facilities are completely hopeless for that purpose, and
most of the systems I have used effectively ignore them.

I could go on at great length, and the performance aspects are not even
the worst aspect of POSIX threads. The fact that there is no usable
memory model, and the synchronisation depends on C to handle the
low-level consistency, but there are no CONCEPTS in common between
POSIX and C's memory consistency 'specifications' is perhaps the worst.
That is why many POSIX threads programs work until the genuinely
shared memory accesses become frequent enough that you get some to the
same location in a single machine cycle.


Regards,
Nick Maclaren.
.



Relevant Pages

  • Re: Pthread problem using IRIX 6.5.4 with multiple processes
    ... I have noticed that the address space for POSIX Threads is shared. ... Does it mean that the kernel owns all the threads? ... I just wanted to know where the threads are saved in memory and if the ... >> I thought that the parent pid should differ from one process to another. ...
    (comp.programming.threads)
  • Re: Parallel Python
    ... |> designed POSIX threads won't agree with you. ... then I don't think the POSIX threads were "perpetrated" to be idle ... pthreads real-time extensions came later ... POSIX and C's memory consistency 'specifications' is perhaps the worst. ...
    (comp.lang.python)
  • Re: WaitForSingleObject() will not deadlock
    ... all memory is consistent seems fundamental to any kind of locking structure. ... In "Programming with POSIX Threads", Butenhof devotes a number of pages to ... gives four rules POSIX obeys: ...
    (microsoft.public.vc.mfc)