what kind of kernel is this?
what kind of kernel is this?
I attached a picture of how I designed my kernel, but Im not sure if its a micro or mono kernel. It seems to be both actually. Any thoughts?
- Attachments
-
- kernel.GIF (6.47 KiB) Viewed 5646 times
Re: what kind of kernel is this?
Hi,
It depends - it looks modular monolithic to me, but that all depends on whether the filesystem drivers are in user space or not.
And also, what about functionality like networking? Where does it go? does it go inside the kernel? does it go in user space? does it go in a module?
That sort of thing helps "define" your architecture.
Cheers,
James
It depends - it looks modular monolithic to me, but that all depends on whether the filesystem drivers are in user space or not.
And also, what about functionality like networking? Where does it go? does it go inside the kernel? does it go in user space? does it go in a module?
That sort of thing helps "define" your architecture.
Cheers,
James
Re: what kind of kernel is this?
I see. I have not considered networking yet because I have a long way to go before even getting done what the picture shows, but my basic idea is that everything runs in kernel space except user programs. Programs can only access things through system calls. The file system is really just another interface, thought it is its own module. This way I can support multiple file systems. A filesystem will ultimately look like a device, but the filesystem module is responsible for setting up a filesystem device. Reading from a file system essentially will be the same as reading directly from a disk, but when you use the file system to get to the disk, the data gets read and written in an organized way. I guess its more of a layered approach.
Re: what kind of kernel is this?
Hi,
In which case you have designed a monolithic kernel.
Cheers,
James
In which case you have designed a monolithic kernel.
Cheers,
James
Re: what kind of kernel is this?
Conceptually they seem the same. Internally I call everything modules because all the kernel has to do is say "open this filesystem", and the fs module will know how to figure out what filesystem it is and take care of dealing with it, so the os will make uniform calls to all file systems such as open/close and read/write. The same happens with devices. The kernel just needs to know, initialize device x, or read from device y, and the driver interface will take care of all the details, all the kernel needs to know is the number assigned to the device to access it.
So how do you technically classify the difference between a mono and micro kernel?
Does it have to do with how much code runs in user space?
So how do you technically classify the difference between a mono and micro kernel?
Does it have to do with how much code runs in user space?
Re: what kind of kernel is this?
In a microkernel, services such as the VFS, networking etc are handled by servers running in userspace. The kernel is extremely small, and everything relies on IPC.
They're not similar at all.
They're not similar at all.
- Colonel Kernel
- Member
- Posts: 1437
- Joined: Tue Oct 17, 2006 6:06 pm
- Location: Vancouver, BC, Canada
- Contact:
Re: what kind of kernel is this?
There is actually some controversy over what the correct answer is. I think it doesn't necessarily have to do with running code in user space, but this is how it's been implemented in nearly all microkernels until recently.yemista wrote:So how do you technically classify the difference between a mono and micro kernel?
Does it have to do with how much code runs in user space?
I would define a microkernel architecture as one where the major OS services (file systems, drivers, etc.) run in separate processes and applications invoke those services via IPC. For some OSes like Singularity, processes are implemented with software isolation instead of hardware isolation, but they are still processes. Singularity is the one example of a microkernel that I know of where everything (usually) runs in kernel mode.
Top three reasons why my OS project died:
- Too much overtime at work
- Got married
- My brain got stuck in an infinite loop while trying to design the memory manager
-
- Member
- Posts: 368
- Joined: Sun Sep 23, 2007 4:52 am
Re: what kind of kernel is this?
I agree with James M here.
A microkernel is a computer kernel which provides the mechanisms needed to implement an operating system. The actual operating system is written on top of the microkernel. A microkernel needs to allow a variety of policies, so that any operating system you fancy can be written on top of it. The policymaking is part of the operating system, not the microkernel, and that's the main difference between microkernels and monolithic kernels: Microkernels have as little policy as possible in kernel space.
Singularity has literally everything (both all code and all policy) in kernel space, and thus is the complete opposite of a microkernel.
...which is not a microkernel!For some OSes like Singularity
A microkernel is a computer kernel which provides the mechanisms needed to implement an operating system. The actual operating system is written on top of the microkernel. A microkernel needs to allow a variety of policies, so that any operating system you fancy can be written on top of it. The policymaking is part of the operating system, not the microkernel, and that's the main difference between microkernels and monolithic kernels: Microkernels have as little policy as possible in kernel space.
Singularity has literally everything (both all code and all policy) in kernel space, and thus is the complete opposite of a microkernel.
-
- Member
- Posts: 524
- Joined: Sun Nov 09, 2008 2:55 am
- Location: Pennsylvania, USA
Re: what kind of kernel is this?
Since Singularity uses software protection, the conventional notions of 'kernel' and 'user' space don't apply. Under your logic, even applications would be part of the kernel, making this not an operating system but just a huge blob program that runs on base hardware. User space is anything that is created in the managed language singularity uses and checked at compile time, and kernel space is any code that isn't checked.Singularity has literally everything (both all code and all policy) in kernel space, and thus is the complete opposite of a microkernel.
-
- Member
- Posts: 368
- Joined: Sun Sep 23, 2007 4:52 am
Re: what kind of kernel is this?
Using software protection was a very big policy decision. The hallmark of microkernels is that they force as little policy as possible. The microkernel just provides the means to build an operating system atop. Singularity is an operating system, thus it can't be a microkernel, since a microkernel is the kernel without the operating system.Since Singularity uses software protection, the conventional notions of 'kernel' and 'user' space don't apply.
-
- Member
- Posts: 524
- Joined: Sun Nov 09, 2008 2:55 am
- Location: Pennsylvania, USA
Re: what kind of kernel is this?
Using hardware protection is a very big policy decision. That means there are no microkernels.Craze Frog wrote:Using software protection was a very big policy decision.
EDIT: grammar
Last edited by JohnnyTheDon on Fri Feb 20, 2009 4:57 pm, edited 1 time in total.
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: what kind of kernel is this?
And lets not feed the troll, 'kay. He has a record on that.
-
- Member
- Posts: 524
- Joined: Sun Nov 09, 2008 2:55 am
- Location: Pennsylvania, USA
Re: what kind of kernel is this?
Sorry, I didn't think I was insulting anyone...Combuster wrote:And lets not feed the troll, 'kay. He has a record on that.
In any case all we're doing is arguing semantics. It just depends how you define microkernel.
- Brynet-Inc
- Member
- Posts: 2426
- Joined: Tue Oct 17, 2006 9:29 pm
- Libera.chat IRC: brynet
- Location: Canada
- Contact:
Re: what kind of kernel is this?
You're getting your movies mixed up, bad berkus.berkus wrote:Luke, there is no spoon.
- Troy Martin
- Member
- Posts: 1686
- Joined: Fri Apr 18, 2008 4:40 pm
- Location: Langley, Vancouver, BC, Canada
- Contact:
Re: what kind of kernel is this?
Chuck Norris can't mix up his movies, his movies mixed him up.Brynet-Inc wrote:You're getting your movies mixed up, bad berkus.berkus wrote:Luke, there is no spoon.
Seriously, get the trial for WoW and spend some time in The Barrens or city trade chat if you're horde. It starts to hurt after a while.