| Tuesday May 31st 2016

Linux Unified Kernel aims to combine Linux and NT kernels

There are several ways to run Windows programs on Linux (virtualisation, WINE) and vice-versa really isn’t a problem either with Cygwin, or better yet, native ports thanks to the Windows variants of Gtk+ and Qt. Linux Tux logoStill, what if Windows support was built straight into the Linux kernel? Is something like that even possible? Sure it is, and the Chinese figured it’d be an interesting challenge, and called it the Linux Unified Kernel.

I must admit I hadn’t heard of this project just yet, but I was intrigued right away. It’s called the Linux Unified Kernel, and aims to combine the Linux kernel and the Windows NT kernel to effectively create a new kernel that supports both Linux and Windows binaries natively. They do this by implementing Windows NT kernel mechanisms into the Linux kernel using kernel modules, such as NT’s process management, thread management, object management, virtual memory management, synchronization, system calls, Windows registry (worms? Can? Of?), WDM (device driver framework), Windows DPC mechanism, and so on. Even Windows drivers would work using this new hybrid kernel (a little kernel geek humor, there).

The new kernel actually supports two sets of system calls, one for Windows, and one for Linux. Since I’m not a programmer (let alone a kernel programmer), I have to resort to Wikipedia to explain how this all works. If I understand it all correctly, Windows binaries call the syscal table via a different interrupt than Linux binaries do (int 0x2e vs. int 0x80). I’m sure some of you will be able to provide more insight into what, exactly, this all means. When it comes to the userland, the LUK project does not write its own material; instead, it relies on the GNU project for the Linux side of things, and on Wine and ReactOS for the Windows side.

The people behind LUK hope that eventually, their code will be merged into mainline. There’s still a lot of work to do before every Windows application will just work out of the box, but progress is steadily made, and the Chinese Linux distribution MagicLinux even has a special version built on top of LUK. Currently, it’s x86-only, but work is underway to port it to the Loongson architecture. The Loongson 3 processor includes 200 additional instructions to speed up x86 translation, in case you’re wondering how MIPS would run Windows.

In any case, version 0.2.4 of LUK was released recently, so if you’re adventurous, you can get it from their download page.

Related Posts: On this day...

Leave a Reply

You must be logged in to post a comment.