Are you sure? Either way, the pseudocode keeps retrying the STCK until
CVTLSO stabilizes.

Charles


-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On
Behalf Of Binyamin Dissen
Sent: Tuesday, June 16, 2020 9:49 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: CVTLSO race (was: ... STCKCONV ...)

Either way there is a potential error as the field does not indicate the
time
range it applies to.

Your solution is incorrect if the STCK time was before the leap second was
to
be added but the refetched LSO applies for after the time. 

On Tue, 16 Jun 2020 10:52:52 -0500 Paul Gilmartin
<0000000433f07816-dmarc-requ...@listserv.ua.edu> wrote:

:>On Tue, 16 Jun 2020 14:16:13 +0300, Steff Gladstone wrote:

:>>We need to capture the date and time in a GLUE and need more precision
than
:>>the CICS variables give us.

:>There's a possible timing window in naive leap second
:>correction.  Suppose:
:>    STCK
:>    (a leap second occurs, adding 1 to CVTLSO)
:>    Programmer subtracts CVTLSO from stored TOD value
:>        resulting in a time value 0.99 seconds early.

:>If thw programmer reverses the order of operations, the
:>complementary hazard giving a timne 0.99 seconds in the
:>future exists.

:>This can be avoided by:
:>RETRY:  Copy CVTLSO
:>        STCK
:>        IF CVTLSO<>Copy GOTO RETRY
:>        Subtract CVTLSO from stored TOD

:>Does TIME macro do something similar?  It's a performance
:>cost of two (three?) instructions in a much-used code
:>path to avoid a hazard that occurs only every year or
:>two.  But this has caused servers to crash.
:>
:>Wrapping the operations with a lock would be more costly.
:>
:>Amazon, Google, (Others?) "smear" leap seconds over 24
:>hours to avoid this:
:>
https://en.wikipedia.org/wiki/Leap_second#Workarounds_for_leap_second_proble
ms
:>This requires steering the clock by 12 ppm, well within
:>the capability of the TOD clock, but for z/OS to freeze
:>CVTLSO at its current value and to adopt smearing would
:>be a major change from specified behavior.
:>
:>(I submitted my RCF on STCKCONV.)
:>
:>-- gil
:>
:>----------------------------------------------------------------------
:>For IBM-MAIN subscribe / signoff / archive access instructions,
:>send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

--
Binyamin Dissen <bdis...@dissensoftware.com>
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 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

Reply via email to