Re: WaitForSingleObject() will not deadlock



On Tue, 03 Jul 2007 17:18:24 -0400, Joseph M. Newcomer
<newcomer@xxxxxxxxxxxx> wrote:

I agree. It makes no sense, athough the term "memory visibility guarantees" is not
actually defined anywhere I can find; the apparent interpretation that it guarantees that
all memory is consistent seems fundamental to any kind of locking structure. Otherwise,
the locks cannot possibly work.

See "Memory Ordering" here:

http://msdn2.microsoft.com/en-us/library/ms686355.aspx

In "Programming with POSIX Threads", Butenhof devotes a number of pages to
"Memory visibility between threads"; here's a link to page 89 where he
gives four rules POSIX obeys:

http://books.google.com/books?id=_xvnuFzo7q0C&pg=PA88&ots=Kl5R_S-7Y9&dq=%22memory+visibility%22+isbn:0201633922&num=50&sig=2L0dMbDOavxA9VVnDA2Ai28gIF8#PPA89,M1

--
Doug Harrison
Visual C++ MVP
.



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: Parallel Python
    ... |> designed POSIX threads won't agree with you. ... to mix processes with different scheduling models on the same set of ... low-level consistency, but there are no CONCEPTS in common between ... POSIX and C's memory consistency 'specifications' is perhaps the worst. ...
    (comp.lang.python)

Quantcast