Binyamin,

Why not use the PLO CSTST (compare swap and triple store) ?   


Rob Scott
Developer
Rocket Software
275 Grove Street * Newton, MA 02466-2272 * USA
Tel: +1.617.614.2305 
Email: [email protected]
Web: www.rocketsoftware.com

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On Behalf Of 
Binyamin Dissen
Sent: 08 March 2010 17:10
To: [email protected]
Subject: Several PLO's versus a SETLOCK

I need to do a interlocked update of two disjoint areas. That might include 
getting storage (if not yet allocated).

The old way would be to setlock, see if the area1 was allocated, if not 
allocate and store the anchor1. Then allocate area2 and save its pointer in a 
linked list off of area1.

The PLO approach is to see if area1 is allocated, and if not allocate both
area1 and area2, store area2 in area1 linked list and do a PLO C/S on anchor1.
If that fails, do a PLO C/F of the top chain item in area1 store as forward 
pointer in area2 next and do a PLO C/D/S with the anchor1 value the same and 
setting the forward from area1 to the new area2. If that fails on forward
area2 pointer, repeat. If that fails on area1 pointer, repeat top.

Obviously the PLO approach is more complicated. But will it save enough 
performance on the typical paths so that one can live with the extra cost of 
the retries upon failure? 

--
Binyamin Dissen <[email protected]> http://www.dissensoftware.com

Director, Dissen Software, Bar & Grill - Israel


Should you use the mailblocks package and expect a response from me, you should 
preauthorize the dissensoftware.com domain.

I very rarely bother responding to challenge/response systems, especially those 
from irresponsible companies.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
[email protected] with the message: GET IBM-MAIN INFO Search the archives at 
http://bama.ua.edu/archives/ibm-main.html

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to