A method for breathing of scheduling algorithms for a storage device
(110). The method including: (a) computing a worst-case duration of a
breathing cycle (P) for the storage device (110); (b) starting a
breathing cycle; (c) determining if one of the following becomes true
before the end of P: (i) a number of real-time requests is at least a
predetermined threshold based on a number of data streams and performance
parameters of the storage device; and (ii) a number of pending requests
for any single stream becomes more than one; (d) if at least one of (i)
and (ii) remain true during the duration of P, starting a subsequent
breathing cycle after completion of the breathing cycle; and (e) if both
of (i) and (ii) are not true during the duration of P, waiting P time
units from the start of the breathing cycle before starting the
subsequent breathing cycle.