A CP routine must lock another virtual machine for any of the
following reasons:
1. The routine, or a routine it calls, accesses any unshared page of
the virtual machine.
2. The routine, or a routine it calls, alters any field of the VMBLOK that is serialized only by the VMBLOK lock.
3. The routine, or a routine it calls, could be interrupted and an
exit taken to the dispatcher.
The original YMBLOK lock must be released before gaining the new
lock.
Figure 23 shows the modules that obtain the VMBLOK lock for a virtual
machine other than the one requesting the service.
There are situations when a CP routine may access a virtual machine without locking it. If the CP routine, or any routine it calls, is only
altering VMBLOK fields that are serialized by the system lock, locking
the virtual machine is not necessary. For example, to process the SET PRIORITY command for a virtual machine, locking the virtual machine is
not necessary since the altered VMBLOK field, VMUPRIOR, is serialized by
the system lock. But to process the SET FAVORED com.and, locking the
virtual machine is necessary since some of the V!BLOK fields altered,
such as VMRSTAT, are only serialized by the VMBLOK lock. DMKLOKFR DMKLOKRL DMKLOKTR DMKLOKDS Free Storage Lock
Run List Lock
Timer Request Queue Lock
Dispatcher Queues Lock CPEXBLOK Queue Lock
deferred execution blocks
processor related blocks
IOBLOK/TRQBLOK Queue Lock
These are system spin locks that are held for very short periods of time. The control program code that runs without the global system lock must manipulate these queues and these locks insure system integrity
along the unlocked paths.
If you have user-defined areas that are used by more than one virtual
machine and you need to serialize their use, you will need to define
your own locking conventions. You can use the LOCK macro to obtain and
release a PRIVATE lock. VML370 has details on
how to code the LOCK macro.
MACHINE CHECK HANDLER IN ATTACHED PROCESSOR A machine check interrupt is initially handled without the global system lock. DMKMCH determines if the error requires system termination,
virtual machine termination, or simply recording and continuation. If
the system was in a wait state or a virtual machine was in control and
the system is not to be terminated, the machine check handler requests
the global system lock with the defer option. If the lock can be
1-114 IBM YM/370 System Logic and Problem Determination--Voluae 1
DMKGRF DMKLOG DMKMID DMKMSG DMKMSW DMKNES DMKNLD DMKPAG DMKPTR DMKQCN DMKRGA DMKRGB DMKRNH DMKSPL DMKVCA DMKVCH DMKVDA DMKVDD DMKVMC Figure 23.
Action
Locks the virtual machine that was last dispatched.
Locks the virtual machine just built.
Locks the virtual machine being set as favored. LOCKS the virtual machine associated with a real device
block.
Locks the virtual machine whose virtual device is being
reset when a real device is halted.
Locks each virtual machine in order to prepare the VMBLOK for uniprocessor mode. Locks the virtual machine whose storage is being locked or
unlocked, or for whom accounting is being done.
Locks the virtual machine receiving transferred spool
files.
Locks the virtual machine of the dialed system, the virtual machine of the line being dropped (DMKDIADR;, or the
virtual machine that owns the channel-to-channel adapter
being coupled.
Locks the virtual machine associated with a real device
block.
Locks the virtual machine being reconnected or the virtual
machine being autologged.
Locks the virtual machines receiving messages at midnight. Locks the virtual machine receiving a message. Locks the system operator.
Locks each virtual machine active when the NETWORK SHUTDOWN command is processed.
Locks the virtual machine associated with a real device
block.
Locks the virtual machine associated with a queued I/O request.
Locks the virtual machine from which a page will be stolen.
Locks the system operator.
Locks the virtual machine associated with a NICBLOK. Locks the virtual machine associated with a CONTASK or a
NICBLOK.
Locks the virtual machine of the destination user for a
console task or the virtual machine associated with a remote teleprocessing line.
Locks the virtual machine receiving a transferred spool
file or the virtual machine owning a spooled reader file" Locks the virtual machine of the coupled-to CTCA.
Locks the virtual machine to which the channel is being
attached, or the the virtual machine from which the
channel is being detached.
Locks the virtual machine involved in attaching or
detaching a real device.
Locks the virtual machine involved in detaching a real
device.
Locks the virtual machine to which the caller is communica ting.
odules that Obtain Additional VMBLOK Lock
CP Introduction 1-175
Previous Page Next Page