Tagged Command Queuing

Tagged Command Queuing (TCQ) is a technology built into certain ATA and SCSI[1] hard drives.

It allows the operating system to send multiple read and write requests to a hard drive.

ATA TCQ is not identical in function to the more efficient Native Command Queuing (NCQ) used by SATA drives.

To boost performance, the OS had to determine the order of the requests based on its own – possibly incorrect – perspective of the hard drive activity (otherwise known as I/O scheduling).

With TCQ, the drive can make its own decisions about how to order the requests (and in turn relieve the operating system from having to do so).

A modern elevator processes the requests to stop at floors in the logical order 2, 4, and 5, without unnecessary travel.

[2] Therefore, this standard was rarely implemented because it caused high CPU utilization without improving performance enough to make this worthwhile.

[4] SATA NCQ is a modern standard which drastically reduces the number of required CPU interrupts compared to ATA TCQ.

[2] Instead of interrupting the CPU before the task to force it to program the host bus adapter's DMA engine, the hard drive tells the host bus adapter which command it wants to execute, causing the host bus adapter to program its integrated first-party DMA engine with the parameters that were included in the command that was selected by the hard drive when it was first issued, and then the DMA engine moves the data needed to execute the command.