I may be totally off the mark, but what I suspect you are trying to do is to run some sort of application in the background which is listening to requests from users either directly on the same machine or through network sockets.
If you start a java application [ "java myApp &" ] in the background, that should do it. Alternatively, you need to just open a console window, run the application in the foreground and minimize the application.
You don't need to run it as a LKM. LKM's are used to EXTEND the kernel functionality ( add some feature that was not statically compiled in ).