The objective is to avoid a software lock, because (1) spinning is not a good idea (IIRC, it is possible for a L on CPU1 not see an alteration on CPU2 until a SYNC operation is performed) and recovery may require a combination of ESTAE and RESMGR.
On Mon, 9 Dec 2024 14:34:56 -0300 João Reginato <jb.regin...@gmail.com> wrote: :>Why do you say one word is not enough for integrity? :>I lock the word, insert data in the FIFO queue and update the next available :>entry pointer. :>Then I unlock the word. It appears to have enough integrity. Doesn't it? :> :>-----Mensagem original----- :>De: IBM Mainframe Assembler List <ASSEMBLER-LIST@LISTSERV.UGA.EDU> Em nome :>de Binyamin Dissen :>Enviada em: segunda-feira, 9 de dezembro de 2024 14:28 :>Para: ASSEMBLER-LIST@LISTSERV.UGA.EDU :>Assunto: Re: RES: RES: SETLOCK OBTAIN CML/CMS :> :>If you have a queue with multiple feeders/eaters the pointer word is not :>enough for integrity. You need a monotonic increasing sequence number which :>you can play with CDS. :> :>Once you get to multiple eaters with FIFO you need even more sequencing. PLO :>and the transaction instructions allow that. :> :>On Mon, 9 Dec 2024 13:47:57 -0300 João Reginato <jb.regin...@gmail.com> :>wrote: :> :>:>Ok, then re-thinking it. :>:>I just want the simplest way to do it and fewer CPU consumption :>:> :>:> :>:>-----Mensagem original----- :>:>De: IBM Mainframe Assembler List <ASSEMBLER-LIST@LISTSERV.UGA.EDU> Em nome :>:>de Peter Relson :>:>Enviada em: segunda-feira, 9 de dezembro de 2024 11:23 :>:>Para: ASSEMBLER-LIST@LISTSERV.UGA.EDU :>:>Assunto: RES: RES: SETLOCK OBTAIN CML/CMS :>:> :>:><snip> :>:> :>:>I'm just adding an STAE recovery rtn in case of an abend leave the word :>busy :>:></snip> :>:> :>:>If you have a "word" that can be left "busy" then your design ought to be :>:>re-thought. :>:>Your use of that phrase would usually indicate that one work unit is :>setting :>:>a word "busy" and other work units, seeing that the word is "busy" either :>:>wait or (worse) spin until the word is "not busy". :>:>"Wait" leads to a design that is not responsive; "spin" can lead to :>deadlock :>:>(in particular when on an image with only a single CPU, if the "holder" :>:>might be lower priority than the "requestor"). :>:> :>:>The approach mentioned by Jonathan Scott is one that is used in many cases :>:>within z/OS. :>:> :>:>Peter Relson :>:>z/OS Core Technology Design -- Binyamin Dissen <bdis...@dissensoftware.com> http://www.dissensoftware.com Director, Dissen Software, Bar & Grill - Israel