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 - better interactive response



On Wednesday, January 24, 2001, at 04:00 PM, strobe anarkhos wrote:

> You know, if you are concerned about UI responsiveness I don't see how this isn't already
> handled by the threading priority of CPU tasks. When dragging a window for example, that
> task is given all the CPU it requires and other tasks which may or may not be accessing the
> drive would be preempted.

In general anything doing IO, especially disk IO, should use very little CPU. If the IO sub-system and drivers are correctly designed (which I believe they are) the CPU should only need be involved when setting up and completing an IO operation (please avoid buffer copies!!!). During the interim time between issue and complete the thread(s) doing the IO op should be blocked on a signal of some type. Now ATA/EDE and other IO devices could require polling but that shouldn't take much CPU time (please no spin loops!!!).

To give an example: on my (uggh...) NT system, with a Fibre Channel driver I helped to develop, we can sustain 85+ megabytes a second and only burn between 4-12% of the CPU on a PIII 500 (depending on IO size). (By the way activating a little bit of debugging code causes the CPU consumption to easily double or triple).

I hope to achieve the same on Mac OS X with the Fibre Channel driver I am currently working on. From what I see the IOKit should allow for this... another month and I should be able to tell.

> If you're really concerned about responsiveness you would advocate having the window
> server draw the title and menu bars instead of each application. The window server would
> handle mousing events in the menu and draw the menus without having to wait for the
> application to respond to an IPC.

You still need application interaction when displaying a menu so that menu items can be activated/deactivated before display. I guess this could be addressed by having the application push changes to the menu manager when the state of an item changes (the reverse of what we have now).


-------------------
Shawn Carl Erickson
FreeTime Software




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.