Index: kernel/Makefile
===================================================================
--- kernel/Makefile	(revision ea55bc4de5768018b35ca09e60ec4f2e79c979d0)
+++ kernel/Makefile	(revision 3a10e34b6c5c24ae1148df0041d9600c5fd9b764)
@@ -230,5 +230,6 @@
 	generic/src/security/cap.c \
 	generic/src/sysinfo/sysinfo.c \
-	generic/src/ps/ps.c
+	generic/src/ps/ps.c \
+	generic/src/ps/load.c
 
 ## Kernel console support
Index: kernel/generic/include/ps/load.h
===================================================================
--- kernel/generic/include/ps/load.h	(revision 3a10e34b6c5c24ae1148df0041d9600c5fd9b764)
+++ kernel/generic/include/ps/load.h	(revision 3a10e34b6c5c24ae1148df0041d9600c5fd9b764)
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2010 Stanislav Kozina
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup generic
+ * @{
+ */
+/** @file
+ */
+
+#ifndef KERN_LOAD_H_
+#define KERN_LOAD_H_
+
+extern void kload_thread(void *);
+
+#endif
+
+/** @}
+ */
Index: kernel/generic/src/main/kinit.c
===================================================================
--- kernel/generic/src/main/kinit.c	(revision ea55bc4de5768018b35ca09e60ec4f2e79c979d0)
+++ kernel/generic/src/main/kinit.c	(revision 3a10e34b6c5c24ae1148df0041d9600c5fd9b764)
@@ -67,4 +67,5 @@
 #include <debug.h>
 #include <str.h>
+#include <ps/load.h>
 
 #ifdef CONFIG_SMP
@@ -163,4 +164,11 @@
 #endif /* CONFIG_KCONSOLE */
 	
+	/* Start thread computing system load */
+	thread = thread_create(kload_thread, NULL, TASK, 0, "kload", false);
+	if (thread != NULL)
+		thread_ready(thread);
+	else
+		printf("Unable to create kload thread\n");
+
 	interrupts_enable();
 	
Index: kernel/generic/src/ps/load.c
===================================================================
--- kernel/generic/src/ps/load.c	(revision 3a10e34b6c5c24ae1148df0041d9600c5fd9b764)
+++ kernel/generic/src/ps/load.c	(revision 3a10e34b6c5c24ae1148df0041d9600c5fd9b764)
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2010 Stanislav Kozina
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup genericload
+ * @{
+ */
+
+/**
+ * @file
+ * @brief	System load computation.
+ */
+
+#include <proc/thread.h>
+#include <print.h>
+#include <ps/load.h>
+#include <arch.h>
+
+/** Load thread main function.
+ *  Thread computes system load every few seconds.
+ *
+ *  @param arg		Generic thread argument (unused).
+ *
+ */
+void kload_thread(void *arg)
+{
+	/* Noone will thread_join us */
+	thread_detach(THREAD);
+
+	while (true) {
+		printf("load thread alive\n");
+		thread_sleep(5);
+	}
+}
+
+
+/** @}
+ */
