nixCraft Linux Forum

nixCraft

Linux / UNIX Tech Support Forum

Is Linux kernel is monolithic or modular kernel?

This is a discussion on Is Linux kernel is monolithic or modular kernel? within the Linux software forums, part of the Linux Getting Started category; IS Linux kernel is monolithic or compiled and statically linked modular kernel? I am bit confused on this – Linux ...


Go Back   nixCraft Linux Forum > Linux Getting Started > Linux software

Linux answers from nixCraft.


Linux software General questions and discussion about Redhat/Fedora Core/Cent OS, Debian and Ubuntu Linux related to softwares should go here.

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-06-2005, 01:03 PM
chiku's Avatar
Member
User
 
Join Date: Feb 2005
OS: Fedora
Posts: 86
Thanks: 10
Thanked 0 Times in 0 Posts
Rep Power: 0
chiku is on a distinguished road
Default Is Linux kernel is monolithic or modular kernel?

IS Linux kernel is monolithic or compiled and statically linked modular kernel?

I am bit confused on this – Linux is Monolithic kernel or it is a compiled and statically linked traditional UNIX like modular kernel?

How do I find out running Linux kernel is Monolithic or modular kernel?

It will be nice if someone point out to good Linux kernel books, or some other online resources too
__________________
There's no place like 127.0.0.1
Reply With Quote
  #2 (permalink)  
Old 02-06-2005, 03:08 PM
rockdalinux's Avatar
Is that all you got?
User
 
Join Date: May 2005
Location: Planet Vegeta
OS: Redhat
Posts: 708
Thanks: 15
Thanked 19 Times in 18 Posts
Rep Power: 10
rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light
Default

Quote:
IS Linux kernel is monolithic or compiled and statically linked modular kernel?
It can be compiled as both!

Monolithic kernel
- Single binary file
- All drivers included in kernel itself

Modular kernel
- Multiple files for kernel
- Drivers can be loaded or unloaded into kernel using modprob command, see man page of
lsmod, modprob etc
- Almost all drivers are build and linked against kernel

You can built modular kernel by setting option in kernel configuration option:
Enable loadable module support (CONFIG_MODULES) [Y/n/?]
If you set above option to Y then kernel becomes modular and three possibilities occurs for each and every feature/driver:
m - you can compile driver as module
y - built into kernel itself
n - Don't include feature/driver

Note if you set option to (CONFIG_MODULES) to n (no) then kernel becomes Monolithic and two possibilities occurs for each and every feature/driver:
y - Include feature/driver
n - Don't include feature/driver

Quote:
I am bit confused on this – Linux is Monolithic kernel or it is a compiled and statically linked traditional UNIX like modular kernel?
See above

Quote:
How do I find out running Linux kernel is Monolithic or modular kernel?
You can see kernel configuration file or you can type command (To see CONFIG_MODULES option)
make xconfig
make menuconfig

If the file /etc/modules.conf and modutils (such as lsmod, modprob) are installed then it is safe to assume that you have modular kernel. Most modern disto comes with modular kernel.

Quote:
It will be nice if someone point out to good Linux kernel books, or some other online resources too
Books
Linux Kernel Programming (3rd ed.). Addison Wesley, 2002.
Linux Core Kernel Commentary. The Coriolis Group, LLC, 1999.
IA-64 Linux Kernel: Design and Implementation. Prentice Hall, Inc
Linux Device Drivers (2nd ed.). O'Reilly & Associates, Inc.
Linux IP Stacks Commentary. The Coriolis Group, LLC
WWW Links

www.tldp.org has some docs
www.google.com/linux search you should get tons of info/doc
Reply With Quote
  #3 (permalink)  
Old 02-06-2005, 03:40 PM
monk's Avatar
Senior Member
User
 
Join Date: Jan 2005
Location: Tibet
OS: Debian GNU/Linux
Posts: 506
Thanks: 0
Thanked 8 Times in 6 Posts
Rep Power: 7
monk has a spectacular aura about monk has a spectacular aura about
Default

Some reasons to use Monolithic kernel

Kernel will be faster as less code will be included and no kernel parts will not swapped to virtual memory, modules are slower

More stable as unnecessary drivers/features not included, so attacker cannot take advantage of unused stuff in kernel.

However, many supports modular as best choice because you don't have to recompile the kernel to include support for your new devices ... it is upto you which one satisfies your needs

For server -- Monolithic is good choice
Desktop - Modular is good as we connect pen drives, dig-cam, scanners and so on..

Feel free to search newsgroup using http://groups-beta.google.com/grphp?hl=en&tab=wg for more on this topic
Reply With Quote
  #4 (permalink)  
Old 27-08-2009, 02:56 AM
Junior Member
User
 
Join Date: Aug 2009
Location: France
OS: Debian (Ubuntu Jackalope) Gnome
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
harlock59 is on a distinguished road
Default

Quote:
Originally Posted by rockdalinux View Post
If the file /etc/modules.conf and modutils (such as lsmod, modprob) are installed then it is safe to assume that you have modular kernel. Most modern disto comes with modular kernel.



Books
Linux Kernel Programming (3rd ed.). Addison Wesley, 2002.
Linux Core Kernel Commentary. The Coriolis Group, LLC, 1999.
IA-64 Linux Kernel: Design and Implementation. Prentice Hall, Inc
Linux Device Drivers (2nd ed.). O'Reilly & Associates, Inc.
Linux IP Stacks Commentary. The Coriolis Group, LLC
WWW Links

www.tldp.org has some docs
www.google.com/linux search you should get tons of info/doc
You said: "such as lsmod, modprob"

you should have say modprobe ? man modprobe ! (with an e !)
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
Linux kernel deleted from /boot - how do I resinstall the kernel vaibhav.kanchan Getting started tutorials 2 25-03-2008 12:31 AM
Display Linux kernel information sweta Getting started tutorials 0 27-07-2007 07:00 AM
Yum install kernel debuginfo packages kernel-debuginfo repo rockdalinux Getting started tutorials 0 15-06-2007 09:59 PM
What are the advances of Kernel 2.6 over Kernel 2.4 ricc Linux software 3 14-03-2006 12:42 PM
Linux find out kernel version? Linux software 1 17-01-2006 04:41 PM


All times are GMT +5.5. The time now is 10:33 AM.


Powered by vBulletin® Version 3.8.5 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2010 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38