Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 08-13-2004, 07:28 AM   #1
Registered: Jun 2004
Location: Maine
Distribution: LFS Mint OS, LFS, CENTos,
Posts: 119

Rep: Reputation: 18
Kernel Modules Understanding

Ok. I just want to make sure I've got this straight. I've kinda been hanging my head in shame. I've used linux for about 5 years now, and I just now made some sense out of the /etc/modprobe and how it relates to the kernel. (Don't we all have those unexplored basic areas?) Don't get me wrong, I understand that you have to put modules you want loaded in there. Here's what I think I've properly learned. Feel free to expand upon if you wish.

The kernel makes a call to a numeric reference. Say, device 80, 0. Then if its built into the kernel, the device is loaded as configured, automatically. If not - /etc/modprobe or /etc/modules.conf, depending on your kernel version is read for an alias to that device. From that it detemines the device driver to load. The device driver with its node number, 80, 0, is then used. So the userspace program for ex, would link to the device file or refernce, say /dev/video, which links to the module that is loaded by the kernel, say nv.ko which was figured out by /etc/modprobe, if it was a module. The module then interprets calls from the userspace program and interprets them into device calls, and vice-versa. Dependencies for the module were sorted out by /lib/modules/kernelversion/moddepwhatever. The mod dep file in /lib/modules/* also loaded any prior requirements for that module to be loaded. Phew. Have I got it, or am I off? I know its not a requirement to understand this, but the lower level I understand, the more I can manipulate what is really going on in my computer.

Thanks for any input.


Last edited by druisgod; 08-13-2004 at 07:31 AM.
Old 08-13-2004, 11:17 AM   #2
Senior Member
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 52
yep you got it
the only thing that sticks out at me is:

basically user space programs only write directly to character devices
(devices that read write data in a serial stream like a sound card for instance)

block devices -- like a hard drive for instance reads write data in fixed size blocks and provide random access to those blocks -- only the kernel code that implements the filesystem itself can write to that.
user space programms use the a library function or kernel system calls directly request the kernel to do that stuff for them. Whle it is possible to write directly to a hard drive anyone can tell you who has written a filesystem it's a very easy way to destroy the hard drive and have to through it in the trash.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help understanding Kernel version error iansoundz Linux - General 11 12-01-2005 11:02 AM
understanding oss modules geletine Slackware 3 07-03-2005 05:58 PM
understanding kernel compilation errors kpachopoulos Linux - General 4 10-02-2004 05:36 AM
understanding the linux kernel rsingh Linux - Newbie 2 10-29-2003 02:49 PM
need help understanding kernel installation ecc Linux - Newbie 1 08-25-2003 06:31 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:55 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration