A computer program product for hard disk drive command queue ordering in a disk drive including a processor unit, said computer program product including a plurality of computer executable instructions stored on a computer readable medium, wherein said instructions, when executed by said processor unit, cause the processor unit to perform the steps of:
- for each command in said hard disk drive command queue, calculating an expected access time including a probability of success calculation;
- for an estimated seek time of less than a time for one full revolution, said probability of success calculation including a calculation of a probability of a miss multiplied by a time of one extra revolution, and for an estimated seek time of greater than a time for one full revolution, said probability of success calculation including a calculation of a probability of a make multiplied by a time of one extra revolution;
- identifying a command in said hard disk drive command queue having a minimum calculated expected access time;
- and
- executing said identified command having a minimum calculated expected access time.