Re:Could you read it before denouncing?
Posted: Fri May 19, 2006 6:37 pm
<...continued>
Once I've got this figured out, appropriate arguments and functions for each type (along with the partial mapping arguments mentioned earlier) will go into the next revision.
So will read-string and write-string port I/O functions. All those ring switches really do sound bad, despite being progammatically elegant (ie: what Scheme Would Do).
Again, I/O segmentation sounds like a great idea, especially along with the mechanism (to be invented) for telling drivers their hardware paramaters (IRQs, memory ranges, I/O ports, etc). However, I do want to here from other people (we've got 2 votes for now, none against) before adding it.
run() has been renamed switch_to_thread(), and I plan on adding "edi_" to the front of normal EDI routines. EDI class methods should have their names built into the routine names already.
How's fork_thread() as a name for spawn_thread()? I still think that fork() or vfork() implies too much about a process table the kernel may or may not be keeping.
Unfortunately, what you said about your device manager really only helps with your kernel. Not that your kernel is insignificant or so bad or anything (DON'T take this personally), but what's really needed is some simple mechanism for the driver to identify the hardware it drives, and be given its hardware parameters.
I'm not sure about what it would be, but I think that some kind of data structure should be used to convey what hardware a driver drives. A set (or array, or whatever) of these could be declared const in the driver with a fixed name. When the driver is loaded (I think it's safe to assume drivers will be loaded in some object format that supports symbols, no?) the kernel can read this symbol, read the data structures there, and use this information to know about the drivers hardware.
Then, when the driver calls init_edi(), it can pass data structures asking for pointers to EDI objects representing its hardware resources. The kernel will pass back pre-initialized (already created and set up with hardware resources, unable to be initialized again) objects to the driver, and the driver will run with these resources. This gives the advantage of the driver not even knowing (or needing to know) its specific hardware parameters.
If the kernel doesn't know what resource to grant, but knows what type of resource, it can grant an uninitialized object that the driver can initialize to its own parameters.
This leaves the kernel with having to figure out hardware parameters for drivers, but there's either a way around that or we can solve that issue.
To your paragraph about message passing (omitted to save space): That's the reason I support this function-calling idea. See below.
Oy is this message long,
Eli
Once I've got this figured out, appropriate arguments and functions for each type (along with the partial mapping arguments mentioned earlier) will go into the next revision.
So will read-string and write-string port I/O functions. All those ring switches really do sound bad, despite being progammatically elegant (ie: what Scheme Would Do).
Again, I/O segmentation sounds like a great idea, especially along with the mechanism (to be invented) for telling drivers their hardware paramaters (IRQs, memory ranges, I/O ports, etc). However, I do want to here from other people (we've got 2 votes for now, none against) before adding it.
run() has been renamed switch_to_thread(), and I plan on adding "edi_" to the front of normal EDI routines. EDI class methods should have their names built into the routine names already.
How's fork_thread() as a name for spawn_thread()? I still think that fork() or vfork() implies too much about a process table the kernel may or may not be keeping.
POSIX threads are already adapted for cross-platform use? Nifty and excellent. EDI will employ a subset of POSIX pthread functionality to perform its threading.POSIX pthreads aren't too bad, but they aren't as elegant/simple as possible. This is because they're designed to work on a variety of OSs, and therefore need to at least cope with different ways of handling scheduling, processes, threads, etc. For example, for Linux everything is a process (a thread is just a process that shares an address space with another process), while for some versions of *NIX threads are implemented in a user-level library and the kernel has nothing to do with them. The POSIX stuff also has a lot of things I think you can ignore (like thread specific data, signals, etc).
Unfortunately, what you said about your device manager really only helps with your kernel. Not that your kernel is insignificant or so bad or anything (DON'T take this personally), but what's really needed is some simple mechanism for the driver to identify the hardware it drives, and be given its hardware parameters.
I'm not sure about what it would be, but I think that some kind of data structure should be used to convey what hardware a driver drives. A set (or array, or whatever) of these could be declared const in the driver with a fixed name. When the driver is loaded (I think it's safe to assume drivers will be loaded in some object format that supports symbols, no?) the kernel can read this symbol, read the data structures there, and use this information to know about the drivers hardware.
Then, when the driver calls init_edi(), it can pass data structures asking for pointers to EDI objects representing its hardware resources. The kernel will pass back pre-initialized (already created and set up with hardware resources, unable to be initialized again) objects to the driver, and the driver will run with these resources. This gives the advantage of the driver not even knowing (or needing to know) its specific hardware parameters.
If the kernel doesn't know what resource to grant, but knows what type of resource, it can grant an uninitialized object that the driver can initialize to its own parameters.
This leaves the kernel with having to figure out hardware parameters for drivers, but there's either a way around that or we can solve that issue.
To your paragraph about message passing (omitted to save space): That's the reason I support this function-calling idea. See below.
I'm thinking like you, that the EDI layer the driver sees may end up being a library rather than the kernel itself. A monolithic kernel with the ability to call functions in the driver directly wouldn't need it, but a microkernel could link an EDI-marshalling layer to the driver. This layer would marshall driver calls to EDI into proper messages, unmarshall kernel/outside-world calls on the driver into proper function calls, run silently (so the driver doesn't know it isn't talking to a function-calling kernel), and be written uniquely for each OS.I'm thinking that some form of "OS specific" wrapper is going to be unavoidable, and that EDI drivers could just export standard functions that are either linked directly to the kernel (for monolithic kernels) or linked to a generic wrapper or shared library/DLL (for micro-kernels). That way the EDI driver source code itself doesn't need to care whether "port_read_method()" is actually routed through twelve different processes before being done or if it's an inline function, and the kernel or the wrapper could use EDI driver functions like "readSectors(LBA_address, count, void *destination)" or "draw3Dtriangle(point1, point2, point3, texture, opacity)".
Oy is this message long,
Eli