Re: Disk Scheduling
Re: Disk Scheduling
- Subject: Re: Disk Scheduling
- From: Justin Walker <email@hidden>
- Date: Tue, 25 Mar 2003 14:48:06 -0800
On Tuesday, Mar 25, 2003, at 14:16 US/Pacific, Shawn Erickson wrote:
On Tuesday, March 25, 2003, at 12:06 PM, Joey Echeverria wrote:
I'm talking about the low level scheduling of writing logical blocks
out to disk. For example, FIFO, SSTF, LOOK, C-LOOK, etc. The reason
that I'm interested is that we are looking into power efficiency in
operating systems. One thing we wanted to investigate is if there is
any effect to the energy usage when using different algorithms. One
idea that we had was to be able to queue requests for longer in an
operating system buffer and only write to disk when the queue becomes
a certain size. We were thinking that under such a scheme, you could
keep the disk stopped for longer periods of time to save the energy
from keeping it spinning.
To my knowledge Mac OS X does no buffering of writes to disk,
I think that the kernel actually does buffer writes to disk, in the
"unified buffer cache", using variations on 'classical' Unix
cache-management schemes. Depending on what the data is, and how it's
being written, it could be a while before the data ends up on the disk.
There are, however, no scheduling mechanisms of the sort referred to
above. I believe the reasoning is that, these days, the OS does not
have a good idea of the actual disk geometry and other performance
characteristics, and so we leave that level of scheduling up to the
controllers in the disk drive itself. I think, for example, that
recent IBM drives have some variant of OS/2 running in the controller.
Since the OS knows nothing about heads, tracks, cylinders for modern
commodity disks, it's futile to try to schedule I/O for them.
it simply uses a write through caching scheme (file system structure
updates may be cached for a short bit I think). I also believe it does
no scheduling or coalescing of IO requests, just simply FIFO (or
whatever the bus/disk driver is implemented to do). It leaves the
scheduling up to the disk / array controller.
Coalescing is, in fact, done by the kernel, as part of the UBC
operation. As for the rest, the controllers tend to be sufficiently
intelligent that the OS can only confuse the issue by trying to apply
strategy.
Corrections welcome.
Regards,
Justin
--
Justin C. Walker, Curmudgeon-At-Large *
Institute for General Semantics | When LuteFisk is outlawed
| Only outlaws will have
| LuteFisk
*--------------------------------------*-------------------------------*
_______________________________________________
darwin-kernel mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/darwin-kernel
Do not post admin requests to the list. They will be ignored.