Type ASSEMBLE
Source Lines : 524
Fixes Applied : 1
Most Recent Version : Thursday, December 7, 1978
Last Fix ID : [R10283DT]
Module
DMTIOM
Function
THE DMTIOM MODULE CONTAINS BOTH THE MSUP I/O INTERRUPT HANDLER AND THE TASK I/O SERVICE ROUTINE. THE I/O SERVICE PROVIDED BY DMTIOM TO THE TASK PROGRAMS INCLUDES SEQUENTIAL SUBCHANNEL SCHEDULING, CHANNEL PROGRAM EXECUTION, AUTOMATIC SENSE EXECUTION ON UNIT CHECK WHEN REQUESTED, RETURN OF ALL PERTINENT INFORMATION REGARDING THE EXECUTION OF THE CHANNEL PROGRAM, AND NOTIFICATION VIA POST ON COMPLETION OF CHANNEL PROGRAM EXECUTION.
Attributes
REUSABLE INTERRUPT ENTRY EXECUTABLE DISABLED ONLY
Operation
THE I/O SERVICE ROUTINE IS ENTERED VIA A BRANCH AND LINK FROM TASK PROGRAMS. EXECUTION OF THE CALLING TASK IS IMMEDIATELY SUSPENDED BY MEANS OF THE FREEZE SVC. A SUPERVISOR QUEUE ELEMENT IS GOTTEN BY MEANS OF A CALL TO DMTQRQ, AND THE APPROPRIATE I/O ELEMENT IS BUILT USING THE INFORMATION SPECIFIED IN THE I/O REQUEST TABLE SUPPLIED BY THE CALLER. THE APPROPRIATE (SELECTOR OR MULTIPLEXOR) CHANNEL QUEUE IS SCANNED TO LOCATE THE POSITION OF THE SUBQUEUE FOR THE SUBCHANNEL ON WHICH THE I/O IS TO BE EXECUTED. IF A SUBQUEUE ALREADY EXISTS FOR THE SUBCHANNEL, THE IMPLICATION IS THAT THE SUBCHANNEL IS BUSY WITH ANOTHER I/O REQUEST EXECUTION. IN THIS CASE, THE NEW REQUEST ELEMENT IS ENQUEUED AT THE END OF THE SUBQUEUE FOR LATER EXECUTION, AND CONTROL IS PASSED TO THE DISPATCHER. IF NO SUBQUEUE EXISTS, THE NEW ELEMENT BECOMES THE FIRST ENTRY IN THE SUBQUEUE AND CONTROL IS PASSED TO THE ROUTINE WHICH STARTS I/O REQUEST ELEMENTS. ON ENTRY FROM AN I/O INTERRUPT, DMTIOMIN SAVES THE EXECUTION STATUS IF NECESSARY AND SEARCHES THE APPROPRIATE I/O QUEUE TO FIND AN ACTIVE I/O REQUEST ELEMENT ON THE INTERRUPTING DEVICE. IF NO SUCH ELEMENT IS FOUND, THE ASYNCHRONOUS I/O EXIT QUEUE IS SCANNED FOR A MATCHING DEVICE ADDRESS, AND AN ASYNCHRONOUS EXIT IS TAKEN IF A MATCH IS FOUND. IF NEITHER AN ACTIVE I/O REQUEST ELEMENT NOR AN ASYNCHRONOUS EXIT REQUEST ELEMENT IS LOCATED FOR THE INTERRUPTING DEVICE, THE INTERRUPT IS IGNORED AND CONTROL IS PASSED TO THE DISPATCHER. IF AN ACTIVE I/O ELEMENT IS FOUND, THE ELEMENT AND THE ASSOCIATED I/O REQUEST TABLE IN TASK STORAGE ARE UPDATED TO REFLECT THE NEW STATUS OF THE I/O REQUEST EXECUTION. IF THE INTERRUPT IS A STAND ALONE PCI, THE ASYNCHRONOUS EXIT REQUEST QUEUE IS SCANNED FOR A MATCHING DEVICE ADDRESS, AND THE EXIT IS TAKEN IF ONE IS FOUND. THE UPDATED ACTIVE I/O REQUEST TABLE IS INSPECTED TO SEE IF THE REQUESTED I/O PROCESSING HAS COMPLETED. IF IT HAS NOT, CONTROL IS IMMEDIATELY RETURNED TO THE DISPATCHER. OTHERWISE, THE I/O REQUEST TABLE IS INSPECTED TO SEE IF UNIT CHECK HAS BEEN SET AND AUTOMATIC SENSE HAS BEEN REQUESTED. IF THIS IS THE CASE, ANOTHER SUPERVISOR QUEUE ELEMENT IS GOTTEN BY MEANS OF A CALL TO DMTQRQ, THE SENSE CHANNEL PROGRAM IS BUILT IN THE NEW ELEMENT, THE NEW ELEMENT IS CHAINED TO THE REQUEST ELEMENT, AND THE SENSE OPERATION IS STARTED. IF THE SENSE OPERATION DOES NOT IMMEDIATELY COMPLETE, CONTROL IS PASSED TO THE DISPATCHER. WHEN SERVICE FOR A REQUEST IS COMPLETELY FINISHED, THE ASSOCIATED I/O ELEMENT (AND SENSE ELEMENT, IF PRESENT) ARE DEQUEUED AND FREED BY MEANS OF A CALL TO DMTQRQ, AND THE REQUESTING TASK'S I/O REQUEST TABLE IS POSTED BY MEANS OF A CALL TO DMTPST. IF ANOTHER I/O REQUEST ELEMENT IS PENDING ON THE SUBQUEUE FOR THE SUBCHANNEL WHICH HAS JUST COMPLETED THE PREVIOUS REQUEST EXECUTION, CONTROL IS PASSED TO THE ROUTINE WHICH STARTS I/O REQUEST ELEMENTS. OTHERWISE, CONTROL IS PASSED TO THE DISPATCHER. THE ROUTINE WHICH STARTS I/O REQUEST ELEMENTS MAY BE ENTERED EITHER FROM I/O INTERRUPT PROCESSING OR I/O REQUEST SERVICE. ITS FUNCTION IS SIMPLY TO MOVE THE STARTING CCW ADDRESS FROM THE TASK'S I/O REQUEST TABLE TO THE LOW STORAGE CAW, AND START THE I/O CHANNEL PROGRAM ON THE APPROPRIATE DEVICE. IF THE I/O COMPLETES IMMEDIATELY, CONTROL IS PASSED DIRECTLY TO THE ROUTINE WHICH COMPLETES I/O REQUEST PROCESSING AND SELECTS A NEW REQUEST ON THE SUBCHANNEL FOR PROCESSING. IF A PENDING ASYNCHRONOUS INTERRUPT FOR THE DEVICE IS CLEARED BY THE SIO, THE ROUTINE SETS A REGISTER WHICH CAUSES THE INTERRUPT TO BE FAKED PRIOR TO RETURN TO THE DISPATCHER.
Calls to Other Routines
DMTQRQ - TO RESERVE OR RELEASE SUPERVISOR QUEUE ELEMENTS DMTDSP - TO RESUME DISPATCHED PROCESSING