An article of manufacture for use in programming a controller to select an input/output (I/O) command in a queue of I/O commands, wherein each command operates within a range of addressable locations on a storage medium, wherein each of the addressable locations is defined according to a sector number and track number, the article of manufacture comprising a controller accessible storage medium including at least one program embedded therein that is capable of causing the controller to perform:
- providing a plurality of buckets, wherein each bucket represents a range of consecutive sector numbers, and wherein the queued I/O commands are associated with a bucket such that a sector number of an addressable location in which an I/O command operates is within the range of consecutive sector numbers comprising the associated bucket;
- determining a reference position;
- and
- executing a selection routine to select an I/O command to execute against the storage medium by performing:
- (i) selecting a bucket including at least one I/O command;
- (ii) selecting an I/O command within the selected bucket;
- (iii) determining whether the selected I/O command meets a selection criteria based on the reference position;
- (iv) indicating the selected I/O command as the I/O command to process after determining that the selected I/O command meets the selection criteria;
- and
- (v) performing another iteration of the selection routine after determining that the selected I/O command does not meet the selection criteria.