Re: disk head scheduling

Ingo Molnar (mingo@chiara.csoma.elte.hu)
Thu, 18 Mar 1999 20:50:36 +0100 (CET)


On Thu, 18 Mar 1999, Arvind Sankar wrote:

> I have a currently working algo which is greedy instead. i.e. for a new
> request, it computes the place where its insertion will produce the least
> incremental cost (where cost is the number of additional sectors to seek).
> It seems to work for me. No idea how to compare the two algos, though. Can
> somebody help me out here...

be careful. These are all well-known problems, and your algorithm (also
called SSF (smallest-seek-first) scheduling) is not fair enough. It has to
be coupled with a mechanizm that provides fairness. (ie. guarantees that a
request will not 'hang around' for too long time, unfairly blocking a
process just because the position of the sector is unfortunate)

> Another point is that IN_ORDER seems to be called only for two requests
> on the same device, so no idea why it compares the device numbers.

no, all requests (for all devices) are in a single 'queue'. (Per-major
device queues is candidate 2.3 feature, it's really simple)

-- mingo

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/