Author Topic: What type of kernel do you guys plan to design?  (Read 6925 times)

0 Members and 1 Guest are viewing this topic.

Offline Warrior

  • supreme mac daddy of trolls
  • Hero Member
  • *****
  • Posts: 7507
  • One for a Dime two for a Quarter!
    • View Profile
What type of kernel do you guys plan to design?
« on: June 19, 2005, 06:41:52 PM »
I plan to have a Microkernel in which most of the drivers are in user mode thus having a huge security advantage over the monolithic design.

Say something like a GUI Driver crashes, you can restart the service and anything linked to it and resume what you were doing withought crashing the kernel, and since there is less kernel mode code there is less things probable to cause a fatal error.

The disadvantage of a microkernel is that it needs to context switch (usermode->kernelmode vice versa) frequently which can have a significant decrease in speed but I think that the security advantage is too good to pass up.

Ideas, thoughts?
One must ask oneself: "do I will trolling to become a universal law?" And then when one realizes "yes, I do will it to be such," one feels completely justified.
-- from Groundwork for the Metaphysics of Trolling

Offline Joe

  • B&
  • x86
  • Hero Member
  • *****
  • Posts: 10324
  • In Soviet Russia, text read you!
    • View Profile
    • William's Blog
Re: What type of kernel do you guys plan to design?
« Reply #1 on: June 19, 2005, 07:47:42 PM »
I'll probably be doing a monolithic kernel, as I don't plan to do much more than string recongnition and doing responces to it (a console). However, if I ever wanted to write a OS which could run third-party programs, I'd go microkernel.
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline zorm

  • Hero Member
  • *****
  • Posts: 591
    • View Profile
    • Zorm's Page
Re: What type of kernel do you guys plan to design?
« Reply #2 on: June 19, 2005, 09:57:00 PM »
Sure a microkernel isn't going to be more coding and a larger size? I'll likely do a mix but mostly going towards monolithic. Im not sure a microkernel has any real advantages at the end of the day. If you want to upgrade a driver without a reboot you still have to disable/shut off everything thats accessing the device or you might run into lots of problems. Since you have to shut off your programs its causing downtime and well you might as well have just rebooted.

The ekokernel and nanokernel concept is way out there. It may look good on paper but I think if its ever tried it will be found to be not practical.
"Frustra fit per plura quod potest fieri per pauciora"
- William of Ockham

Offline Warrior

  • supreme mac daddy of trolls
  • Hero Member
  • *****
  • Posts: 7507
  • One for a Dime two for a Quarter!
    • View Profile
Re: What type of kernel do you guys plan to design?
« Reply #3 on: June 19, 2005, 10:29:42 PM »
Microkernel really has most of the features a monolithic does but it also needs to communicate via message passing which isn't too much code, plus most of the code a monolithic runs in kernel mode a micro runs in user mode making the kernel code smaller but in the end the code is about the same. The effort put into a micro kernel is greater than that of a monolithic one of course since the kernel needs to act as a "server" to communicate which each process in an easy way. Don't monolithics need to shutdown to upgrade a driver, and if they don't what makes microkernels have to because that sounds like a design issue to me. The only time a service and anything using it should be restarted is on a caught exception that is fatal to the service itself.
One must ask oneself: "do I will trolling to become a universal law?" And then when one realizes "yes, I do will it to be such," one feels completely justified.
-- from Groundwork for the Metaphysics of Trolling

Offline zorm

  • Hero Member
  • *****
  • Posts: 591
    • View Profile
    • Zorm's Page
Re: What type of kernel do you guys plan to design?
« Reply #4 on: June 20, 2005, 12:18:08 AM »
Im not saying monolithic kernels don't have to reboot just that there is no advantage of being able to restart a service for something like an upgrade without rebooting. I sorta doubt you'll be able to play counter-strike and upgrade your video card driver at the same time. Counter-strike will have to be turned off, so the advantage really isn't there.

On code size, im comparing the kernel+services of a microkernel to that of a monolithic kernel. A microkernel is going to have more because it has to communicate with the services. The microkernel's services also have to have more to talk to the microkernel. The actually code for getting work done should stay the same for both microkernel and monolithic kernel.
"Frustra fit per plura quod potest fieri per pauciora"
- William of Ockham

Offline Warrior

  • supreme mac daddy of trolls
  • Hero Member
  • *****
  • Posts: 7507
  • One for a Dime two for a Quarter!
    • View Profile
Re: What type of kernel do you guys plan to design?
« Reply #5 on: June 20, 2005, 01:01:11 AM »
I don't think the upgrading should affect any process running it, just a fatal error.
One must ask oneself: "do I will trolling to become a universal law?" And then when one realizes "yes, I do will it to be such," one feels completely justified.
-- from Groundwork for the Metaphysics of Trolling

Offline zorm

  • Hero Member
  • *****
  • Posts: 591
    • View Profile
    • Zorm's Page
