Subject: Re: Disk scheduling policy (Re: NEW_BUFQ_STRATEGY)
To: None <tech-kern@NetBSD.org, tech-perform@NetBSD.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-perform
Date: 12/01/2003 18:52:55
>>> [...disk access scheduling...]
>> That can lead to starvation.  The best bet is to keep it simple and
>> make sure that you sweep back and forth, never doubling back.
> Would it not be better to simply do iterative sweeps from [0..n] each
> time, and if a request comes in to write a block at an address which
> has already been surpassed, it will not get serviced until the next
> regular iteration?

Practically any operating systems textbook will talk about such things;
they did even in the early '80s when I was in school.  There's been a
lot of work put in on the question already....

Unfortunately, there's no short summing-up of the accumulated wisdom.
Like a lot of cases where there are many plausible simple algorithms,
the answer is "it depends on your workload and your goodness metric".
Sometimes elevator sort wins.  Sometimes bidirectional elevator sort
wins.  Sometimes closest-block wins.  Sometimes even FCFS wins.  Etc.

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML	       mouse@rodents.montreal.qc.ca
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B