LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-05-2004, 09:18 PM   #1
Thaidog
Member
 
Registered: Sep 2002
Location: Hilton Head, SC
Distribution: Gentoo
Posts: 637

Rep: Reputation: 32
Question How much space does the Linux kernel take up?


I've heard things like a microkernel like MACH can be contained completely in the CPU's cache.

I was thinking about buying a P4 EE with 2MB of cache do you think this is big enough to contain a monolithic kernel?
 
Old 09-06-2004, 12:31 AM   #2
aeruzcar
Member
 
Registered: Jul 2003
Location: Santiago, Chile
Distribution: Gentoo
Posts: 282

Rep: Reputation: 30
Hello there, as far as I know, the linux kernel takes only about 1.5mb not more
 
Old 09-06-2004, 12:55 AM   #3
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
Depends on what all's running in it, but it shouldn't be more than a few MB (maybe 12 at most for a really loaded kernel). The kernel image on one of my servers is 1.2 MB compressed, so probably about 4 MB uncompressed, add in runtime data and the like and you might get 8 MB of space used or so.

Thaidog, yes, microkernel's can be very small, but size isn't the end all and be all of efficiency. For instance, with microkernels, so much is handled in userspace that there's a whole load of extra context switching[1] between all the different user processes, which is time "wasted" from the user POV. And if the entire microkernel was on cache, how much room would be left for user stuff? Not much, I wager (until caches get much bigger), so you're probably going to need to take out kernel stuff to make user processes run as optimally as possible.

The microkernel vs. monolithic kernel debate is ongoing to this day. A google on the subject should put up some good links, some of which I need to read myself some day.

[1] context switching is taking one process off the CPU and putting another on it to run.
 
Old 09-06-2004, 01:48 AM   #4
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
Most default kernels come with way more built in support than you may actually need. The latest kernels I've been getting will not even boot from a floppy anymore. It would be a good idea to build a custon kernel if you have the time.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
notify user space application from the kernel space lordofring Linux - Software 2 06-22-2009 12:32 PM
VMWare Linux Kernel address space mis-match madiyaan Linux - Newbie 4 06-19-2006 09:03 PM
Keyboard scanning in linux kernel space floflette Programming 3 07-20-2004 12:43 PM
Keyboard scanning in linux kernel space floflette Linux - Newbie 3 07-20-2004 09:38 AM
User Space - Kernel Space basu_arani Programming 3 05-25-2004 11:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:54 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