Subj : Re: posix and lock-free algorithms To : comp.programming.threads From : David Schwartz Date : Thu Aug 11 2005 10:42 pm "John Doug Reynolds" wrote in message news:1123816343.106036.208010@g44g2000cwa.googlegroups.com... >> "Applications shall ensure that access to any memory location by >> more than one thread of control (threads or processes) is restricted >> such that no thread of control can read or modify a memory location >> while another thread of control may be modifying it." > The implication of this quote has finally gotten through to me, I > think. I imagined that as long as the write to a memory location is > known to be atomic, there is no requirement to avoid simultaneously > reading that location. DCSI seeks to allow simultaneous read and > write, and tries ensure that this can be done safely. And this might > even be possible on a given architecture, but that's irrelevant within > the Posix framework. The very attempt to write such an algorithm > defies Posix--to ask whether this can be accomplished under Posix is > to miss the point entirely. Right. That's why we premise this discussion on two things. First, we have an implementation that waives the POSIX "any concurrent access blows up" requirement. Second, that we have a pointer type that is known to be atomic (no partial reads). > It may be possible to implement DCSI. It may even be possible to > implement it portably, though such an implementation will not rely on > Posix. A particular language might enable the portable use of DCSI. > C/C++ is not such a language. Right. DS .