Hi, I have a few questions about general device management. I have simple MM and VFS implemented, but it struck me that for other types of devices I'd probably need many more abstraction layers just like how the VFS handles storage devices and FS's.
I would need one for sound, one for networking, one for graphics, one for webcams, one for printers and so on... or am I missing something? Also, input could be both from a file and the keyboard, output could be both to screen, COM, USB, file and well lots of stuff.. so would I tie the VFS to both the "input-layer" (keyb/mouse) and to the "output-layer" (VGA/screen) tie VFS, printer and so on to be able to redirect information/pipe stuff. It's getting very confusing...
How does other OS's (yours) handle this? Is there other ways to group similar types of devices together in interfaces, like PCI bus ID's or something? Or do I just have to bite the bullet and implement kernel layers to handle each group of hardware in a nice uniform way to user programs?
One thing is for sure, I wont use mount points like *nix style OS's since my OS will be very similar to DOS with a 32-bit unprotected, single tasking environment. Of course any information on how to deal with this stuff is welcome, but it would be even better if my OS goals and design where considered in the replies.
Or maybe if I should do some RTFM'ing, you could be kind enough to point me in the right direction?
TIA,
Christoffer
Device management
Re: Device management
My Device Manager will organize a tree of devices, with displays, sounds, networks, disks, etc
Each device type shares a common stub that provide basic functionality, while having different extend functions.
Take keyboard as an example, keyboard events is posted to the WM/GUI and deliver to focused process's input queue, that's all.
For console application, the main panel receive the key event and "unget" it to stdin, all done in application's implementation.
In short, the re-direction is done on the user-space "libgloss" which line up different devices and events, and call native kernel function to access devices.
Each device type shares a common stub that provide basic functionality, while having different extend functions.
Take keyboard as an example, keyboard events is posted to the WM/GUI and deliver to focused process's input queue, that's all.
For console application, the main panel receive the key event and "unget" it to stdin, all done in application's implementation.
In short, the re-direction is done on the user-space "libgloss" which line up different devices and events, and call native kernel function to access devices.
Re: Device management
Ok, thanks. Well, seems I have my work cut out for me..