hacking contest

hacking exploits security forum
hacking
compliance articles
upgrade backup exec
information security consultant

ifhope
I want to install Linux Distro (RH 9.0) on 2+ Processor Machine (P-III 800Mhz)...

my question how can i Configure / Manage / Distribute processes (Load Balancing) on Both Processor as well as Is Multi Processor support in built in in Linux Distro or i need to re-compile Kernel or any other think...
radien
QUOTE
How do I make a Linux SMP kernel?
Most Linux distributions don't provide a ready-made SMP-aware kernel, which means that you'll have to make one yourself. If you haven't made your own kernel yet, this is a great reason to learn how. Explaining how to make a new kernel is beyond the scope of this document; refer to the Linux Kernel Howto for more information. (C. Polisher)


Configure the kernel and answer Y to CONFIG_SMP.


If you are using LILO, it is handy to have both SMP and non-SMP kernel images on hand. Edit /etc/lilo.conf to create an entry for another kernel image called "linux-smp" or something.


The next time you compile the kernel, when running a SMP kernel, edit linux/Makefile and change "MAKE=make" to "MAKE=make -jN" (where N = number of CPU + 1, or if you have tons of memory/swap you can just use "-j" without a number). Feel free to experiment with this one.


Of course you should time how long each build takes :-) Example:


--------------------------------------------------------------------------------

make config
time -v sh -c 'make dep ; make clean install modules modules_install'


--------------------------------------------------------------------------------


If you are using some Compaq MP compliant machines you will need to set the operating system in the BIOS settings to "Unix


In kernel series 2.0 up to but not including 2.1.132, uncomment the SMP=1 line in the main Makefile (/usr/src/linux/Makefile).

In the 2.2 version, configure the kernel and answer "yes" to the question "Symmetric multi-processing support" (Michael Elizabeth Chastain).

AND

enable real time clock support by configuring the "RTC support" item (in "Character Devices" menu) (from Robert G. Brown). Note that inserting RTC support actually doesn't afaik prevent the known problem with SMP clock drift, but enabling this feature prevents lockup when the clock is read at boot time. A note from Richard Jelinek says also that activating the Enhanced RTC is necessary to get the second CPU working (identified) on some original Intel Mainboards.

AND

(x86 kernel) do NOT enable APM (advanced power management)! APM and SMP are not compatible, and your system will almost certainly (or at least probably wink.gif) crash while booting if APM is enabled (Jakob Oestergaard). Alan Cox confirms this : 2.1.x turns APM off for SMP boxes. Basically APM is undefined in the presence of SMP systems, and anything could occur.

AND

(x86 kernel) enable "MTRR (Memory Type Range Register) support". Some BIOS are buggy as they do not activate cache memory for the second processor. The MTRR support contains code that solves such processor misconfiguration.


You must rebuild all your kernel and kernel modules when changing to and from SMP mode. Remember to make modules and make modules_install (from Alan Cox).


If you get module load errors, you probably did not rebuild and/or re-install your modules. Also with some 2.2.x kernels people have reported problems when changing the compile from SMP back to UP (uni-processor). To fix this, save your .config file, do make mrproper, restore your .config file, then remake your kernel (make dep, etc.) (Wade Hampton). Do not forget to run lilo after copying your new kernel.

Recap:


--------------------------------------------------------------------------------

make config # or menuconfig or xconfig
make dep
make clean
make bzImage # or whatever you want
# copy the kernel image manually then RUN LILO
# or make lilo
make modules
make modules_install


--------------------------------------------------------------------------------



How do I make a Linux non-SMP kernel?
In the 2.0 series, comment the SMP=1 line in the main Makefile (/usr/src/linux/Makefile).

In the 2.2 series, configure the kernel and answer "no" to the question "Symmetric multi-processing support" (Michael Elizabeth Chastain).




You must rebuild all your kernel and kernel modules when changing to and from SMP mode. Remember to make modules and make modules_install and remember to run lilo. See notes above about possible configuration problems.



How can I tell if it worked?

cat /proc/cpuinfo


Typical output (dual PentiumII):


--------------------------------------------------------------------------------

processor      : 0
cpu            : 686
model          : 3
vendor_id      : GenuineIntel
[...]
bogomips        : 267.06

processor      : 1
cpu            : 686
model          : 3
vendor_id      : GenuineIntel
[...]
bogomips        : 267.06


--------------------------------------------------------------------------------


What is the status of converting the kernel toward finer grained locking and multithreading?
Linux kernel version 2.2 has signal handling, interrupts and some I/O stuff fine grain locked. The rest is gradually migrating. All the scheduling is SMP safe.


Kernel version 2.3 (next 2.4) has really fine grained locking. In the 2.3 kernels the usage of the big kernel lock has basically disappeared, all major Linux kernel subsystems are fully threaded: networking, VFS, VM, IO, block/page caches, scheduling, interrupts, signals, etc. (Ingo Molnar)


What has changed between 2.2.x and 2.4.x kernels?
(Mark Hahn) In many parts of the kernel, there's little relation between 2.2 and 2.4. One of the biggest changes is SMP - not just the evolutionary fine-graining of locks, but the radically revamped VM, memory management, interrupt handling that's basically unrelated to 2.2, fairly revolutionary net changes (thread and zero-copy), etc.

In short, 2.2 doesn't use the hardware like 2.4 does.



Does Linux SMP support processor affinity?


Standard kernel
No and Yes. There is no way to force a process onto specific CPU's but the linux scheduler has a processor bias for each process, which tends to keep processes tied to a specific CPU.


Patch
Yes. Look at PSET - Processor Sets for the Linux kernel:

The goal of this project is to make a source compatible and functionally equivalent version of pset (as defined by SGI - partially removed from their IRIX 6.4 kernel) for Linux. This enables users to determine which processor or set of processors a process may run on. Possible uses include forcing threads to separate processors, timings, security (a `root' only CPU?) and probably more.
It is focused around the syscall sysmp(). This function takes a number of parameters that determine which function is requested. Functions include:

binding a process/thread to a specific CPU
restricting a CPU's ability to execute some processes
restricting a CPU from running at all
forcing a cpu to run _only_ one process (and its children)
getting information about a CPU's state
creating/destroying sets of processors, to which processes may be bound



Reference:
http://www.tldp.org/HOWTO/SMP-HOWTO-3.html from "Linux SMP HOWTO" @ http://www.tldp.org/HOWTO/SMP-HOWTO.html#toc3


or simply download smp-kernel rpm of RedHat 9.0 and install w/o pain:

rpm -ivh kernel-smp-2.4.xxx.xxx.<arch>.rpm

I've a working sever w/ madrake 8.2 and two P4 Xeon 1.700 GHZ. stable and fast.
radien
U wanna use linux on a machine w/ more than 2 processors that's called SMP. For that purpose, if you want linux to distribute its load of processes, u should install and use smp-kernel.

Linux works on SMP (Symmetric Multi-Processors) machines. SMP support was introduced with kernel version 2.0.

take a look at the guide that is posted former, if it's not enough for you I've prepared 2 urls at the end of my post. and if you have even more questions, ask and I'll help if I know any about it.

wink.gif
ifhope
Thx... i hope so... it's enough... i am going to install it... if any problem came i let u know... thx
ikkyu
I am going to guess that you are not familure with the wonders of the /proc filesystem, to check up on a linux box you simply need to poke around in there and see what it tells you, in your case I should think that you would want to
CODE
cat /proc/cpuinfo
to learn if both processors are in use
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.

 
Invision Power Board © 2001-2005 Invision Power Services, Inc.