OSDev.org

The Place to Start for Operating System Developers
It is currently Sat May 04, 2024 4:45 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 24 posts ]  Go to page 1, 2  Next

What os are you designing?
Microkernel 56%  56%  [ 34 ]
Monolithic kernel 23%  23%  [ 14 ]
Other design 16%  16%  [ 10 ]
I'm unsure at the moment... 5%  5%  [ 3 ]
Total votes : 61
Author Message
 Post subject: Microkernel or Monolithic
PostPosted: Mon Dec 10, 2007 3:26 am 
Offline
Member
Member
User avatar

Joined: Sat Jun 30, 2007 12:07 pm
Posts: 46
Location: South Africa
Personally i've decided to write a microkernel based on 3 main reasons (besides the already well-known advantages):

1. Microkernel design is largely unexplored, at least when compared to monolithic. More room for research.
2. The microkernel's main disadvantage is more processing power is required, but nowadays there is often ample power available.
3. There is no possible way i can compete with pre-existing monolithic kernels, especially as i'm developing solo.

Please don't start a flame war. This is just meant to see what your personal views on the possible designs are.

_________________
:: Cogs 32-bit OS ::


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 10, 2007 4:00 am 
Offline
Member
Member
User avatar

Joined: Tue Jul 10, 2007 5:27 am
Posts: 2935
Location: York, United Kingdom
I'm writing a microkernel but with the VFS in the kernel to try and alleviate some overhead. It's only the virtual part in the kernel, all the drivers are in userspace.

Quote:
The microkernel's main disadvantage is more processing power is required, but nowadays there is often ample power available.


Actually the main disadvantage is all the context switches, during which the main pipeline of the CPU (ALU, instruction decoders etc) are inactive, and said pipeline is flushed completely. Which causes efficiency problems.

Quote:
Please don't start a flame war. This is just meant to see what your personal views on the possible designs are.


Good thing you mentioned this!

_________________
Horizon - a framework and language for SAS-OS development
Project 'Pedigree'
Practical x86 OSDev tutorials


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 10, 2007 4:11 am 
Offline
Member
Member
User avatar

Joined: Sun Oct 22, 2006 7:01 am
Posts: 2646
Location: Devon, UK
I'm going for modular monolithic, but have not finalised quite how the drivers interact with the kernel yet. There will certainly be a level of dynamic linking involved as you would expect for a monolithic kernel but I have yet to look at whether going down the hybrid route fits in with everything else I want to achieve, so there may be support for userland drivers too.

Certainly the VFS, graphics and disk access will be done from kernel-space.

Cheers,
Adam


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 10, 2007 6:13 am 
Offline
User avatar

Joined: Fri Jun 01, 2007 9:36 am
Posts: 2
Location: Buenos Aires - Argentina
I think that a combination of both approaches is the best way to go.

_________________
Panchex


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 10, 2007 6:16 am 
Offline
Member
Member
User avatar

Joined: Mon Jun 05, 2006 11:00 pm
Posts: 2293
Location: USA (and Australia)
AJ wrote:
I'm going for modular monolithic, but have not finalised quite how the drivers interact with the kernel yet. There will certainly be a level of dynamic linking involved as you would expect for a monolithic kernel but I have yet to look at whether going down the hybrid route fits in with everything else I want to achieve, so there may be support for userland drivers too.

Certainly the VFS, graphics and disk access will be done from kernel-space.

Cheers,
Adam


So am I. Mostly for performance and I can also include select modules in the kernel (e.g. a floppy, DMA, and FAT12 controller!) My modules are event based, which means they sit in memory and do nothing until requested. I'm thinking about having the kernel ping each module that is doing heavy processing every few seconds to make sure it hasn't crashed, and if the module doesn't respond, then it is automatically destroyed and reloaded.

_________________
My OS is Perception.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 10, 2007 6:40 am 
Offline
Member
Member
User avatar

Joined: Sat Jun 30, 2007 12:07 pm
Posts: 46
Location: South Africa
JamesM wrote:
I'm writing a microkernel but with the VFS in the kernel to try and alleviate some overhead. It's only the virtual part in the kernel, all the drivers are in userspace.


I plan on putting the vfs in user space at first. This should allow development thereof to be easier as i can first do some other stuff. Also i just don't feel like doing the vfs yet. Then in a later version i plan on moving it into the kernel for performance issues. Everything else i want to put in user space.

My kernel has/will have a scheduler, memory manager and ipc. Later the vfs too.

_________________
:: Cogs 32-bit OS ::


Top
 Profile  
 
 Post subject:
PostPosted: Mon Dec 10, 2007 6:53 am 
Offline
Member
Member
User avatar

Joined: Thu Mar 08, 2007 11:08 am
Posts: 670
I started OSdev writing a microkernel... then after third redesign I decided it's sensible to move more stuff to the kernel.. and essentially started writing a monolith. Now that my monolith is getting to the point of actually doing something, I'm considering pieces to be moved outside again.

The result will probably be some sort of a hybrid. We'll see.

