Article View: comp.lang.asm370
Article #237Re: More pet ALC tricks...
From: Doron Shikmoni
Date: Mon, 13 Nov 1989 07:36
Date: Mon, 13 Nov 1989 07:36
21 lines
1594 bytes
1594 bytes
>Thanks, Valdis and Doron, for your info on CS and CDS. Somehow, I had a >mental block for those guys, and a few others as well. Also, I agree >that there must be something similar for AP and MP environments. Any >clues yet??? What do you mean? CS and CDS *are* for AP and MP, exactly. The whole idea of "Compare-and-Swap" is that the action can be seen as "atomic", in the aspect of storage references; the system control ensures that all storage accesses are serialized before and after CS, CDS, TS etc. - that is, no other processor can interfere with this action, or fetch an operand between the "Compare" and the "Swap". (Mind you, this is far from being a simple task, if you take into account central storage caching and pre-fetch pipelining). This *is* the way to serialize in an AP/MP environment, virtual or real. Note, that CS/CDS/TS should be used only if you really need to serialize; if you just want to compare-and-then-swap, and think of using these since "It's one instruction", in a simple "application" program, don't; these instructions are expensive. Doron
Technical Details
Message-ID:
<8911131336.AA27002@brazos.rice.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ucbvax!BARILVM.BITNET!P85025Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!ucbvax!BARILVM.BITNET!P85025 From: P85025@BARILVM.BITNET (Doron Shikmoni) Newsgroups: comp.lang.asm370 Subject: Re: More pet ALC tricks... Message-ID: <8911131336.AA27002@brazos.rice.edu> Date: 13 Nov 89 07:36:28 GMT Sender: daemon@ucbvax.BERKELEY.EDU Reply-To: IBM 370 Assembly Programming Discussion List <ASM370%UCF1VM.BITNET@ricevm1.rice.edu> Distribution: inet Organization: The Internet Lines: 21