LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 08-13-2004, 06:28 AM   #1
druisgod
Member
 
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.


Druisgod

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

Rep: Reputation: 53
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.
 
  


Reply


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 10:02 AM
understanding oss modules geletine Slackware 3 07-03-2005 04:58 PM
understanding kernel compilation errors kpachopoulos Linux - General 4 10-02-2004 04:36 AM
understanding the linux kernel rsingh Linux - Newbie 2 10-29-2003 01:49 PM
need help understanding kernel installation ecc Linux - Newbie 1 08-25-2003 05:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:39 PM.

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