SRB is scheduled for execution via a SCHEDULE macro which linked the SRB to either the global or local chain in CVT.
Dispatcher will dispatch the global SRB before the local ones. When control is given to the SRB routine, it will first free the SRB storage as the dispatcher is not going to do so. SRB is executed with interupt enabled. But dispatcher will return control to SRB routine when the interrupt is handled. Dispatcher will not pre-empt the SRB unit of work until it gives up control voluntarily. This is to avoid saving and restoring state for a presumed short piece of work.
SRB can be suspended when it hits a page fault or it asking for a lock that is not available. In this case, SRB execution cannot continue. The page fault handler or lock manager would save the state of execution to a special SRB (SSRB) so the execution can continue to completion when the wait is over. Once the resources requested is available, the SSRB will be chained to the local SRB list with a special priority called non-quiesceable. When an address space is quiesced, dispatcher will let the SSRB to finish before the address space is stopped or otherwise work by SRB is half done and may cause data integrity. Thus the non-quiesceable property of SSRB.
No comments:
Post a Comment