Date: April 11, 1992 X3T9.2/91-098 Rev 7 To: X3T9.2 Committee (SCSI) From: George Penokie (IBM) Subject: SCSI-3 Queuing Model Note: The following list of words are barred from SCSI-3: - execution -executing -execute - Active I/O Process - - Queued I/O Process - 0. Queue A group of I/O Process contained within a device which have not completed. | 0.1 Media Information | | Any information contained within a device which is considered by | the device to be permanent and, as such, can be freely accessed by | any other device. + 0.2 Device + + Anything which is connected to and operates on a SCSI bus. + + 0.3 Complete + + The ending of an I/O Process with a BUS FREE phase following + successful transfer of a COMMAND COMPLETE or a RELEASE RECOVERY + message. Or the ending of an I/O Process with a BUS FREE phase + following an ABOUT, ABORT TAG, BUS DEVICE RESET, CLEAR QUEUE + message, or a hard RESET condition, or an unexpected disconnect + occurs. + 3. Current I/O Process 3.1 Current I/O Process (SAM document) + A Current I/O Process is an I/O Process which has information + which is being sent or received on a physical transport system. | | - More than one Current I/O Process may exist at a time on a | physical transport system. | | - A device on a physical transport system may have a Current I/O | Process which is not the same Current I/O Process as another | device on the same physical transport system. | + - A single device may be simultaneously sending information for + one I/O Process and receiving information for a different I/O + Process. 3.2 Current I/O Process (SIP document) A Current I/O Process begins when arbitration is won and ends with + the targets next release of the BUSY signal. A pair of devices + activated by SELECTION or RESELECTION shall operate on the same + Current I/O Process. 3.3 Current I/O Process (SBP document) A Current I/O Process begins at the start of an information packet and ends at the end of an information packet. At any given time there may be multiple packets within the physical transport system. 4. Pending I/O Process An I/O Process which is not a Current I/O Process. 5. Simple I/O Process (Simple Tag) When an I/O Process is tagged as a Simple I/O Process and | if only Simple I/O Processes are Pending I/O Processes then a Simple I/O Process may become a Current I/O Process at any time. 6. Ordered I/O Process (Ordered Tag) | Option 1: | | When an I/O Process is tagged as an Ordered I/O Process the target | shall not: | | -Write media information for the Ordered I/O Process, | -Read media information for the Ordered I/O Process, or | -Complete the Ordered I/O Process | | until all I/O Processes received before an Ordered I/O Process | have completed. | | If Simple I/O Processes are received after an Ordered I/O | Process the target shall not: | | -Write media information for any of the new Simple I/O Processes, | -Read media information for any of the new Simple I/O Processes, or | -Complete any of the new Simple I/O Processes | | before the Ordered I/O Process completes. | | Option 2: | | When an I/O Process is tagged as an Ordered I/O Process, after its | Command Phase completes, it shall not become a Current I/O Process | until all I/O Processes which were received before the Ordered I/O | Processes have completed. | + Any I/O Processes received after an Ordered I/O Process, after | its Command Phase completes, shall not become a Current I/O | Process until the Ordered I/O Process is complete. 6.1 Degree of Ordering | The degree of ordering within a target may be either on a per initiator or a per target basis and is selectable by a mode bit. | When the degree of ordering is per initiator the target shall keep a separate logical queue for each initiator. The sequence of I/O Process completion is only dependent on I/O Processes within that initiators queue. | When the degree of ordering is per target the target shall keep a | single logical queue for all initiators. The sequence of I/O Process completion is dependent of the type and sequence of I/O | Processes received by the target. 7. Head Of Queue I/O Process (Head of Queue Tag) When an I/O Process is tagged as a Head Of Queue I/O Process it shall complete before any I/O Processes received after the Head Of Queue I/O Process. Any I/O Process which was received before a Head Of Queue I/O Process may complete before the Head Of Queue I/O Process completes. | 8. ACA I/O Process (ACA Queue Tag) <> | | When an I/O Process is tagged as an ACA I/O Process the target | shall message reject the ACA Queue Tag message unless an Auto | Contingent Allegiance Condition exists for the I_T_L_Q nexus. If | an Auto Contingent Allegiance Condition exists for the I_T_L_Q | nexus the ACA I/O Process shall complete before any other I/O | Processes for that I_T_L_Q nexus. | + If another ACA I/O Process becomes the Current I/O Process while | an ACA I/O Process is pending the Current I/O Process is rejected | with an ACA Active Status. 9. I/O Process Processing 9.1 I/O Process Processing (SAM document) A target that can accept more than one I/O Process is capable of queueing. The number of I/O Processes that may exist is dependent on the design of the target. The target may have any number of queues up to a maximum of one | queue per I_T nexus. If an initiator attempts to send more I/O Processes to a target than can be accepted, they are rejected with + a status of QUEUE FULL. I/O Processes that are queued may be Untagged or Tagged. Note: Several commands may be linked together to form a single I/O Process. 9.1 Untagged Untagged queuing allows a target to accept an I/O process for a Logical Unit or target routine while there are Pending I/O Processes for other devices. Only one I/O Process for + each I_T_x Nexus shall be accepted at a time. 9.2 Untagged I/O Processes + An I/O Process which establishes an I_T_x nexus. 9.3 Tagged The initiator can have more than one Tagged I/O Process for each Logical Unit under control of the target. The target has the freedom to optimize the sequence of I/O Process completion unless the initiator chooses to override the optimization. 8.4 Tagged I/O Processes I/O Processes which establish an I_T_L_Q nexus. 10. Exception Handling 10.1 Auto Contingent Allegiance Condition (ACA) 10.0.1 Auto Contingent Allegiance Condition (ACA) (SAM document) + The Auto Contingent Allegiance Condition Shall exist across all initiators following the return of a Check Condition or Command Terminated status. The Auto Contingent Allegiance Condition shall be preserved for the I_T_x_y nexus until it is cleared. + When an I/O Process clears the Auto Contingent Allegiance the + clearing I/O Process shall not be treated any differently than if it had been received without an Auto Contingent Allegiance. 10.0.2 Clearing Auto Contingent Allegiance Condition (ACA) (SIP document) The Auto Contingent Allegiance Condition shall be cleared upon the receipt of: | -a power on condition, + -a hard reset, -an Abort message, -a Clear Queue message, | -a Release Recovery message, -a Bus Device Reset message, or | -the receipt of any subsequent non-ACA I/O Processes. | The Auto Contingent Allegiance shall not be cleared of any reason | other than those listed above. While the Auto Contingent Allegiance exists the target shall respond to any other request for access to the logical unit from any device, other than the one which has the Auto Contingent | Allegiance Condition, with an ACA Active status. And the target | shall not allow any existing Pending I/O Processes to become Current I/O Processes. An initiator which has an outstanding Auto Contingent Allegiance Condition may allow other devices to use the target by sending a | Limited Release message for the affected I_T_x_y nexus. After the | target receives the Limited Release message Pending I/O Processes for unaffected I_T_x_y nexuses may become Current I/O Processes. 10.0.2 Clearing Auto Contingent Allegiance Condition (ACA) (SBP document) | The Auto Contingent Allegiance Condition shall be cleared upon the | receipt of: | | -a power on condition, + -a hard reset, | -an Abort message, | -a Clear Queue message, | -a Release Recovery message, or | -a Bus Device Reset message. | | The Auto Contingent Allegiance shall not be cleared of any reason | other than those listed above. | | While the Auto Contingent Allegiance exists the target shall only | allow ACA I/O Processes to become Pending I/O Processes and only | one ACA I/O Process shall be pending at any time. The target shall | respond to any other request for access to the logical unit from | any device including the one which has the Auto Contingent | Allegiance Condition, with an ACA Active status. And the target | shall not allow any existing Pending I/O Processes to become | Current I/O Processes. | | An initiator which has an outstanding Auto Contingent Allegiance | Condition may allow other devices to use the target by sending a | Limited Release message for the affected I_T_x_y nexus. After the | target receives the Limited Release message Pending I/O Processes | for unaffected I_T_x_y nexuses may become Current I/O Processes. 10.2 Exception Checking The handling of transmission errors is target specific. If an I/O Process is received with an invalid tag the target shall create an Auto Contingent Allegiance with a key of Illegal Request, an ASC of Tagged Overlapped Commands, and an ASCQ which contains the value of the illegal tag. (Note: This requires a new ASC; 4Dh is recommended.) The target shall abort all I/O Processes for the I_T nexus which had the duplicate nexus. The target shall only create one Auto Contingent Allegiance for a duplicate nexus error regardless of how many I/O Processes are aborted.