OSDev.org
https://forum.osdev.org/

MM Questions
https://forum.osdev.org/viewtopic.php?f=1&t=9036
Page 3 of 3

Author:  distantvoices [ Mon Jan 10, 2005 7:55 am ]
Post subject:  Re:MM Questions

I gonna use the golden middle: have certain things be processed during runtime on a rather low priority: say: check if blocks are to be committed to disk, perform file system consistency checks (why only at start up and before mounting the damned thing? Oh, I understand, but what's wrong with doing some inbetween checking a la 'oh, i have nothing to do, lets check the file systems')

I'd have the os only preload those applications the user tells it to load. I don't want an OS trying to do smart things - and gets into my way by doing so.

concerning the example with the prerendered video: and for fetching another, unknown website it would spend time as usual, hm? *shrugs* I prefer quick and correct rendering of website content to - prefetched/prerendered. How knows the os what I'm about to do next except by doing statistics to some length.

Author:  Brendan [ Mon Jan 10, 2005 9:07 am ]
Post subject:  Re:MM Questions

Hi,

beyond infinity wrote:
I gonna use the golden middle: have certain things be processed during runtime on a rather low priority: say: check if blocks are to be committed to disk, perform file system consistency checks (why only at start up and before mounting the damned thing? Oh, I understand, but what's wrong with doing some inbetween checking a la 'oh, i have nothing to do, lets check the file systems')


There's nothing wrong with that, as long as your careful. For example, it may seem like a good idea to use low priority to commit data to disk but the OS must also be able to do it as high priority. Otherwise if the CPU is overloaded for long enough data will never be commited to disk, and that's asking for trouble. In general if it doesn't matter if something never gets done, then use low priority only, but if it has to be done sooner or later use low priority and high priority code to make sure things aren't post-poned for too long.

beyond infinity wrote:
I'd have the os only preload those applications the user tells it to load. I don't want an OS trying to do smart things - and gets into my way by doing so.


If all your scheduling is good enough (and here I mean the CPU time scheduler, the hard-disk transfer scheduler, the ethernet driver's packet transmission scheduler, etc) then lower priority work will never effect higher priority work. I should point out here that you'd need to prioritize everything (not just threads), and obey those priorities (e.g. no unbuffered IPC messing up the thread scheduler), and allow things to be cancelled if they're no longer needed (or their priority changed).

beyond infinity wrote:
concerning the example with the prerendered video: and for fetching another, unknown website it would spend time as usual, hm? *shrugs* I prefer quick and correct rendering of website content to - prefetched/prerendered. How knows the os what I'm about to do next except by doing statistics to some length.


I prefer to wake up to find a nice hot cup of coffee ready for me, rather than asking someone to do this and then waiting for it to be done (not that either is likely). As for the statistics your web browser probably already keeps "history", adding a "frequency" to it wouldn't consume a significant amount of time.

Due to limited development time (and limited RAM) you'd need to focus the pre-processing towards things that are practical and slow the user down. For example, defragging and scanning for bad sectors should never need to be initiated manually (windows 95/98), nor should it waste the users time during boot (*nix) or effect the performance of the system while it's being done. It wouldn't be too hard to add this while your writing the defragger and disk scanning code, so why not?

How about a compiler/IDE that uses idle time to find syntax errors in your source code, or pre-converts source files into object files ready for linking? I doubt I'd ever attempt it, but...

There's a huge scale, ranging from practical (spell-checking in the background) to impossible (pre-generating source code for a project you might start). That's why I said a "perfect" OS. It's like my idea of a perfect pencil - it taps into your brain waves and does all the writing/drawing by itself, has a built in DVD player, will mow the lawn, clean the dishes and service the car even though it's half the size of a regular pencil and costs much less.


Cheers,

Brendan

Author:  Candy [ Mon Jan 10, 2005 1:18 pm ]
Post subject:  Re:MM Questions

Brendan wrote:
...has a built in DVD player, will mow the lawn, clean the dishes and service the car...


Do you have a working beta / prototype for the dishes part? I could really use that right now... No OSdev for me tonight :(... The DVD part might also be quite useful, as mplayer doesn't recognise this new movie I've got...

Page 3 of 3 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/