kernel concept :: please give a feedback

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
anonym

kernel concept :: please give a feedback

Post by anonym »

i would like to write a kernel (i never written a kernel before!)and i have following thought:

* to write resource handler, for each computer resource the same.

* the resources are:
  - processor
  - memory
  - i/o ports
  - hard / floppy disks
  - ...

* for each resource a configuration file (like a script file) which determinate the sheduling policy, the access method and the other arguments of the resource. the resource handler must be on system disk once only.


please let me know if my thoughts are okay or absolutly strange... thanx :)
Xenos

RE:kernel concept :: please give a feedback

Post by Xenos »

Your concept looks fine. Resource managment depends on one major question: singletasking or multitasking? For the latter, you might want to create virtual resources (one screen for each app). Anyway, the resource handler would have to redirect calls to device drivers. I see no reason why this should not work.
anonym

RE:kernel concept :: please give a feedback

Post by anonym »

thanks a lot. i thought on multitasking. but i don't know exactly what you mean with "the resource handler would have to redirect calls to device drivers". i thought the resource handler looks like

resource <----> resource handler <----> os-call-gate <----> application
                       A
                       |
                configurations

configurations are: access method, scheduling policy, other arguments

the resource handler contents are:

* a semaphore
* a waiting queue
* a scheduler
* a interrupt handler (maybe)
* an error handler
* (i don't know but something would be here)

is this correct?i want the kernel with one modul for all resource handling, one database with all configurations and  a modul for the os-call-gate.but i'm not sure if that possible with this architecture.please tell me your ideas.
Xenos

RE:kernel concept :: please give a feedback

Post by Xenos »

Perhaps I misunderstood the meaning of "resource handler". I meant that resources (or devices) need special treatment, depending on what they do. Your resource handler should do something different whether a programs wants to accesss the floppy or put something to the screen. This should be done by seperate handlers, e.g. device drivers. The resource handler would than call them.
anonym

RE:kernel concept :: please give a feedback

Post by anonym »

ah okay. but i think it's possible to join the resource handler an the device drivers. is it? anyway fine thanks to you.
Xenos

RE:kernel concept :: please give a feedback

Post by Xenos »

Of course it is possible to join resource handler and device driver. Anyway, I recommend keeping the whole thing modular. If you separate resource handler and device drivers, it is easier to change something if necessary. For example, if you find a better resource sharing strategy or support new video modes, you just have to change one module.
anonym

RE:kernel concept :: please give a feedback

Post by anonym »

of cource that information, maybe the sharing strategy, is stored in a database. you can delete, insert and change configurations. you can make your own drivers. it´s the same as you say. but i have to change a database entry and you change a whole module. now i know, i´m on the right way. thanks a lot.
Post Reply