I have read through the modifications made to the Linux kernel by the Xenomai project (
http://www.xenomai.org/ ) lately. Its interesting to read up on how they work together with Linux in a symbiotic way.
Gave me some insight into how they created a dual kernel system.