Date: Jan 4, 1992 X3T9.2/91-098 Rev 2 To: X3T9.2 Committee (SCSI) From: George Penokie (IBM) Subject: SCSI-3 Queuing Model 1. I/O Process Processing A target that can accept more than one I/O Process is capable of queueing. The number of I/O Processes that may be queued is dependent on the design of the target. If an initiator attempts to send more I/O Processes to a target than can be accepted, they are rejected. 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. 1.1 Untagged The target can accept only one I/O process for every Logical Unit under its control (i.e., a queue of one). 1.2 Untagged I/O Processes I/O Processes which establish an I_T_L nexus. 1.3 Tagged The initiator can have more than one I/O Process for every active Logical Unit under control of the target, and the target is responsible to execute them. The target has the freedom to optimize the sequence of I/O Process execution unless the initiator chooses to override the optimization. 1.4 Tagged I/O Processes I/O Processes which establish an I_T_L_Q nexus. 1.5 Chain A Chain is a group of 1 or more I/O Processes which cannot be intermixed on a given Logical Unit. The last I/O Process of a Chain has no encoding of its identity which would identify it as being the last one of a particular Chain (i.e. there is no Chain Tag) - the target shall be capable of recognizing it as being the last one. 1.6 Chained I/O Processes I/O Processes that are executed in the order received by the target in FIFO (First In, First Out) order. If a I/O Process in the Chain is unsuccessful, the Chain shall be terminated and the remaining I/O Processes are not executed. The Chained indicator is not set to indicate the last I/O Process in a Chain. The target may multiplex I/O processes for other Logical Units during execution of the Chain. However, until a target queues the last entry of a chain it will reject I/O Processes from other initiators. Each I/O Process of a chain shall contain the same type of queue tag. If the queue tag changes within a chain that chain shall be terminated and the remaining unexecuted I/O Processes shall not be executed. Note: The above requires the chain indicator to be outside the CDB. 2. I/O Process Execution Order The order in which I/O Processes are executed is a function of chain type. The chain types are: - Simple Chain - Ordered Chain - Priority Chain The possible execution scenarios are: 2.1 Simple Chain I/O Processes I/O Processes within the Simple Chain are executed in the order received by the target (FIFO order). There may be more than one Logical Unit addressed in a Simple Chain, the target may multiplex other I/O Processes during execution of Simple Chains, and the target may reorder Simple Chains. If an I/O Process in the Simple Chain is unsuccessful, the Simple Chain shall be terminated and the remaining I/O Processes not executed. 2.4 Ordered Chain I/O Processes I/O Processes within the Ordered Chain are executed in the order received by the target (FIFO order). There may be more than one Logical Unit in the Ordered Chain, but the target shall not multiplex other I/O processes during execution of the Ordered Chain and the target shall not reorder Ordered Chains. If a I/O Process in the Ordered Chain is unsuccessful, the Chain shall be terminated and the remaining I/O Processes are not executed. Note:If there are Ordered Chains and Simple Chains queued the target may reorder the Simple Chains in any way but the Ordered Chains shall execute in the order received. 2.5 Priority Chain I/O Processes I/O Processes within the Priority Chain are executed in the order received by the target (FIFO order) but the entire Priority Chain shall be executed before any other chain. The target shall complete execution of any chains which have one or more I/O Processes already executing. A Priority Chain causes the target to change the order of execution of queued chains. Priority Chain are executed before non-Priority Chains. Priority Chains are executed in Last In First Out (LIFO) order. With the exception of individual ABORT I/O Processes, the receipt of a Priority Chain does not affect the I/O Process of any Untagged I/O Process or I/O Processes in a Chain. When a Head of Queue, Untagged ABORT I/O Process is received, the target shall suspend the I/O Process executing (if possible), and process the ABORT. NOTE: In the case of a target that queues I/O Processes, the initiator may have to issue no more I/O Processes until it can match valid responses with all the issued I/O Processes in order to identify the one that was unsuccessful. 3. Queue error management When a chain is terminated in error any remaining I/O Processes within that chain may either continue execution or be cleared. This is controlled by mode parameters. When an I/O Process is terminated in error any remaining I/O Processes in the targets queue which address the same Logical Unit may either continue execution or be cleared. This is controlled by mode parameters. When an I/O Process is terminated in error any remaining I/O Processes within the targets queue may either continue execution or be cleared. This is controlled by mode parameters. 3.1 Autosense Any I/O Process which is terminated in error shall automatically return sense data before issuing a command complete message to the initiator.