_________________
The real problem with goto is not with the control transfer, but with environments. Properly tail-recursive closures get both right.


Top
 Profile  
 
 Post subject: Re: Microkernel or Monolithic
PostPosted: Mon Dec 10, 2007 6:53 am 
Offline
Member
Member

Joined: Wed Oct 31, 2007 9:09 am
Posts: 1385
I like microkernels for their possible cleanliness. Monolithic gets messy very quickly. The overhead is of no importance to me, as I'm not making an OS to actually be used (chance of succeeding: 0%) by anyone but myself for research purposes, I like to try out new concepts in the design, rather than improve speed. An example: in our current design, we have even the memory manager in user space, the apps requesting memory by sending a message to the MM, via the kernel, that must map the message into the address space of the MM by sending a message to... the MM. Indeed very inefficient, with loads of overhead, but I like it :).

EDIT: As for the VFS, we have none as such. Our native FS is database oriented (like WinFS, but not on top of another FS), 'foreign' FSes like ext2 and NTFS are mapped to that.


JAL


Top
 Profile  
 
 Post subject: Re: Microkernel or Monolithic
PostPosted: Mon Dec 10, 2007 7:00 am 
Offline
Member
Member
User avatar

Joined: Thu Mar 08, 2007 11:08 am
Posts: 670
jal wrote:
I like microkernels for their possible cleanliness. Monolithic gets messy very quickly.


My experience suggests kinda otherwise. The core is highly interdependant in both cases, which can be seen as complexity, but in a monolith you can build clean modules on top of that that do one part of the system. In a microkernel you build a fully-generic-handle-everything-and-kitchen-sinks-IPC system, which not only tends to get pretty damn complex, but what's worse, tends to make userspace servers complex as well.

_________________
The real problem with goto is not with the control transfer, but with environments. Properly tail-recursive closures get both right.


Top
 Profile  
 
 Post subject: Re: Microkernel or Monolithic
PostPosted: Mon Dec 10, 2007 7:04 am 
Offline
Member
Member

Joined: Wed Oct 31, 2007 9:09 am
Posts: 1385
mystran wrote:
My experience suggests kinda otherwise. The core is highly interdependant in both cases, which can be seen as complexity, but in a monolith you can build clean modules on top of that that do one part of the system. In a microkernel you build a fully-generic-handle-everything-and-kitchen-sinks-IPC system, which not only tends to get pretty damn complex, but what's worse, tends to make userspace servers complex as well.


I don't see why building clean modules on top of a microkernel wouldn't be possible, especially when defining interfaces and having the IPC call on those interfaces. Not much difference with having APIs that are called directly by the kernel. However, I must admit the OS I'm working on is in its infant stages, so maybe I'll experience otherwise when actually developing those modules further than the definition phase.


JAL


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 11, 2007 1:44 am 
Offline
Member
Member

Joined: Wed Jul 25, 2007 8:45 am
Posts: 391
Location: London, UK
JamesM wrote:
I'm writing a microkernel but with the VFS in the kernel to try and alleviate some overhead. It's only the virtual part in the kernel, all the drivers are in userspace.


Is this the entire FS system, or just the VFS part and have the actual FS drivers (ext2, fat, whatever) in userspace?

Before I switched my OS to a monolithic kernel I planned to do the latter, but to be honest I got lazy and switched to monolithic, because back then I didn't know much about microkernel design and the current IPC system was a hack. Although I may switch back to a microkernel at some point in the future, who knows? :)

_________________
http://alex-smith.me.uk


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 11, 2007 2:27 am 
Offline
Member
Member
User avatar

Joined: Tue Jul 10, 2007 5:27 am
Posts: 2935
Location: York, United Kingdom
Just the VFS. The VFS has nodes that contain information about the server that handles those nodes (ext2 server etc). Actually more specifically it contains a pointer to a resource that could be "remote", i.e. in a different address space. The VFS can pass a call to that resource and intrinsically an IPC call is made if needed.

_________________
Horizon - a framework and language for SAS-OS development
Project 'Pedigree'
Practical x86 OSDev tutorials


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 11, 2007 3:25 am 
Offline
Member
Member
User avatar

Joined: Wed Feb 07, 2007 1:45 pm
Posts: 1401
Location: Eugene, OR, US
Intellectual purity gets in the way of writing pretty code, so I'm going for a hybrid right from the start -- no purity for me.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 11, 2007 9:33 am 
Offline
Member
Member

Joined: Sun Sep 23, 2007 4:52 am
Posts: 368
Those of you who are writing a microkernel, are putting the scheduler inside or outside the kernel?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Dec 11, 2007 9:53 am 
Offline
Member
Member
User avatar

Joined: Tue Jul 10, 2007 5:27 am
Posts: 2935
Location: York, United Kingdom
Inside. Mine is more along the hybrid lines.

_________________
Horizon - a framework and language for SAS-OS development
Project 'Pedigree'
Practical x86 OSDev tutorials


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 24 posts ]  Go to page 1, 2  Next

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group