IceWalkers.com - Linux Software downloads and news
Name : Password :
Linux SoftwareLinux RPMLinux HowtosLink UsAboutAdvertise

Linux SMP HOWTO

Search Howtos :Match :
Next Previous Contents

9. Glossary

9.1 Definitions

  • SMP Symmetric Multi-Processors.
  • UP Uni-Processor: system with one processor.
  • APIC Advanced Programmable Interrupt Controler.
  • thread A thread is a processor activity in a process. The same process can have multiple threads. Those threads share the process address space and can therefore share data.
  • pthread Posix thread, threads defined by the Posix standard.
  • process Program in execution, with its environment.
  • MTRR Memory Type Range Register
  • APM Advanced Power Management.
  • FPU Floating Point Unit. Also called arithmetic co-processor.
  • IRQ Interrupt ReQuest.
  • EBDA Extended BIOS Data Area.
  • ACPI Advanced Configuration and Power Interface.
  • oops Internal kernel error.
  • Cluster Group of computers that achieve a common computation (also known as Beowulf within the Linux community).

9.2 Concepts

  • Data Races

    A data race happens when to processes want to modify a shared variable concurrently without protecting themselves from the effect of the other process.

    Let A a shared variable. Let P1 and P2 two processes that access this variable. Those two processes are making the same following operation: "read A in tmp variable (local to the precess); do tmp = tmp + 1 ; write tmp in A". If the A variable is not protected by a lock, resulting executions could not correspond to what is espected. For example, here is two examples if one do not lock A:

    case #1:
    A=0
    P1: read A -> tmp1 (so tmp1 is 0)
    P2: read A -> tmp2 (so tmp2 is 0)
    P1: tmp1 = tmp1 + 1 (so tmp1 is 1)
    P2: tmp2 = tmp2 + 1 (so tmp2 is 1)
    P1: tmp1 -> write A (so A is 1)
    P2: tmp2 -> write A (so A is 1)
    

    case #2:
    A=0
    P1: read A -> tmp1 (so tmp1 is 0)
    P1: tmp1 = tmp1 + 1 (so tmp1 is 1)
    P1: tmp1 -> write A (so A is 1)
    P2: read A -> tmp2 (so tmp2 is 1)
    P2: tmp2 = tmp2 + 1 (so tmp2 is 2)
    P2: tmp2 -> write A (so A is 2)
    

    To avoid this kind of problem, one uses a lock:

    A=0:
    P1: lock A
    P1: read A -> tmp1 (so tmp1 is 0)
    P2: lock A (so P2 is blocked)
    P1: tmp1 = tmp1 + 1 (so tmp1 is 1)
    P1: tmp1 -> write A (so A is 1)
    P1: unlock A (so P2 is unblocked)
    P2: read A -> tmp2 (so tmp2 is 1)
    P2: tmp2 = tmp2 + 1 (so tmp2 is 2)
    P2: tmp2 -> write A (so A is 2)
    P2: unlock A
    

  • Deadlock

    This is an inter-blocking that occurs when two processes want to access at shared variables mutually locked. For example, let A and B two locks and P1 and P2 two processes:

    P1: lock A
    P2: lock B
    P1: lock B (so P1 is blocked by P2)
    P2: lock A (so P2 is blocked by P1)
    
    Process P1 is blocked because it is waiting for the unlocking of B variable by P2. However P2 also needs the A variable to finish its computation and free B. So we have a deadlock.

    In this example, the problem is very simple. But imagine what can happen in a 2 millions of lines of code (like the linux kernel) with hundreds of locks. :-)


Next Previous Contents
Search Howtos :Match :
My Money 2.0.49
Personal financial software
Linux Kernel 2.6 2.6.32-rc8
Linux Kernel
GCstar 1.5.0
Personal collections manager
ImageMagick 6.5.7.9
ImageMagick image processing studio
BibleTime 2.4
Bible study software for Linux / KDE
PHP 5.3.1
Server-side, cross-platform, HTML embedded scripting language.
LFTP 4.0.4
Shell-like command line ftp client.
GNOME 2.29.2
GNOME desktop environment
Midgard 9.09.0
Web application development and publishing platform
Totem 2.28.4
Movie player for Gnome
Free IT Magazines, White Papers, eBooks, and more !
Oracle Magazine

Contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more.

Vulnerability Management for Dummies

Get all the Facts and See How to Implement a Successful Vulnerability Management Program.

Website Magazine

Has tapped premier talent in the Internet industry for our content and each and every issue will contain practical advice and insights for website owners.

Linux Software Map
Find Linux RPM
Best Rated Linux Software
Most Rated Linux Software
Linux Distributions
Linux Howtos
Quick Survey

Please take our survey and help us improve our website to serve you better.

Thank you.
Linux Software
Linux / IT Resources
Site Resources
Google
Privacy Policy
Contact Us
Submit Software
Advertising info