On Sat, 10 Jun 2017 19:15:11 -0500, Walt Farrell wrote:

>On Sat, 10 Jun 2017 16:41:16 -0700, Charles Mills wrote:
>
>>A refreshable program may modify itself, right? REFR does not say "I don't 
>>modify myself" it says "you can reload me if you want." Almost >the same 
>>thing, but not quite.
>
>The key, I think, is that the system may reload the program at _any_ time, 
>even on the instruction immediately after it modifies itself. Therefore, there 
>is no _safe_ way for a refreshable program to do such a modification, as it 
>cannot make any assumptions about how long the modification will survive. At 
>least a RENT program can use serialization to allow safe modifications (FSVO 
>"safe"), but a REFR program doesn't have that ability.
> 
Yet, until the advent of REFRPROT (still not the default!), REFR programs were
allowed to modify themselves.

Repeating my earlier suggestion:  set a flag in initialization (would CS 
suffice?)
test the flag before and after critical code sections; re-initialize if 
necessary.
I'm not saying it's worth it, nor that I recommend it, only that IBM allows it.
At least REFRPROT should be the default.

-- gil

----------------------------------------------------------------------
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