Another OS-related post
-
A few hours ago, I put the last few pieces of my kernel together; for the moment, it's functionally complete. Message passing is working, I have rudimentary support for multiple CPUs, (and hence multiple schedulers) and I can load and run a bootstrap program which initializes the FPU and thus brings my scheduler to life. Driver management is done, and my system calls are pretty much complete (shared page functions are stubbed.) All I need to do now is start working on an interface for each driver type. Given the volume of stuff that I've got to do before it's workable, I've got two (non-programming) questions:
- I've got the code and I'm ready to start offering around the web address, but haven't firmly decided on a license for it yet. At the moment, I'm considering just adding something in a readme file which says that no license more restrictive than the BSD license can be applied without my written consent, and that any direct copies must credit me and link back to the repository; are there any obvious loopholes in that which I might have overlooked?
- To identify a driver, I use a bitmask with the following types: timer, bus, storage, display, sound, network interface, keyboard, mouse, printer, scanner, camera, port, CPU, plain-text input device, plain-text output device. Are there any common types of device that I might have missed?
OSDev :)
-
A few hours ago, I put the last few pieces of my kernel together; for the moment, it's functionally complete. Message passing is working, I have rudimentary support for multiple CPUs, (and hence multiple schedulers) and I can load and run a bootstrap program which initializes the FPU and thus brings my scheduler to life. Driver management is done, and my system calls are pretty much complete (shared page functions are stubbed.) All I need to do now is start working on an interface for each driver type. Given the volume of stuff that I've got to do before it's workable, I've got two (non-programming) questions:
- I've got the code and I'm ready to start offering around the web address, but haven't firmly decided on a license for it yet. At the moment, I'm considering just adding something in a readme file which says that no license more restrictive than the BSD license can be applied without my written consent, and that any direct copies must credit me and link back to the repository; are there any obvious loopholes in that which I might have overlooked?
- To identify a driver, I use a bitmask with the following types: timer, bus, storage, display, sound, network interface, keyboard, mouse, printer, scanner, camera, port, CPU, plain-text input device, plain-text output device. Are there any common types of device that I might have missed?
OSDev :)
You may want: - batteries - modems - system devices (Windows has a huge list) maybe differentiate displays and display adapters? maybe differentiate storage devices themselves from their interface? maybe group all imaging devices (camera, scanner, ...)? how about interrupt management as a separate device? what with SD cards and the like? and why would you want a bitmask? seems like a limitation you will end up regretting... :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
-
You may want: - batteries - modems - system devices (Windows has a huge list) maybe differentiate displays and display adapters? maybe differentiate storage devices themselves from their interface? maybe group all imaging devices (camera, scanner, ...)? how about interrupt management as a separate device? what with SD cards and the like? and why would you want a bitmask? seems like a limitation you will end up regretting... :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
Thanks for the device suggestions.
Luc Pattyn wrote:
maybe differentiate displays and display adapters?
Good idea, I'll be doing that shortly.
Luc Pattyn wrote:
maybe differentiate storage devices themselves from their interface?
An interface can usually store multiple devices, so I class it as a bus.
Luc Pattyn wrote:
maybe group all imaging devices (camera, scanner, ...)?
Camera and scanner are image input devices, so I can understand that. But printers? Perhaps the best way to work with this is for a imaging input device type, and an imaging output device type...
Luc Pattyn wrote:
how about interrupt management as a separate device?
Are you talking about the IOAPIC and such? Again, I'll add that shortly.
Luc Pattyn wrote:
what with SD cards and the like?
I class them as a storage device.
Luc Pattyn wrote:
and why would you want a bitmask? seems like a limitation you will end up regretting...
Ugh. My typos strike again. I'm using a bit_map_, so that my OS can adapt to any strange devices that might come out, such as cameras which can also store data, or keyboards with USB hubs (buses) in, or sound cards which also perform interrupt redirection (hopefully not the last case - it sounds like a horrid design) [edit] As if by magic, my errors have disappeared... ;)
OSDev :)
-
Thanks for the device suggestions.
Luc Pattyn wrote:
maybe differentiate displays and display adapters?
Good idea, I'll be doing that shortly.
Luc Pattyn wrote:
maybe differentiate storage devices themselves from their interface?
An interface can usually store multiple devices, so I class it as a bus.
Luc Pattyn wrote:
maybe group all imaging devices (camera, scanner, ...)?
Camera and scanner are image input devices, so I can understand that. But printers? Perhaps the best way to work with this is for a imaging input device type, and an imaging output device type...
Luc Pattyn wrote:
how about interrupt management as a separate device?
Are you talking about the IOAPIC and such? Again, I'll add that shortly.
Luc Pattyn wrote:
what with SD cards and the like?
I class them as a storage device.
Luc Pattyn wrote:
and why would you want a bitmask? seems like a limitation you will end up regretting...
Ugh. My typos strike again. I'm using a bit_map_, so that my OS can adapt to any strange devices that might come out, such as cameras which can also store data, or keyboards with USB hubs (buses) in, or sound cards which also perform interrupt redirection (hopefully not the last case - it sounds like a horrid design) [edit] As if by magic, my errors have disappeared... ;)
OSDev :)
Yeah, bitmap/bitmask, same difference; you could still run out of bits. For multi-function devices, I don't know; haven't thought that one through yet. A logical approach would be to consider them an aggregate of multiple devices, however them sharing some resources (such as interrupt logic, DMA) may cause some problems. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
-
Yeah, bitmap/bitmask, same difference; you could still run out of bits. For multi-function devices, I don't know; haven't thought that one through yet. A logical approach would be to consider them an aggregate of multiple devices, however them sharing some resources (such as interrupt logic, DMA) may cause some problems. :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
I only read formatted code with indentation, so please use PRE tags for code snippets.
I'm not participating in frackin' Q&A, so if you want my opinion, ask away in a real forum (or on my profile page).
Luc Pattyn wrote:
Yeah, bitmap/bitmask, same difference; you could still run out of bits.
I've already considered that, and have a custom Bitmap class ready for implementation. Perhaps when I allow a process to become a driver, I should let it provide an array of n integers to form a large bitmap?
Luc Pattyn wrote:
A logical approach would be to consider them an aggregate of multiple devices, however them sharing some resources (such as interrupt logic, DMA) may cause some problems.
The interrupt logic is what confounds me about the multiple device approach. For the moment, I just give them an interface (still designing) to adhere to for every bit they choose to set and treat them as a single device. But even then I hit a problem when it comes to code duplication. I might create a shared library of common device management functions, and link my drivers against it.
OSDev :)