From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,2ef9ab4638027d85,start X-Google-Attributes: gid103376,public From: "W. Wesley Groleau (Wes)" Subject: Re: Uninterruptible (atomic) operation? Date: 1996/12/09 Message-ID: <9612091326.AA04263@most>#1/1 X-Deja-AN: 203137740 sender: Ada programming language comments: Gated by NETNEWS@AUVM.AMERICAN.EDU mailer: Elm [revision: 70.85] newsgroups: comp.lang.ada Date: 1996-12-09T00:00:00+00:00 List-Id: :> wwgrol> Can someone tell me the names if they exist of :> wwgrol> system calls to "hog the CPU" for a short time and release it. :> :> There are none (in general). :> :> Shared memory is only for use with *cooperating* processes. That is, you :> know damn well all the processes are using the semaphore, because you wrote :> them all. That's how it's done. OK, let's put it another way: The shared memory is updated only rarely, but the reads are very frequent. One of the processes reads it so often that folks are concerned about the overhead. The value they're reading is used for communications timings. If the writing process can "hog" the cpu for the five to ten machine instructions necessary to do the writes, then everyone else can "trust" the atomicity of the values. (And if we used Ada-95 we could use pragma Atomic.) (And if wishes were horses...) --------------------------------------------------------------------------- W. Wesley Groleau (Wes) Office: 219-429-4923 Hughes Defense Communications (MS 10-40) Home: 219-471-7206 Fort Wayne, IN 46808 (Unix): wwgrol@pseserv3.fw.hac.com ---------------------------------------------------------------------------