Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Darwin disk I/O question



On Thu, 18 Jan 2001 08:55:03 -0800, Dave Yost wrote:
[ ... ]
> I know classically unix has taken the position that disk drivers are
> expected to keep the request queue sorted by cylinder and sector position
> to minimize total time spent waiting for seek and rotational latency, i.e.
> to maximize total disk throughput.
>
> Is this still true in Darwin? Or do Darwin disk drivers sort requests based
> on the requesting process's priority? Could they if they wanted to, or
> would there have to be a change to the driver protocol?

It's an interesting notion, but remember that there is a logical seperation
between a process requesting I/O, the filesystem implementation which
converts something like an open() or read() system call against a
filedescriptor into a set of logical disk sectors to be read, and the
low-level device driver which actually implements the raw I/O to a particular
device. Also note that the C/H/S values used by IDE drives nowadays are a
complete fiction, and have no correlation to the physical geometry layout.

The priority of a process is meaningful only to scheduling CPU time, I
believe. I don't think that there could be a simple relationship for
prioritizing I/O. Remember that a file can be held open by many processes at
once-- how would you decide which process priority to pay attention to?

Frankly, a better abstraction for managing I/O would be to support realtime
functionality like guaranteed bandwidth delivery or maximum service interrupt
latency.

--

Back to the issue of scheduling disk I/O, for a second. I haven't had any
time to review the new device driver frameworks, or how Darwin handles these
abstractions. Does Darwin support:

- SCSI tagged command queuing
- I/O event queue coalescing
- sorting the I/O queue as Dave implied (the "elevator seek algorithm", etc)

I don't care much about IDE, but I suppose supporting:

- multi-sector transfers
- DMA-mode access rather than the PIO modes

....would also fit. :-)

[Of course, pointers to relevant portions of the source would certainly do.]

-Chuck

Chuck Swiger | email@hidden | Sturmbannfuhrer BOFH
-------------+-------------------+---------------------
Pavlovian slaver at the cash till ring of success... _M


References: 
 >Darwin disk I/O question (From: Dave Yost <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.