From: wolff@liberator.et.tudelft.nl (Rogier Wolff) Subject: Re: Microkernel Date: Tue, 16 Mar 1993 17:46:31 GMT
Kevin Brown (kevin@nuchat.sccsi.com) writes:
>In article <1993Mar10.012429.1036@colorado.edu> drew@hamlet.cs.colorado.edu (Drew Eckhardt) writes:
>>
>>This presents problems in the kernel, since it assumes that
>>physical addresses = virtual addresses, and this won't necessarily
>>be the case.
>>
>>People have written code to load device drivers at run time,
>>but the genereal consensus among the Linux kernel hackers seems to
>>be that loadable kernel parts isn't a good idea.
>>
>>- If you implement the kernel part in user space as a separate
>> process, you have a couple of extra expensive context
>> switches.
>>
Please explain: I wrote "larix" Load And Run In Kernel Space.
If your new device driver needs 8k of memory two pages are allocated,
and mapped into the virtual addres space of the kernel. This is ideal
for code and data that is to be accessed by the processor. It is not
very handy for buffers that are to be used for DMA: you have to do the
virtual-to-physical translation "by hand".
>On the other hand, loadable device drivers would be indispensable for the
>driver hacker, provided that the driver they are hacking on isn't mandatory
>for bringing up the system and that there exists a way to unload a device
>driver at runtime.
>This actually covers quite a bit of ground, and the same is probably also
>true of filesystems.
Larix supports unloading at runtime. I even hacked the existing drivers
to be "loaded" at boot, which enabled me to unload them whenever I want
to.... (Something to try: unload the driver for the harddisk......).
>The trick is figuring out how to get these things loaded into *kernel*
>space, since (as you point out so well) running such things in user space
>is a serious loss.
Load and run in KERNEL SPACE.....
>There exists some minimum kernel configuration which is capable of eventually
>coming up in fully-functional form. You'd need:
> - One filesystem type
> - One disk device type
> - Console and keyboard.
>It's not clear that you'd even need the console and keyboard, though you'd
>be totally in the dark if something went wrong before the console driver
>could be loaded. The benefits of having the console and keyboard drivers
>built into the kernel are, I think, great enough that making them permanent
>parts of the system is warranted.
I would like to add the memory handling devices to this list: they
initialize some structures, which are used by e.g. the console and
keyboard drivers.... But this is not a theoretical point. This probably
only proves that this code is in the wrong place in the first place.
Roger.
-- **** a 486 in V86 mode is like a VW buggy with a 6 litre V12 motor. **** EMail: wolff@duteca.et.tudelft.nl ** Tel +31-15-783643 or +31-15-142371