Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.


Channels ▼
RSS

Introduction to Parallel Computing: Part 1



This two-part article covers the basics of parallel computing. Part 1 begins with a brief overview, including concepts and terminology associated with parallel computing. The topics of parallel memory architectures and programming models are then explored. Part 2 presents a discussion on a number of issues related to designing parallel programs, concluding with several examples of how to parallelize simple serial programs. Provided courtesy Lawrence Livermore National Laboratory.

What is Parallel Computing?

  • Traditionally, software has been written for serial computation:
    • To be run on a single computer having a single Central Processing Unit (CPU);
    • A problem is broken into a discrete series of instructions.
    • Instructions are executed one after another.
    • Only one instruction may execute at any moment in time.

  • In the simplest sense, parallel computing is the simultaneous use of multiple compute resources to solve a computational problem.
    • To be run using multiple CPUs
    • A problem is broken into discrete parts that can be solved concurrently
    • Each part is further broken down to a series of instructions
    • Instructions from each part execute simultaneously on different CPUs

  • The compute resources can include:
    • A single computer with multiple processors;
    • An arbitrary number of computers connected by a network;
    • A combination of both.

  • The computational problem usually demonstrates characteristics such as the ability to be:
    • Broken apart into discrete pieces of work that can be solved simultaneously;
    • Execute multiple program instructions at any moment in time;
    • Solved in less time with multiple compute resources than with a single compute resource.

  • Parallel computing is an evolution of serial computing that attempts to emulate what has always been the state of affairs in the natural world: many complex, interrelated events happening at the same time, yet within a sequence. Some examples:
    • Planetary orbits, galaxy formation
    • Weather and ocean patterns
    • Tectonic plate drift
    • Rush hour traffic in LA
    • Automobile assembly line
    • Daily operations within a business
    • Building a shopping mall
    • Ordering a hamburger at the drive through.

  • Traditionally, parallel computing has been considered to be "the high end of computing" and has been motivated by numerical simulations of complex systems and "Grand Challenge Problems" such as:
    • weather and climate
    • chemical and nuclear reactions
    • biological, human genome
    • geological, seismic activity
    • mechanical devices - from prosthetics to spacecraft
    • electronic circuits
    • manufacturing processes

  • Today, commercial applications are providing an equal or greater driving force in the development of faster computers. These applications require the processing of large amounts of data in sophisticated ways. Example applications include:
    • parallel databases, data mining
    • oil exploration
    • web search engines, web based business services
    • computer-aided diagnosis in medicine
    • management of national and multi-national corporations
    • advanced graphics and virtual reality, particularly in the entertainment industry
    • networked video and multi-media technologies
    • collaborative work environments

  • Ultimately, parallel computing is an attempt to maximize the infinite but seemingly scarce commodity called time.

Why Use Parallel Computing?

  • The primary reasons for using parallel computing:
    • Save time - wall clock time
    • Solve larger problems
    • Provide concurrency (do multiple things at the same time)

  • Other reasons might include:
    • Taking advantage of non-local resources - using available compute resources on a wide area network, or even the Internet when local compute resources are scarce.
    • Cost savings - using multiple "cheap" computing resources instead of paying for time on a supercomputer.
    • Overcoming memory constraints - single computers have very finite memory resources. For large problems, using the memories of multiple computers may overcome this obstacle.

  • Limits to serial computing - both physical and practical reasons pose significant constraints to simply building ever faster serial computers:
    • Transmission speeds - the speed of a serial computer is directly dependent upon how fast data can move through hardware. Absolute limits are the speed of light (30 cm/nanosecond) and the transmission limit of copper wire (9 cm/nanosecond). Increasing speeds necessitate increasing proximity of processing elements.
    • Limits to miniaturization - processor technology is allowing an increasing number of transistors to be placed on a chip. However, even with molecular or atomic-level components, a limit will be reached on how small components can be.
    • Economic limitations - it is increasingly expensive to make a single processor faster. Using a larger number of moderately fast commodity processors to achieve the same (or better) performance is less expensive.

  • The future: during the past 10 years, the trends indicated by ever faster networks, distributed systems, and multi-processor computer architectures (even at the desktop level) clearly show that parallelism is the future of computing.

Who and What?

  • Top500.org provides statistics on parallel computing users - the charts below are just a sample. Some things to note:
    • Sectors may overlap - for example, research may be classified research. Respondents have to choose between the two.
    • "Not Specified" is by far the largest application - probably means multiple applications.

    von Neumann Architecture

    • For over 40 years, virtually all computers have followed a common machine model known as the von Neumann computer. Named after the Hungarian mathematician John von Neumann.

    • A von Neumann computer uses the stored-program concept. The CPU executes a stored program that specifies a sequence of read and write operations on the memory.

    • Basic design:
      • Memory is used to store both program and data instructions
      • Program instructions are coded data which tell the computer to do something
      • Data is simply information to be used by the program
      • A central processing unit (CPU) gets instructions and/or data from memory, decodes the instructions and then sequentially performs them.

    Flynn's Classical Taxonomy

    • There are different ways to classify parallel computers. One of the more widely used classifications, in use since 1966, is called Flynn's Taxonomy.

    • Flynn's taxonomy distinguishes multi-processor computer architectures according to how they can be classified along the two independent dimensions of Instruction and Data. Each of these dimensions can have only one of two possible states: Single or Multiple.

    • The matrix below defines the 4 possible classifications according to Flynn.

      S I S D

      Single Instruction, Single Data

      S I M D

      Single Instruction, Multiple Data

      M I S D

      Multiple Instruction, Single Data

      M I M D

      Multiple Instruction, Multiple Data

      Single Instruction, Single Data (SISD):

      • A serial (non-parallel) computer
      • Single instruction: only one instruction stream is being acted on by the CPU during any one clock cycle
      • Single data: only one data stream is being used as input during any one clock cycle
      • Deterministic execution
      • This is the oldest and until recently, the most prevalent form of computer

      • Examples: most PCs, single CPU workstations and mainframes

      Single Instruction, Multiple Data (SIMD):

      • A type of parallel computer
      • Single instruction: All processing units execute the same instruction at any given clock cycle
      • Multiple data: Each processing unit can operate on a different data element
      • This type of machine typically has an instruction dispatcher, a very high-bandwidth internal network, and a very large array of very small-capacity instruction units.
      • Best suited for specialized problems characterized by a high degree of regularity,such as image processing.
      • Synchronous (lockstep) and deterministic execution
      • Two varieties: Processor Arrays and Vector Pipelines
      • Examples:
        • Processor Arrays: Connection Machine CM-2, Maspar MP-1, MP-2
        • Vector Pipelines: IBM 9000, Cray C90, Fujitsu VP, NEC SX-2, Hitachi S820

      Multiple Instruction, Single Data (MISD):

      • A single data stream is fed into multiple processing units.
      • Each processing unit operates on the data independently via independent instruction streams.
      • Few actual examples of this class of parallel computer have ever existed. One is the experimental Carnegie-Mellon C.mmp computer (1971).
      • Some conceivable uses might be:
        • multiple frequency filters operating on a single signal stream
        • multiple cryptography algorithms attempting to crack a single coded message.

        Multiple Instruction, Multiple Data (MIMD):

        • Currently, the most common type of parallel computer. Most modern computers fall into this category.
        • Multiple Instruction: every processor may be executing a different instruction stream

        • Multiple Data: every processor may be working with a different data stream
        • Execution can be synchronous or asynchronous, deterministic or non-deterministic
        • Examples: most current supercomputers, networked parallel computer "grids" and multi-processor SMP computers - including some types of PCs.


Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.