[Coco] Boot flexibility in OS-9

John R. Hogerhuis jhoger at pobox.com
Wed Sep 29 15:28:05 EDT 2004


On Wed, 2004-09-29 at 12:01, Benoit Bleau wrote:
> > 
> > 	Any chance of getting a modular kernel like linux? OS-9 already has
> > everything organized in modules. Could drivers, managers, and
> > descriptors be loaded and unloaded on the fly?

Linux is a monolithic kernel with modules bolted on post facto. The only
reason I compile any of my kernel as modules is since sometimes the
modules crash and it is nice to be able to load/unload them and recover
without a reboot.

It also makes it a bit easier to test new drivers, but I haven't had
occasion to write one yet.

> > 
> > 					Kevin
> 
> Kevin,
> I'm pretty sure that you CAN 'load' drivers and descriptors on the fly, iniz
> the descriptors, and use the device that goes with them.
> 
> The reason why you want to load as much as possible at boot time is memory
> space.  If you load anything after boot, it will use an 8K page of memory
> for the code , if the code isn't loaded already, and, I think, an 8K page of
> memory for data space.  When everything is packed together, as with the
> os9boot, the code can be packed in pages of 256 bytes, which is much more
> efficient, but cannot be unloaded.

When I read OP, I thought the same thing... modules are packed into 8K
blocks and that's why you wouldn't want to dynamically load
everything... memory fragmentation, since memory for each module would
be allocated in quantum sizes of 8K. Your maximum fragmenttion on each
module is 1 byte less than 8K, but even on a 512K machine, an average of
4K X 2 (since data and code) = 8K wasted space is a lot if there are a
lot of modules.

But I see no reason why the 8K quantum concatenated modules couldn't be
built dynamically during boot. It would require new code, and it would
take a bit longer, but it sounds doable.

-- John.




More information about the Coco mailing list