A blog describing computer internals and electronics, from a student's viewpoint

"Paperbacks"

Thursday, January 14, 2010

Kernel-mode software: Part I

First of all, sorry for keeping this blog dormant for too long. :(

As of now, I am writing a compilation of algorithms whose implementation is designed in kernel-mode to make them faster. My goal: make a standard c/c++ library that can operate correctly under kernel-mode the same way as they do in user-mode - minus standard I/O (device drivers are designed to do I/O directly to their hardware, right? xD). And port common libraries to kernel-mode.

P.S. I'm currently doing my work under Windows XP. Will do for Linux afterwards.

As programmers know, kernel-mode software development is much, much harder than normal, user-mode programming. For one, while an application bug will just crash your application with familiar message boxes, in kernel-mode the same thing causes the entire system to issue a bugcheck (a.k.a. BSOD in Windows). For another, you'd have to do everything that the runtime would have done for you by hand; for example, the familiar C++ exception handling is absent in kernel-mode (C++ does not work properly under kernel-mode in the first place!) There are more issues than what I've written here, but these two are some of the most important, aside from security issues (kernel-mode software, from their name, are capable of fully controlling your system. So... don't, don't, DON'T INSTALL DEVICE DRIVERS FROM UNKNOWN PEOPLE!)

I think that the only advantage of normal applications ported to kernel-mode comes in terms of speed.

--- I shall add to this page. This is all for now... ---

No comments:

Post a Comment