If the only serialization is CDS and the reader can distinguish feeders, why do you need sequence numbers?
-- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 עַם יִשְׂרָאֵל חַי נֵ֣צַח יִשְׂרָאֵ֔ל לֹ֥א יְשַׁקֵּ֖ר ________________________________________ From: IBM Mainframe Assembler List <ASSEMBLER-LIST@LISTSERV.UGA.EDU> on behalf of Peter Relson <rel...@us.ibm.com> Sent: Tuesday, December 10, 2024 8:46 AM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: Re: SETLOCK OBTAIN CML/CMS External Message: Use Caution Shmuel wrote: <snip> As long as you're serializing the queue and can distinguish the various feeds, why do you need sequence numbers? </snip> A goal was to avoid serializing the queue to save cycles. It is certainly true that if the queue manipulations are totally serialized (such as by an exclusive ENQ) then you do not need other serialization (such as CDS involving a sequence number). Joao wrote: <snip> I lock the word, insert data in the FIFO queue and update the next available entry pointer. Then I unlock the word. </snip> You have not answered the question of what another thread is to do if it encounters the word's being locked. Wait for some amount of time such as by STIMERM then look again? Wait on some ECB that will be posted when the word is unlocked? Loop/Spin until the word is not locked? None of those generally is a viable/practical approach. ENQ and SETLOCK handle that for you but are much slower than the approach Jonathan Scott mentioned, if you can have a single consumer of the work queue (where that single consumer could parcel out the work to multiple worker threads if it so chose). Peter Relson z/OS Core Technology Design