Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!bu-cs!encore!cloud9!tomc From: tomc@cloud9.Stratus.COM (Tom Clark) Newsgroups: comp.arch Subject: Re: Multi-Processor Serializability Summary: volatile doesnt do it Keywords: data ordering, coherence, shared memory multiprocessing Message-ID: <3507@cloud9.Stratus.COM> Date: 2 Feb 89 07:09:56 GMT References: <3492@cloud9.Stratus.COM> <19635@lll-winken.LLNL.GOV> Organization: Stratus Computer, Inc., Marlboro, MA Lines: 18 In article <19635@lll-winken.LLNL.GOV>, brooks@vette.llnl.gov (Eugene Brooks) writes: > In article <3492@cloud9.Stratus.COM> tomc@cloud9.Stratus.COM (Tom Clark) writes: > >In any computer system, the programmer expects operations in the source > >code to be carried out in the order specified. This is especially true > >in a multi-processor system where multiple processes may share data. > > In ANSI C the tool to use to enforce reference order for reads and writes > is the keyword volatile, although I suppose that the purveyors of this keyword > did not have shared memory multiprocessors in mind when they inserted it into > the ANSI C definition. Unfortunately volatile does not do it. Volatile does indeed force a write to memory instead of holding an intermediate result in a register, but it says nothing about ordering of instructions. Such a construct does not exist in most languages, except for the disabling of optimization. Sigh. Tom Clark, Stratus Computer