This is a complicated question that is very dependent on the design of your application. So if the design needs to use a PLO Compare and Load, by all means do so. I try to design these applications to avoid as many PLO Compare and Loads as possible. The memory serialization (once at the start and once at the end) are expensive but much less so than software locks. This means that I design the update operations so that loading the pointers during a PLO operation will; at worse, simply result in outdated information. As I explained in my first example, this is possible regardless of whether you use PLO or a lock. It's just a consequence of concurrent activity and the order in which these activities occur.
In reality, I don't normally use PLO Compare and Swap and store (any flavor) for chains. They work fine for singly linked lists. Usually I use it (just wrote something today) to dynamically add an entry to a pre-allocated slot in a cell. In this case, the cell has pre-allocated slots with a high water mark pointer and a count, consecutive words in a double word. In this case, the high water mark and count are the 2nd operand and the lock word. Since the 2nd operand always updates last, any references would not even know of the new addition until the PLO completes. I fall back to my original provision. The use of PLO is heavily dependent on designing the application to use PLO. Just yesterday, I debugged a problem in a task that was not doing a PLO Compare and Load to get a count. Certainly, all references to the counts in a Compare and Swap Store should all be updated with a PLO and probably require a PLO Compare and Load. -----Original Message----- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Jon Perryman Sent: Tuesday, November 05, 2013 10:50 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Serialization without Enque Sorry for the confusion but that's not the question that I was asking. I agree with you on guaranteeing the consistency using the count. I'm talking about TCB1 using PLO CSDST to store 2 adjacent words (4th & 6th PLO operands) and TCB2 using LM or LG for those same 2 words. There is a very small window between the 2 store's where TCB2 will pick up inconsistent inconsistent values. In other words, the first store has completed and the LM/LG occurs before the second store completes. This window is extremely small because PLO cannot be interrupted and the instruction was prepared before performing the stores. I think the window is so small that even under heavy usage, you would only see an error every couple of months but it does exist. I think TCB2 must also use the PLO compare and load to avoid this situation. Thanks for the great information, Jon Perryman. From: Kenneth Wilkerson <redb...@austin.rr.com> > > >The order of stores is unpredictable except that according to the POM, >operand 2 (in this case, the count) is always stored last. > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN