Re: Disk scheduling policy (Re: NEW_BUFQ_STRATEGY)

der Mouse <[email protected]>
Newsgroups gmane.os.netbsd.devel.kernel,gmane.os.netbsd.devel.performance
Message-ID <[email protected]>
>>> [...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	       [email protected]
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.