A computer program product for efficiently sorting queued commands with unknown rotational latency in a direct access storage device (DASD) 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:
- executing a current command;
- for each command in a DASD command queue, simultaneously with executing said current command, calculating an initial expected access time including a probability of success calculation and storing said calculated expected access time together with a plurality of predefined variables in a respective row in a miss table;
- utilizing said stored miss table simultaneously with executing said current command, calculating a best candidate command list for a plurality of different starting locations for a next command to be executed;
- identifying an actual starting location for said next command to be executed;
- and
- utilizing said best candidate command list for said plurality of different starting locations, selecting a command in a DASD command queue to execute for said actual starting location.