LinuxQuestions.org
Visit the LQ Articles and Editorials section
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 06-17-2009, 02:20 PM   #1
riddler313
LQ Newbie
 
Registered: Apr 2009
Posts: 9

Rep: Reputation: 0
How does the kernel handle multiple cpus/cores?


I'm just wondering at how kernels traditionally handle SMP on multicore CPUs / multiple processor machines, that is does the kernel load a complete instance of itself per processor that schedules threads to run and use some sort of messaging between kernel instances to handle and fairly allocate resources and if so how do these instances interact with each other generally or is there only a single kernel instance present at all times?
 
Old 06-18-2009, 07:08 AM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,130

Rep: Reputation: 986Reputation: 986Reputation: 986Reputation: 986Reputation: 986Reputation: 986Reputation: 986Reputation: 986
There is only one kernel ... "to rule them all"
In fact the boot process starts on one processor (core), and activates the rest as part of startup. This is typical of general purpose operating systems.
The kernel will typically dispatch on the same processor continually - for cache coherency. These days there are "functions" within the kernel that run as separate threads and will dispatch on different processors.
 
Old 06-18-2009, 07:29 AM   #3
Dinithion
Member
 
Registered: Oct 2007
Location: Norway
Distribution: Slackware 13.37
Posts: 436

Rep: Reputation: 56
Quote:
Originally Posted by KERNEL
CONFIG_NR_CPUS:

This allows you to specify the maximum number of CPUs which this
kernel will support. The maximum supported value is 512 and the
minimum value which makes sense is 2.

This is purely to save memory - each supported CPU adds
approximately eight kilobytes to the kernel image.
This is from "help" under Maximum numbers of CPUs in the kernel. Just a "nice to know".
 
Old 06-18-2009, 07:45 AM   #4
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,130

Rep: Reputation: 986Reputation: 986Reputation: 986Reputation: 986Reputation: 986Reputation: 986Reputation: 986Reputation: 986
Must be an old kernel - that was lifted to 4096 in 2.6.27
 
Old 06-18-2009, 08:35 AM   #5
Dinithion
Member
 
Registered: Oct 2007
Location: Norway
Distribution: Slackware 13.37
Posts: 436

Rep: Reputation: 56
Hmm, I copied the text from 2.6.30, so I don't know. I haven't modified any files in there as far as I know
 
  


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
configuring MYSQL 5.0.67 to use multiple cores (processors) nino_of_qubic Linux - Server 3 03-31-2009 11:29 PM
LXer: Take advantage of multiple CPU cores during file compression LXer Syndicated Linux News 0 02-13-2008 08:40 PM
linux on multiple cores reslowgr Linux - Server 1 01-20-2007 03:35 PM
Wich are the differents cores of AMD 64bits CPUs? HellSpawn General 14 02-26-2006 08:39 PM
Multiple CPUs? cdegroat Linux - General 6 04-02-2005 12:31 AM


All times are GMT -5. The time now is 08:26 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration