> I was reading the manual for an explanation of CPU lock:
> CPU lock -- provides MVS-recognized (valid) disablement for I/O and
> external interrupts.
> 
> The manual gives a further explanation:
> MVS does not guarantee preservation of the interrupt status of
> programs that explicitly disable for I/O and external interrupts
> through the STNSM instruction.

> What does 'does not guarantee' mean?

The hardware architecture provides a simple mechanism for masking,
enabling and disabling I/O and external interrupts. And if you're a
supervisor state program and you know what you're doing those will do
just what you expect. The operating system exposes a bunch of services
on top of those mechanisms that are supposed to make them palatable for
mere mortals to use.

But as Walt said, there's a lot of stuff whirling around below the
surface, so it is unreasonable to expect non-OS programmers to
understand all of the environmental conditions and get it right with any
sort of consistency. So IBM (has always) documented the CPU lock as the
"official" mechanism for obtaining disablement. And by the way, the same
is true for all of the other spin locks. That's what a "spin" lock
implies - legal disablement, as well as serial access to whatever the
specific lock implies. The cpu lock simply provides serial access to the
cpu that holds it. Cute huh?

Now with that said, no matter how you got disabled, once you -are-
disabled for external and I/O interrupts, the only other kind of
interrupts that can happen are the non-maskable ones - program check,
machine check etc. The interrupted program's state is always stored by
the hardware and (IMO) it would be astonishing for a disabled program to
find itself redispatched in an enabled state. For the OS to do so, it
would in effect be playing chicken with itself in many cases. I suspect
RTM would simply abend the work that was considered to be in some state
of sin. And I don't have any doubt that such cases might well exist in
nature, for example in spin recovery or ACR.

Bottom line, play by the rules and there's a lot less chance of getting
hurt. And even then, it is not any place for the faint hearted. 

CC

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