Re: What type of kernel do you guys plan to design?
« Reply #6 on: June 20, 2005, 03:08:01 AM »
I'm pretty sure it will unless someone has come up with a magic plan for handling it. I suppose it could be possible but it would require lots more code to preserve the state of what is happening in the driver and to pass it along to the new one.
"Frustra fit per plura quod potest fieri per pauciora"
- William of Ockham

Offline Warrior

  • supreme mac daddy of trolls
  • Hero Member
  • *****
  • Posts: 7507
  • One for a Dime two for a Quarter!
    • View Profile
Re: What type of kernel do you guys plan to design?
« Reply #7 on: June 20, 2005, 03:21:46 AM »
What about temporarily pausing it (skipping it in the multitask list) while the driver is update there shouldn't be *that* much speed decrease
One must ask oneself: "do I will trolling to become a universal law?" And then when one realizes "yes, I do will it to be such," one feels completely justified.
-- from Groundwork for the Metaphysics of Trolling

Offline zorm

  • Hero Member
  • *****
  • Posts: 591
    • View Profile
    • Zorm's Page
Re: What type of kernel do you guys plan to design?
« Reply #8 on: June 20, 2005, 03:35:56 AM »
Take a webserver running on a microkernel os and a need to update the ethernet driver. In order for a clean pass along the webserver will need to stop accepting new connections. Finish serving ongoing requests/connections. Then the driver update can take place and the webserver can be restarted. But the site will have appeared to be down since the time when it stopped accepting new connections.

The other option as I mentioned in my last post is to 'preserve' the state of the driver and then update it and restore the state. Of course you run into complex issues if you want to do this.

There might be some other option I haven't considered yet *shrugs*
"Frustra fit per plura quod potest fieri per pauciora"
- William of Ockham

Offline Warrior

  • supreme mac daddy of trolls
  • Hero Member
  • *****
  • Posts: 7507
  • One for a Dime two for a Quarter!
    • View Profile
Re: What type of kernel do you guys plan to design?
« Reply #9 on: June 20, 2005, 03:41:02 AM »
Hmm..interesting issue :[
One must ask oneself: "do I will trolling to become a universal law?" And then when one realizes "yes, I do will it to be such," one feels completely justified.
-- from Groundwork for the Metaphysics of Trolling

Offline Nate

  • Full Member
  • ***
  • Posts: 425
  • You all suck
    • View Profile
Re: What type of kernel do you guys plan to design?
« Reply #10 on: June 20, 2005, 12:38:59 PM »
What if you have two drivers, a primary and an auxilary. When you want to update the driver, simply update the auxilary, switch everything off the primary to the auxilary.  Then the next time the system restarts, it updates the primary and switches everything back.  This would take up addtional space and probably eat some speed up, but it would result in a more stable OS, if the new driver resulted in errors it would just move everything back to the primary instead of crashing.  Minimal system down time as you could probably just keep swapping back and forth on each update.

Offline Joe

  • B&
  • x86
  • Hero Member
  • *****
  • Posts: 10324
  • In Soviet Russia, text read you!
    • View Profile
    • William's Blog
Re: What type of kernel do you guys plan to design?
« Reply #11 on: June 20, 2005, 06:58:39 PM »
Quote
..Then the next time the system restarts..

Bada bing, bada boom. You gotta restart.
I'd personally do as Joe suggests

You might be right about that, Joe.


Offline Warrior

  • supreme mac daddy of trolls
  • Hero Member
  • *****
  • Posts: 7507
  • One for a Dime two for a Quarter!
    • View Profile
Re: What type of kernel do you guys plan to design?
« Reply #12 on: June 20, 2005, 08:05:39 PM »
I'll find some useful OS Microkernel design topics and share them as I read them, there should be an easy resolve to this issue.
One must ask oneself: "do I will trolling to become a universal law?" And then when one realizes "yes, I do will it to be such," one feels completely justified.
-- from Groundwork for the Metaphysics of Trolling

Offline Nate

  • Full Member
  • ***
  • Posts: 425
  • You all suck
    • View Profile
Re: What type of kernel do you guys plan to design?
« Reply #13 on: June 21, 2005, 11:12:46 AM »
Quote
..Then the next time the system restarts..

Bada bing, bada boom. You gotta restart.

Bada bing, bada boom.  I said thats if you restart before the next update.

Offline Warrior

  • supreme mac daddy of trolls
  • Hero Member
  • *****
  • Posts: 7507
  • One for a Dime two for a Quarter!
    • View Profile
Re: What type of kernel do you guys plan to design?
« Reply #14 on: June 21, 2005, 04:36:24 PM »
If you're updating something say the video driver, I think you can update it while it's in use or do how windows does and temporarily freeze the desktop and update then apply all changes (saving it's state of course) and the same can be done for all drivers.
One must ask oneself: "do I will trolling to become a universal law?" And then when one realizes "yes, I do will it to be such," one feels completely justified.
-- from Groundwork for the Metaphysics of Trolling