How does the cost of CS/CDS compare to PLO?
-- Shmuel (Seymour J.) Metz http://mason.gmu.edu/~smetz3 ________________________________________ From: IBM Mainframe Assembler List <ASSEMBLER-LIST@LISTSERV.UGA.EDU> on behalf of Charles Mills <charl...@mcn.org> Sent: Wednesday, January 9, 2019 2:16 PM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: Re: Multi CPU interlock question Others have given you good answers. Avoid CS if you don't need it (and in this case you don't). CS is expensive because every CPU has to sit up and take notice. Answering your question in more detail, if one (or more) updaters is for example alternately storing x'11111111' and x'99999999' then readers will always see one of those two values, never anything like x'11119999', assuming fullword alignment. One classic use of CS is with multiple updaters of a count: more than one updater doing L/AHI/ST. Doing it that way rather than with a CS loop will cause some increments to get lost, because one CPU's L may interleave with another CPU's update sequence. (And my example is a little out of date: more modern CPUs have a single "increment word in storage with block concurrency" instruction. CS is still valuable for older CPUs and for other applications besides the shared counter, such as a shared queue header.) In your case I would prefer ST to MVC. For what it's worth, ST has behaved this way "forever"; not sure about MVC if your code ever were to run on a much older model. Charles -----Original Message----- From: IBM Mainframe Assembler List [mailto:ASSEMBLER-LIST@LISTSERV.UGA.EDU] On Behalf Of Joe Owens Sent: Wednesday, January 9, 2019 8:11 AM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: Re: Multi CPU interlock question Hi Everyone, thanks for the answers. I did read the POP, but obviously not hard enough. (It is never an easy read). The block concurrency section explains it perfectly. The fullword is aligned so all should be good. The question about MVC was just out of interest.