Dual Kernel System [How, Cons, Pros]

Discussions on more advanced topics such as monolithic vs micro-kernels, transactional memory models, and paging vs segmentation should go here. Use this forum to expand and improve the wiki!
Occam
Posts: 6
Joined: Fri May 15, 2009 5:26 am

Re: Dual Kernel System [How, Cons, Pros]

Post by Occam »

Both Helios and Barrelfish are multikernel architectures.

The motivation for Helios is heterogeneous environments: http://research.microsoft.com/pubs/81154/helios.pdf
and the motivation for Barrelfish is scalability: http://www.barrelfish.org/

Occ
mybura
Posts: 18
Joined: Wed Sep 02, 2009 12:59 am

Re: Dual Kernel System [How, Cons, Pros]

Post by mybura »

The first part of this post highlights some flaws in the 2 kernel aproach you have proposed. The second part gives some ideas on how you could achieve your goal. So if you don't like constructive criticism, read the second part first :)

Part One

Have a look at the definition of a kernel: http://wiki.osdev.org/Kernels

The suggested kernel/gui split does not make the gui component a kernel in itself classifying the OS to be running multiple kernels. The gui would simply be running in its own process, still dependent on "a kernel" to get access to resources such io ports and memory without interfering with other drivers/components.

A multiple kernel OS would follow a design matching something that has two major components managing hardware resources. At minimum it would need a very smart bootloader or mini kernel that would provide the following services or split resources physically for each kernel to manage (thus being a kernel in itself):

- Memory Management
- IO port management
- Multi CPU management
- Device partitioning and management

As you can see, you are looking at three kernels that are needed at minimum if a multi kernel OS is to be implemented. At this stage the proposal of a "GUI kernel" very much follows the design of XServer, which is simply a client server model subsystem hosted on a single kernel.

Part Two

If you were to implement a true "GUI kernel", you will need a third kernel to allow both the kernels to co-exist. Maybe the easiest way to accomplish this is to have the third kernel make use of the VM facility of modern CPUs and create two logical views of the hardware for use by your two kernels. Another "simple at first" way to implement it would be to split all resources in 2, i.e. GUI kernel manages upper part of memory and IO vs lower part for other kernel (GUI kernel detects and manages screen cards vs. other devices are detected and managed by the other OS).

Lots of interesting ideas automatically arise from the two possibilities mentioned. Maybe we can get some input on how the logical split VM would be implemented and how resources would be virtualized for the one kernel vs the other kernel accessing actual resources.
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: Dual Kernel System [How, Cons, Pros]

Post by Love4Boobies »

I'm not really sure if that's what the OP meant. I don't really think the OP meant that the kernel should handle separate functions (except maybe for a few things) - those would probably be called different kernel components rather than different kernels. What I think he mant was having 2 kernels which communicate which each other and multiplex resources properly. You can even have something more general like N kernels.

If you're looking for kernels that are really different from each other you might want to go one step back and use exokernels - a clever and much safer design where you can achieve the same functionality using libraries.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
cni46
Posts: 1
Joined: Sat Oct 24, 2009 8:25 am

Re: Dual Kernel System [How, Cons, Pros]

Post by cni46 »

I think the most difficult problem multi-kernel operating system need to face is that there is only one memory space in a computer.The key to operating system is memory management,because there is only one address space when a cpu may have many cores.
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: Dual Kernel System [How, Cons, Pros]

Post by Love4Boobies »

You are only right if you are talking about SMP architectures, not NUMA. As for SMP, like Brendan suggested, there are several ways to handle this, the most simple is having fixed pages allocated at startup. Once some sort of safe IPC mechanism is established between the two kernels even sharing memory is fairly trivial.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
User avatar
AndrewAPrice
Member
Member
Posts: 2299
Joined: Mon Jun 05, 2006 11:00 pm
Location: USA (and Australia)

Re: Dual Kernel System [How, Cons, Pros]

Post by AndrewAPrice »

Unless they were truly independent (so they did not require each other to function properly to perform their own tests) then I fail to see how you can call it two separate duel kernels when in-fact it's just a single kernel running separate code on both CPUs?

If you're talking about multithreading the kernel for performance, then you can do just that and let your scheduler distribute them amongst CPUs as necessary.
My OS is Perception.
User avatar
Owen
Member
Member
Posts: 1700
Joined: Fri Jun 13, 2008 3:21 pm
Location: Cambridge, United Kingdom
Contact:

Re: Dual Kernel System [How, Cons, Pros]

Post by Owen »

Holy necro, batman!

(OK, not as much as some. But still...)
User avatar
AndrewAPrice
Member
Member
Posts: 2299
Joined: Mon Jun 05, 2006 11:00 pm
Location: USA (and Australia)

Re: Dual Kernel System [How, Cons, Pros]

Post by AndrewAPrice »

Owen wrote:Holy necro, batman!

(OK, not as much as some. But still...)
Sorry! It was still listed on the first page on the forum, does that still count? [If there were a ^_^ smiley, it would be inserted here.]
My OS is Perception.
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

Re: Dual Kernel System [How, Cons, Pros]

Post by Love4Boobies »

I might want to reconsider for NUMA domains.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
Post Reply