The question is why you would want to use the CMS lock on modern hardware. If CS(G) in not adequate for you queue structure, you have PLO or the various transaction opcodes. I have used PLO to support a queue with multiple feeders and multiple eaters.
On Sat, 7 Dec 2024 16:40:49 -0300 João Reginato <jb.regin...@gmail.com> wrote: :>Thank you, Peter. I got it and I'm going to use CS instead. :>But could you send me an example of how to get the CML/CMS locks? :>The situation is many asids adding data in ecsa and one asid getting this :>data from there. :> :>TIA :>João :> :>-----Mensagem original----- :>De: IBM Mainframe Assembler List <ASSEMBLER-LIST@LISTSERV.UGA.EDU> Em nome :>de Peter Relson :>Enviada em: sábado, 7 de dezembro de 2024 13:16 :>Para: ASSEMBLER-LIST@LISTSERV.UGA.EDU :>Assunto: Re: SETLOCK OBTAIN CML/CMS :> :>Regarding CMS lock: :>CMS is a global suspend lock, you do not need an address space bind to :>obtain it, but if you are not careful you could adversely impact the :>performance of the system (blocking the system's access to it while you hold :>it). There is rarely call for something outside z/OS itself to obtain this :>lock. :> :>Regarding CPU lock: :>Remember that while holding the CPU lock all storage that you touch :>(including the storage for your program) must be page-fixed or :>disabled-reference. :>And while holding the CPU lock (or while in any case of being disabled for :>external/IO interrupts) any suspend lock obtain (LOCAL, CML, CMS) can only :>be conditional. If the lock is not immediately available, you get control :>back with an appropriate return code. :> :>Regarding SSAR: If this is a reusable ASID, you would have to use SSAIR. :> :>Regarding CML: the specific requirement to avoid 073-x'10' upon SETLOCK :>OBTAIN for a CML is to have either PASN or SASN match the ASID associated :>with the provided ASCB. :>The normal way that that happens is via a space-switch PC (setting your new :>PASN) and then obtaining the CML of the now-current PASN address space. :>It is not, in general, safe to SSAR (or SSAIR) to any ASN you might have a :>mind to want to access. In many cases, the target of cross-memory access :>must be non-swappable. :> :>All of this leads to the thought that you might want to explain what :>specifically you feel you are trying to accomplish that necessitates the :>lock operations (and your questions) so that others can help to guide you. :>There is a very real possibility of harm if you get it wrong. Getting it :>right is part of the responsibility that goes with running in supervisor :>state (and in this case key 0). :> :>Peter Relson :>z/OS Core Technology Design -- Binyamin Dissen <bdis...@dissensoftware.com> http://www.dissensoftware.com Director, Dissen Software, Bar & Grill - Israel