The Application Kernel approach

The application kernel is an approach for adding multiprocessor support to an operating system kernel without changing the original kernel. We have implemented a prototype for the Linux kernel (uniprocessor) to show that it works. A screenshot of the application kernel in action is shown below.

Refer to the publications for a more detailed description.

Running

Insert the application kernel by running (as root)

      # insmod apkern_module.o
    

You can thereafter run applications by preloading the bootstrap thread library and then running your application. For example, running the 'ls' binary, type

      # export LD_PRELOAD=/lib/libstartup.so.1 && ls
    

Note that only dynamic executables are possible to run without relinking the application.

Download

Source

The source of the application kernel is available under the GNU GPL below. You need GNU GCC (3.3 tested), GNU Make, and binutils to compile the code. You also need a copy of the 2.4 Linux source code (2.4.26 tested), and apply the patch below. The Linux kernel patch is just a convenience patch to fix the local APIC at 0xfee00000, which simplified the application kernel implementation a bit.

Index: include/asm-i386/fixmap.h
===================================================================
--- include/asm-i386/fixmap.h	(.../linux_appkernel/src/linux-2.4.26)	(revision 585)
+++ include/asm-i386/fixmap.h	(.../ska/trunk/projects/linux_appkernel/src/linux-2.4.26)	(working copy)
@@ -101,7 +101,8 @@
  * the start of the fixmap, and leave one page empty
  * at the top of mem..
  */
-#define FIXADDR_TOP	(0xffffe000UL)
+#define FIXADDR_TOP	(0xfee00000UL)
+			 /*#define FIXADDR_TOP	(0xffffe000UL)*/
 #define __FIXADDR_SIZE	(__end_of_permanent_fixed_addresses << PAGE_SHIFT)
 #define FIXADDR_START	(FIXADDR_TOP - __FIXADDR_SIZE)
      

Please note that the source code naming has changed and is not entirely consistent. The references to mpkern in the source code refer to an older naming scheme, which has still not been completely removed.

appkern_linux_source.tar.gz (433KB)

Binaries

A bootable disk image containing with the Application Kernel can be found below. The image contains a small root-file system with the application kernel module and a few executable programs. If you want to build the system yourself, you can also download binary of the 2.4.26 kernel and the Application Kernel module built against it.

appkern_linux_disk.img.gz (14MB)

apkern_module.o.gz (Application Kernel module, 1.2MB)

bzImage_UP.gz (Kernel 2.4.26, 822KB)

The disk image is a compressed bootable harddisk image of an ext2 filesystem. It boots from /dev/hda, so to install it, overwrite /dev/hda with the uncompressed image and reboot your test computer. Warning: this will overwrite whatever you had on your disk, so only do this on a machine you can spare. If you are sure you want to do this, execute the following command:

      # gunzip -c appkern_linux_disk.img.gz | dd of=/dev/hda
    

The application kernel works (i.e., has been tested) at least on a 2-way Pentium Pro 200MHz and a 2-way P-II 300MHz. You should know that there are unfixed bugs in the source, so programs will sometimes crash with a segmentation fault when you run them. Try to restart them again if this happens.

Good luck!

Publications

Simon Kågström, Lars Lundberg and Håkan Grahn. A novel method for adding multiprocessor support to a large and complex uniprocessor kernel. Proceedings of the International Parallel and Distributed Processing Symposium, Santa Fe, N.M., USA, April 26-30 2004

Simon Kågström, Lars Lundberg and Håkan Grahn. The Application Kernel Approach - a Novel Approach for Adding SMP Support to Uniprocessor Operating Systems. Submitted for publication.


$Id: application_kernel.html 3120 2005-06-27 12:57:38Z ska $