Someone told me that for most operating systems, the drivers become a part of the kernel. How does this happen? Does the kernel decompile itself, add the driver, and recompile itself? Or are the drivers plug ins for the kernel? Are drivers even their own separate programs?
I'm going to answer this even though it was asked 7 years ago for those who stumble on it all these years later.
A kernel-mode device driver will essentially be a "module" to the kernel. You have a Dynamic Link Library (DLL) in user-mode on Windows, or a Dylib on OS X... Think of a kernel-mode device driver as the kernel-mode equivalent, except it doesn't have to be about extending the actual kernel, it can be for functionality which must be implemented at a kernel-level for an third-party application.
Furthermore, the idea behind it is that the main kernel is able to provide access to a set of APIs for the third-party kernel-mode software to rely on. Otherwise, the third-party developer would have to implement literally everything themselves, and that would basically be "OS development".
I hope this somewhat helped any future stumblers of this extremely old thread; the question was really good.
A driver is compiled into a library that exposes a known interface. The kernel then scans for drivers on startup and loads them into kernel memory. Some operating systems, such as linux, also support kernel modules that can be loaded / unloaded while the OS is running...
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!Donate Us With