Home > Articles > Operating Systems, Server

  • Print
  • + Share This
This chapter is from the book

SMP and the Primary Processor Paradigm

Symmetric multiprocessing (SMP) includes any SMP architecture. In layman's terms, it's a computer with more than one processor. SMP architectures differ from asymmetrical processing architectures primarily in the way that they can truly be considered multitasking rather than time-sharing devices. Any idle processor can be delegated to take on additional tasks or handle increased loads.

Generally, a well-written and optimized application performs much better on an SMP machine than on two or more computers with a single processor. Several factors determine the speed at which the application runs, including the speed of the motherboard bus, the memory, the speed of the drives, as well as the I/O throughput. Like the addition of more nodes for parallel computing, the programs have to be rewritten or optimized to enable multiple threads. Processes and kernel space threads are naturally distributed among SMP machines. User processes generally aren't; however, the kernel does a sort of natural load balancing across each of the CPUs. Applications that can make use of fork() can benefit from an SMP architecture. fork() allows a process to split itself into two identical copies, which, depending on the OS, will share the same memory, yet will run on a different CPU. If the application is primarily CPU driven, that application will see benefits from the SMP architecture. However, the price for computers with more than one processor might outweigh the benefits of an SMP processor machine.

Linux added support for SMP with the addition of the 2.0 kernel, which included support for Intel 486 and higher (and clones), as well as hypersparc machines. With the addition of the 2.2 kernel, Linux added support for UltraSparc, SparcServer, Alpha, and PowerPC machines.

Although the 2.2.x and 2.4.x kernels' SMP support is added by default, it can be added in with the following settings (the latest kernel can always be found at http://www.kernel.org, or at ftp://ftp.kernel.org/pub/linux/kernel

  • Configure the kernel and answer "yes" to the question, "Symmetric Multi-Processing Support."

  • Enable "Memory Type Range Register (MTRR) Support" (both under Processor Type and Features).

  • Enable real-time clock support by configuring the "RTC Support" item (under Character Devices).

  • On the x86 kernel, do not enable Advanced Power Management (APM). APM and SMP are not compatible, and your system will almost certainly crash while booting if APM is enabled.

You must rebuild all of your kernel and kernel modules when changing to and from SMP mode. Remember to make modules and make modules install. You can display the result with cat /proc/cpuinfo.

  • + Share This
  • 🔖 Save To Your Account