Hi,
SpyderTL wrote:
Quote:
If the OS is smart (and I'm not saying Windows is smart), very low priority reads (for pre-fetching) would be broken up into lots of small operations (e.g. one seek only, then read one sector, then read the next sector, and so on) and wouldn't be a single large "seek then read 1234 sectors" thing; so that (for worst possible case) if a high priority transfer is requested at any point the time until the higher priority transfer can begin is always negligible (e.g. possibly faster than waiting for the drive to come out of a power saving state that it would've been in if there was no activity).
The problem is with the "seek" command. Once that has been executed, you've already tied up the drive for a few milliseconds, and you are better off just finishing the entire "transaction", because being interrupted and seeking back to where you just came from is a complete waste of time.
You're ignoring rotational latency (waiting for the start of the sector you want to pass under the disk head, after the head is on the right track). For a 5400 RPM disk drive it takes 1/(5400/60) seconds (or 11.11111 ms) for the disk to rotate once, so on average you can expect rotational latency to be 5.5555 ms.
For a low priority read (where the data being read might never actually be needed) I'd skip the "5.5555 ms" rotational latency just to get a high priority ("needed ASAP") read started sooner.
SpyderTL wrote:
But I would still prefer setting up my own startup sequence, rather than someone at Microsoft writing some heuristic algorithm to try to guess my usage pattern and pre-load any data that it thinks I will use at boot time.
I would rather the OS boot 1 second quicker, and then stop hitting the hard drive completely. Even if that meant that loading all three of my applications took 3 seconds longer.
For your specific usage pattern; best case would be for everything to be in contiguous sectors in order, starting with the OS's boot files, then Visual Studio's files, then Outlook's files, etc; so that the OS can do "prefetch whole track, one by one" (with minimal seeking) from very early boot (e.g. starting before things like networking, etc are initialised).
Of course I don't think Windows is able to optimise disk layout like that (even though it should know the order to prefetch things).
SpyderTL wrote:
Let me ask this question. We can all agree that MS-DOS boots faster than Windows or Linux. A lot faster, in fact. Let's say 2 seconds from the end of POST...
Now, let's say that the 3 applications that you use most actually would run in MS-DOS, today. They had the same start up time, and had the same functionality. Hypothetically...
Now, the question is, would you still use Windows/Linux?
On modern hardware DOS should boot in less than half a second on modern hardware; not because it's good, but because it's a crippled piece of crap that does almost nothing (e.g. loads very few drivers, doesn't start a GUI, doesn't do network auto-config, etc). Obviously doing nothing is faster than doing something useful (like providing features that modern end users expect now).
Hypothetically; if anyone tried to implement something like Visual Studio on DOS it'd probably take 10 times longer to start because the OS is so retarded it doesn't even support asynchronous IO (the entire OS and everything running on it "freezes" while the disk controller is doing a DMA transfer), and doesn't support memory mapped files either (so the executable file and its shared libraries/DLLs have to be fetched in entirety before they can be used, and the OS can't fetch only what is needed/used and avoid a whole pile of unnecessary disk IO).
SpyderTL wrote:
This, incidentally, is the focus behind my current OS / UI design. I want to boot faster than DOS, and have enough functionality to browse the web and watch videos. So far, I've got the first part nailed. Now I'm just working on the second part...
Like I said; doing nothing is faster than doing something useful (like providing features that modern end users expect). Booting faster than DOS is easy if your OS does less than DOS.
Cheers,
Brendan