On Mon, 12 Jun 2017 09:44:02 +0300, Binyamin Dissen wrote:

>On Mon, 12 Jun 2017 00:31:28 -0400 Randy Hudson wrote:
>
>:>Saving a few bytes is sneered at as false economy, now.  It wasn't, then.
>
Alas, code designed according to that criterion remains in use today (if it
weren't, REFRPROT could be made the default), with resulting lack of
robustness.  Programs that might then to be used thousands of times during
their lifetimes now run millions of times in an hour, magnifying the exposure
of flaws.

>:>A refreshable load module might have inititalization code that needs to be
>:>run only once per time it's loaded, with that init code overwritten for
>:>scratch storage afterward.  If the module's space is needed, the whole thing
>:>gets overwritten.  Later it can be refreshed, and the initialization re-run.
>
The coding requirements are onerous.  The program must be able to:
o detect that it's been refreshed and re-run the initialization.
o tolerate a refresh at any point within a critical code section with
  no misbehavior such as a wild STore.
o be tested to verify the above are true.

>:>Or, a module might contain a dynamically reorganized search table, such as a
>:>move-to-front table.  That's storage modification, and it's hard to make it
>:>re-entrant on a 360/65 with only TS as a locking mechanism.  But it can be
>:>refreshable, reloading the initial configuration each time.
>
And such a move-to-front table ought not span a page boundary, lest a
refresh of one page but not both during the move operation cause an
entry to be lost or duplicated, and that a refresh during a search result
in an entry's being bypassed.  And while the original design may have
the table in a single page it may grow with a design revision.

>That would only allow the refreshable module to be reloaded if it is started
>at the entry point. It cannot be refreshed while it is in the middle of being
>executed.
>
Name-token services does something related.  I understand it performs
no costly locking during searches, but tests a flag after a search to
detect that the data structure has been modified in-progress, and
re-drive the search, with less expected cost than locking for every search.

Earlier, I said that REFRPROT could be made the default because load
modules erroneously marked REFR could be re-linked.  OK. Not in
every case.  So make REFRPROT the default except for load modules
marked non-editable, because they can't be repaired.

REFRPROT should be made a JOB statement option rather than a system
parm option, for flexibility in testing.

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to