Driver design question
Fri, 14 Jul 1995 10:10:33 -0800
>Bill has put a proposal on the table for user-level domains to drive
>the disks. Presumably these domains run with full authority on kernel
>memory, since they need to be able to update things like the core
>table and the page and node frames. It seems likely to me that such a
>domain would duplicate a fair bit of code with the kernel. There are
>also some locks that need to be held in an MP setting that are
>difficult to obtain cheaply without the authority to disable
>interrupts on older x86 architectures. The newer ones have atomic
>compare and swap, which helps a lot.
I always like to look at such domains as being as close to joe-user domain
as possible. So I try to think about just what capabilities such a domain
would need. I see three: (1) A device key to the disk. (2) A page key
like key to the core frame. (3) a key that would allow the domain to wait
for work from the kernel. Presumably the kernel would restart the waiting
disk domain with information about the disk page to read and a key 2 to the
frame to read it into. When the read had completed, the driver domain
would again invoke key 3 with the results of the read. The kernel would
then update the core table.
>How should such domains be scheduled? If a program read-faults an
>object, does that imply an immediate context switch into the disk
>manager? Or does it just mean that we schedule the disk manager to
>run? Similarly, when an I/O completion interrupt happens, does the
>disk manager domain preempt whatever was running? If it doesn't, I/O
>throughput goes way down.
In the end, scheduling is a matter of management policy. I can imagine
real-time domains that are more important than the disk driver. The
scheduling paradyme of always run the ready domain with the best priority
seems to work here.
>If we push this to conceptual extremes, we just turned page keys and
>node keys into start keys, and it becomes interesting to ask if the
>kernel's core range table doesn't want to turn into some more general
>sort of registry.
I think if you turn page keys into start keys, then you need to be running
on an architecture like the 68K which allows a program to simulate the
memory bus. Making nodes into start keys means you need to have another
way to represent domains. KeyKOS is quite wedded to the idea of totally
separate spaces for keys and data.
Bill Frantz Periwinkle -- Computer Consulting
(408)356-8506 16345 Englewood Ave.
firstname.lastname@example.org Los Gatos, CA 95032, USA