100% found this document useful (1 vote)
156 views

Introduction to Parallel Computing 2nd Edition Ananth Grama - Download the full ebook version right now

The document promotes the 2nd edition of 'Introduction to Parallel Computing' by Ananth Grama, highlighting its relevance in solving computationally large and data-intensive problems using parallel processing. It discusses the evolution of parallel computing platforms and programming models, emphasizing the importance of standards like MPI and OpenMP. The book covers both traditional and emerging applications, including data mining and computational biology, providing a comprehensive overview of parallel algorithm design and implementation.

Uploaded by

tegoswitka
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
156 views

Introduction to Parallel Computing 2nd Edition Ananth Grama - Download the full ebook version right now

The document promotes the 2nd edition of 'Introduction to Parallel Computing' by Ananth Grama, highlighting its relevance in solving computationally large and data-intensive problems using parallel processing. It discusses the evolution of parallel computing platforms and programming models, emphasizing the importance of standards like MPI and OpenMP. The book covers both traditional and emerging applications, including data mining and computational biology, providing a comprehensive overview of parallel algorithm design and implementation.

Uploaded by

tegoswitka
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 59

Visit https://ebookultra.

com to download the full version and


explore more ebooks or textbooks

Introduction to Parallel Computing 2nd Edition


Ananth Grama

_____ Click the link below to download _____


https://ebookultra.com/download/introduction-to-parallel-
computing-2nd-edition-ananth-grama/

Explore and download more ebooks or textbooks at ebookultra.com


Here are some recommended products that we believe you will be
interested in. You can click the link to download.

Introduction to Parallel Computing 2nd Edition Ananth


Grama

https://ebookultra.com/download/introduction-to-parallel-
computing-2nd-edition-ananth-grama-2/

An introduction to parallel and vector scientific


computing 1st Edition Ronald W. Shonkwiler

https://ebookultra.com/download/an-introduction-to-parallel-and-
vector-scientific-computing-1st-edition-ronald-w-shonkwiler/

Elements of Parallel Computing 1st Edition Eric Aubanel

https://ebookultra.com/download/elements-of-parallel-computing-1st-
edition-eric-aubanel/

Introduction to grid computing with Globus 2nd ed Edition


Luis Ferreira

https://ebookultra.com/download/introduction-to-grid-computing-with-
globus-2nd-ed-edition-luis-ferreira/
Parallel Computing in Quantum Chemistry 1st Edition Curtis
L. Janssen

https://ebookultra.com/download/parallel-computing-in-quantum-
chemistry-1st-edition-curtis-l-janssen/

High Performance Parallel Database Processing and Grid


Databases Wiley Series on Parallel and Distributed
Computing 1st Edition David Taniar
https://ebookultra.com/download/high-performance-parallel-database-
processing-and-grid-databases-wiley-series-on-parallel-and-
distributed-computing-1st-edition-david-taniar/

An Introduction to Quantum Computing 1st Edition Phillip


Kaye

https://ebookultra.com/download/an-introduction-to-quantum-
computing-1st-edition-phillip-kaye/

The dRuby Book Distributed and Parallel Computing with


Ruby 1st Edition Masatoshi Seki

https://ebookultra.com/download/the-druby-book-distributed-and-
parallel-computing-with-ruby-1st-edition-masatoshi-seki/

Mobile Intelligence Wiley Series on Parallel and


Distributed Computing 1st Edition Laurence T. Yang

https://ebookultra.com/download/mobile-intelligence-wiley-series-on-
parallel-and-distributed-computing-1st-edition-laurence-t-yang/
Introduction to Parallel Computing 2nd Edition Ananth
Grama Digital Instant Download
Author(s): Ananth Grama
ISBN(s): 9780849344961, 0849344964
Edition: 2
File Details: PDF, 12.32 MB
Year: 2003
Language: english
This document was created by an unregistered ChmMagic, please go to http://www.bisenter.com to register it. Thanks .

[ Team LiB ]

• Table of Contents
Introduction to Parallel Computing, Second Edition

By Ananth Grama, Anshul Gupta, George Karypis, Vipin Kumar

Publisher: Addison Wesley

Pub Date: January 16, 2003

ISBN: 0-201-64865-2

Pages: 856

Increasingly, parallel processing is being seen as the only cost-effective method for the fast solution of computationally large and
data-intensive problems. The emergence of inexpensive parallel computers such as commodity desktop multiprocessors and clusters of
workstations or PCs has made such parallel methods generally applicable, as have software standards for portable parallel
programming. This sets the stage for substantial growth in parallel software.

Data-intensive applications such as transaction processing and information retrieval, data mining and analysis and multimedia services
have provided a new challenge for the modern generation of parallel platforms. Emerging areas such as computational biology and
nanotechnology have implications for algorithms and systems development, while changes in architectures, programming models and
applications have implications for how parallel platforms are made available to users in the form of grid-based services.

This book takes into account these new developments as well as covering the more traditional problems addressed by parallel
computers.Where possible it employs an architecture-independent view of the underlying platforms and designs algorithms for an
abstract model. Message Passing Interface (MPI), POSIX threads and OpenMP have been selected as programming models and the
evolving application mix of parallel computing is reflected in various examples throughout the book.

[ Team LiB ]
This document was created by an unregistered ChmMagic, please go to http://www.bisenter.com to register it. Thanks.

[ Team LiB ]

• Table of Contents
Introduction to Parallel Computing, Second Edition

By Ananth Grama, Anshul Gupta, George Karypis, Vipin Kumar

Publisher: Addison Wesley


Pub Date: January 16, 2003
ISBN: 0-201-64865-2
Pages: 856

Copyright
Pearson Education
Preface
Acknowledgments
Chapter 1. Introduction to Parallel Computing
Section 1.1. Motivating Parallelism
Section 1.2. Scope of Parallel Computing
Section 1.3. Organization and Contents of the Text
Section 1.4. Bibliographic Remarks
Problems
Chapter 2. Parallel Programming Platforms
Section 2.1. Implicit Parallelism: Trends in Microprocessor Architectures*
Section 2.2. Limitations of Memory System Performance*
Section 2.3. Dichotomy of Parallel Computing Platforms
Section 2.4. Physical Organization of Parallel Platforms
Section 2.5. Communication Costs in Parallel Machines
Section 2.6. Routing Mechanisms for Interconnection Networks
Section 2.7. Impact of Process-Processor Mapping and Mapping Techniques
Section 2.8. Bibliographic Remarks
Problems
Chapter 3. Principles of Parallel Algorithm Design
Section 3.1. Preliminaries
Section 3.2. Decomposition Techniques
Section 3.3. Characteristics of Tasks and Interactions
Section 3.4. Mapping Techniques for Load Balancing
Section 3.5. Methods for Containing Interaction Overheads
This document was created by an unregistered ChmMagic, please go to http://www.bisenter.com to register it. Thanks.

Section 3.6. Parallel Algorithm Models


Section 3.7. Bibliographic Remarks
Problems
Chapter 4. Basic Communication Operations
Section 4.1. One-to-All Broadcast and All-to-One Reduction
Section 4.2. All-to-All Broadcast and Reduction
Section 4.3. All-Reduce and Prefix-Sum Operations
Section 4.4. Scatter and Gather
Section 4.5. All-to-All Personalized Communication
Section 4.6. Circular Shift
Section 4.7. Improving the Speed of Some Communication Operations
Section 4.8. Summary
Section 4.9. Bibliographic Remarks
Problems
Chapter 5. Analytical Modeling of Parallel Programs
Section 5.1. Sources of Overhead in Parallel Programs
Section 5.2. Performance Metrics for Parallel Systems
Section 5.3. The Effect of Granularity on Performance
Section 5.4. Scalability of Parallel Systems
Section 5.5. Minimum Execution Time and Minimum Cost-Optimal Execution Time
Section 5.6. Asymptotic Analysis of Parallel Programs
Section 5.7. Other Scalability Metrics
Section 5.8. Bibliographic Remarks
Problems
Chapter 6. Programming Using the Message-Passing Paradigm
Section 6.1. Principles of Message-Passing Programming
Section 6.2. The Building Blocks: Send and Receive Operations
Section 6.3. MPI: the Message Passing Interface
Section 6.4. Topologies and Embedding
Section 6.5. Overlapping Communication with Computation
Section 6.6. Collective Communication and Computation Operations
Section 6.7. Groups and Communicators
Section 6.8. Bibliographic Remarks
Problems
Chapter 7. Programming Shared Address Space Platforms
Section 7.1. Thread Basics
Section 7.2. Why Threads?
Section 7.3. The POSIX Thread API
Section 7.4. Thread Basics: Creation and Termination
Section 7.5. Synchronization Primitives in Pthreads
Section 7.6. Controlling Thread and Synchronization Attributes
Section 7.7. Thread Cancellation
Section 7.8. Composite Synchronization Constructs
Section 7.9. Tips for Designing Asynchronous Programs
Section 7.10. OpenMP: a Standard for Directive Based Parallel Programming
Section 7.11. Bibliographic Remarks
Problems
Chapter 8. Dense Matrix Algorithms
Section 8.1. Matrix-Vector Multiplication
Section 8.2. Matrix-Matrix Multiplication
This document was created by an unregistered ChmMagic, please go to http://www.bisenter.com to register it. Thanks.

Section 8.3. Solving a System of Linear Equations


Section 8.4. Bibliographic Remarks
Problems
Chapter 9. Sorting
Section 9.1. Issues in Sorting on Parallel Computers
Section 9.2. Sorting Networks
Section 9.3. Bubble Sort and its Variants
Section 9.4. Quicksort
Section 9.5. Bucket and Sample Sort
Section 9.6. Other Sorting Algorithms
Section 9.7. Bibliographic Remarks
Problems
Chapter 10. Graph Algorithms
Section 10.1. Definitions and Representation
Section 10.2. Minimum Spanning Tree: Prim's Algorithm
Section 10.3. Single-Source Shortest Paths: Dijkstra's Algorithm
Section 10.4. All-Pairs Shortest Paths
Section 10.5. Transitive Closure
Section 10.6. Connected Components
Section 10.7. Algorithms for Sparse Graphs
Section 10.8. Bibliographic Remarks
Problems
Chapter 11. Search Algorithms for Discrete Optimization Problems
Section 11.1. Definitions and Examples
Section 11.2. Sequential Search Algorithms
Section 11.3. Search Overhead Factor
Section 11.4. Parallel Depth-First Search
Section 11.5. Parallel Best-First Search
Section 11.6. Speedup Anomalies in Parallel Search Algorithms
Section 11.7. Bibliographic Remarks
Problems
Chapter 12. Dynamic Programming
Section 12.1. Overview of Dynamic Programming
Section 12.2. Serial Monadic DP Formulations
Section 12.3. Nonserial Monadic DP Formulations
Section 12.4. Serial Polyadic DP Formulations
Section 12.5. Nonserial Polyadic DP Formulations
Section 12.6. Summary and Discussion
Section 12.7. Bibliographic Remarks
Problems
Chapter 13. Fast Fourier Transform
Section 13.1. The Serial Algorithm
Section 13.2. The Binary-Exchange Algorithm
Section 13.3. The Transpose Algorithm
Section 13.4. Bibliographic Remarks
Problems
Appendix A. Complexity of Functions and Order Analysis
Section A.1. Complexity of Functions
Section A.2. Order Analysis of Functions
Bibliography
This document was created by an unregistered ChmMagic, please go to http://www.bisenter.com to register it. Thanks .

[ Team LiB ]
This document was created by an unregistered ChmMagic, please go to http://www.bisenter.com to register it. Thanks .

[ Team LiB ]
This document was created by an unregistered ChmMagic, please go to http://www.bisenter.com to register it. Thanks

Copyright
Pearson Education Limited

Edinburgh Gate

Harlow

Essex CM20 2JE

England

and Associated Companies throughout the world

Visit us on the World Wide Web at: www.pearsoneduc.com

First published by The Benjamin/Cummings Publishing Company, Inc. 1994

Second edition published 2003

© The Benjamin/Cummings Publishing Company, Inc. 1994

© Pearson Education Limited 2003

The rights of Ananth Grama, Anshul Gupta, George Karypis and Vipin Kumar to be identified as authors of this work have been asserted
by them in accordance with the Copyright, Designs and Patents Act 1988.

All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any
means, electronic, mechanical, photocopying, recording or otherwise, without either the prior written permission of the publisher or a
licence permitting restricted copying in the United Kingdom issued by the Copyright Licensing Agency Ltd, 90 Tottenham Court Road,
London W1T 4LP.

The programs in this book have been included for their instructional value. They have been tested with care but are not guaranteed for
any particular purpose. The publisher does not offer any warranties or representations nor does it accept any liabilities with respect to
the programs.

All trademarks used herein are the property of their respective owners. The use of any trademark in this text does not vest in the author
or publisher any trademark ownership rights in such trademarks, nor does the use of such trademarks imply any affiliation with or
endorsement of this book by such owners.

British Library Cataloguing-in-Publication Data

A catalogue record for this book is available from the British Library

Library of Congress Cataloging-in-Publication Data

A catalog record for this book is available from the Library of Congress

10 9 8 7 6 5 4 3 2 1

07 06 05 04 03

Printed and bound in the United States of America

Dedication
This document was created by an unregistered ChmMagic, please go to http://www.bisenter.com to register it. Thanks .

To Joanna, Rinku, Krista, and Renu

[ Team LiB ]
This document was created by an unregistered ChmMagic, please go to http://www.bisenter.com to register it. Thanks .

[ Team LiB ]

Pearson Education

We work with leading authors to develop the strongest educational materials in computing, bringing cutting-edge thinking and best
learning practice to a global market.

Under a range of well-known imprints, including Addison-Wesley, we craft high-quality print and electronic publications which help
readers to understand and apply their content, whether studying or at work.

To find out more about the complete range of our publishing, please visit us on the World Wide Web at:
www.pearsoneduc.com

[ Team LiB ]
This document was created by an unregistered ChmMagic, please go to http://www.bisenter.com to register it. Thanks .

[ Team LiB ]

Preface
Since the 1994 release of the text "Introduction to Parallel Computing: Design and Analysis of Algorithms" by the same authors, the field
of parallel computing has undergone significant changes. Whereas tightly coupled scalable message-passing platforms were the norm a
decade ago, a significant portion of the current generation of platforms consists of inexpensive clusters of workstations, and
multiprocessor workstations and servers. Programming models for these platforms have also evolved over this time. Whereas most
machines a decade back relied on custom APIs for messaging and loop-based parallelism, current models standardize these APIs
across platforms. Message passing libraries such as PVM and MPI, thread libraries such as POSIX threads, and directive based models
such as OpenMP are widely accepted as standards, and have been ported to a variety of platforms.

With respect to applications, fluid dynamics, structural mechanics, and signal processing formed dominant applications a decade back.
These applications continue to challenge the current generation of parallel platforms. However, a variety of new applications have also
become important. These include data-intensive applications such as transaction processing and information retrieval, data mining and
analysis, and multimedia services. Applications in emerging areas of computational biology and nanotechnology pose tremendous
challenges for algorithms and systems development. Changes in architectures, programming models, and applications are also being
accompanied by changes in how parallel platforms are made available to the users in the form of grid-based services.

This evolution has a profound impact on the process of design, analysis, and implementation of parallel algorithms. Whereas the
emphasis of parallel algorithm design a decade back was on precise mapping of tasks to specific topologies such as meshes and
hypercubes, current emphasis is on programmability and portability, both from points of view of algorithm design and implementation. To
this effect, where possible, this book employs an architecture independent view of the underlying platforms and designs algorithms for an
abstract model. With respect to programming models, Message Passing Interface (MPI), POSIX threads, and OpenMP have been
selected. The evolving application mix for parallel computing is also reflected in various examples in the book.

This book forms the basis for a single concentrated course on parallel computing or a two-part sequence. Some suggestions for such a
two-part sequence are:

1. Introduction to Parallel Computing: Chapters 1–6. This course would provide the basics of algorithm design and parallel
programming.

2. Design and Analysis of Parallel Algorithms: Chapters 2 and 3 followed by Chapters8–12. This course would provide an
in-depth coverage of design and analysis of various parallel algorithms.

The material in this book has been tested in Parallel Algorithms and Parallel Computing courses at the University of Minnesota and
Purdue University. These courses are taken primarily by graduate students and senior-level undergraduate students in Computer
Science. In addition, related courses in Scientific Computation, for which this material has also been tested, are taken by graduate
students in science and engineering, who are interested in solving computationally intensive problems.

Most chapters of the book include (i) examples and illustrations; (ii) problems that supplement the text and test students' understanding
of the material; and (iii) bibliographic remarks to aid researchers and students interested in learning more about related and advanced
topics. The comprehensive subject index helps the reader locate terms they might be interested in. The page number on which a term is
defined is highlighted in boldface in the index. Furthermore, the term itself appears in bold italics where it is defined. The sections that
deal with relatively complex material are preceded by a '*'. An instructors' manual containing slides of the figures and solutions to
selected problems is also available from the publisher (http://www.booksites.net/kumar).

As with our previous book, we view this book as a continually evolving resource. We thank all the readers who have kindly shared
critiques, opinions, problems, code, and other information relating to our first book. It is our sincere hope that we can continue this
interaction centered around this new book. We encourage readers to address communication relating to this book to
book-vk@cs.umn.edu. All relevant reader input will be added to the information archived at the sitehttp://www.cs.umn.edu/~parbook with
due credit to (and permission of) the sender(s). An on-line errata of the book will also be maintained at the site. We believe that in a
highly dynamic field such as ours, a lot is to be gained from a healthy exchange of ideas and material in this manner.

[ Team LiB ]
This document was created by an unregistered ChmMagic, please go to http://www.bisenter.com to register it. Thanks .

[ Team LiB ]

Acknowledgments
We would like to begin by acknowledging our spouses, Joanna, Rinku, Krista, and Renu to whom this book is dedicated. Without their
sacrifices this project would not have been seen completion. We also thank our parents, and family members, Akash, Avi, Chethan,
Eleni, Larry, Mary-Jo, Naina, Petros, Samir, Subhasish, Varun, Vibhav, and Vipasha for their affectionate support and encouragement
throughout this project.

Our respective institutions, Computer Sciences and Computing Research Institute (CRI) at Purdue University, Department of Computer
Science & Engineering, the Army High Performance Computing Research Center (AHPCRC), and the Digital Technology Center (DTC)
at the University of Minnesota, and the IBM T. J. Watson Research Center at Yorktown Heights, provided computing resources and
active and nurturing environments for the completion of this project.

This project evolved from our first book. We would therefore like to acknowledge all of the people who helped us with both editions. Many
people contributed to this project in different ways. We would like to thank Ahmed Sameh for his constant encouragement and support,
and Dan Challou, Michael Heath, Dinesh Mehta, Tom Nurkkala, Paul Saylor, and Shang-Hua Teng for the valuable input they provided
to the various versions of the book. We thank the students of the introduction to parallel computing classes at the University of
Minnesota and Purdue university for identifying and working through the errors in the early drafts of the book. In particular, we
acknowledge the patience and help of Jim Diehl and Rasit Eskicioglu, who worked through several early drafts of the manuscript to
identify numerous errors. Ramesh Agarwal, David Bailey, Rupak Biswas, Jim Bottum, Thomas Downar, Rudolf Eigenmann, Sonia
Fahmy, Greg Frederickson, John Gunnels, Fred Gustavson, Susanne Hambrusch, Bruce Hendrickson, Christoph Hoffmann, Kai Hwang,
Ioannis Ioannidis, Chandrika Kamath, David Keyes, Mehmet Koyuturk, Piyush Mehrotra, Zhiyuan Li, Jens Palsberg, Voicu Popescu, Alex
Pothen, Viktor Prasanna, Sanjay Ranka, Naren Ramakrishnan, Elisha Sacks, Vineet Singh, Sartaj Sahni, Vivek Sarin, Wojciech
Szpankowski, Srikanth Thirumalai, Jan Vitek, and David Yau have been great technical resources. It was a pleasure working with the
cooperative and helpful staff at Pearson Education. In particular, we would like to thank Keith Mansfield and Mary Lince for their
professional handling of the project.

The Army Research Laboratory, ARO, DOE, NASA, and NSF provided parallel computing research support for Ananth Grama, George
Karypis, and Vipin Kumar. In particular, Kamal Abdali, Michael Coyle, Jagdish Chandra, Frederica Darema, Stephen Davis, Wm
Randolph Franklin, Richard Hirsch, Charles Koelbel, Raju Namburu, N. Radhakrishnan, John Van Rosendale, Subhash Saini, and
Xiaodong Zhang have been supportive of our research programs in the area of parallel computing. Andrew Conn, Brenda Dietrich, John
Forrest, David Jensen, and Bill Pulleyblank at IBM supported the work of Anshul Gupta over the years.

[ Team LiB ]
This document was created by an unregistered ChmMagic, please go to http://www.bisenter.com to register it. Thanks .

[ Team LiB ]

Chapter 1. Introduction to Parallel Computing


The past decade has seen tremendous advances in microprocessor technology. Clock rates of processors have increased from about
40 MHz (e.g., a MIPS R3000, circa 1988) to over 2.0 GHz (e.g., a Pentium 4, circa 2002). At the same time, processors are now capable
of executing multiple instructions in the same cycle. The average number of cycles per instruction (CPI) of high end processors has
improved by roughly an order of magnitude over the past 10 years. All this translates to an increase in the peak floating point operation
execution rate (floating point operations per second, or FLOPS) of several orders of magnitude. A variety of other issues have also
become important over the same period. Perhaps the most prominent of these is the ability (or lack thereof) of the memory system to
feed data to the processor at the required rate. Significant innovations in architecture and software have addressed the alleviation of
bottlenecks posed by the datapath and the memory.

The role of concurrency in accelerating computing elements has been recognized for several decades. However, their role in providing
multiplicity of datapaths, increased access to storage elements (both memory and disk), scalable performance, and lower costs is
reflected in the wide variety of applications of parallel computing. Desktop machines, engineering workstations, and compute servers
with two, four, or even eight processors connected together are becoming common platforms for design applications. Large scale
applications in science and engineering rely on larger configurations of parallel computers, often comprising hundreds of processors.
Data intensive platforms such as database or web servers and applications such as transaction processing and data mining often use
clusters of workstations that provide high aggregate disk bandwidth. Applications in graphics and visualization use multiple rendering
pipes and processing elements to compute and render realistic environments with millions of polygons in real time. Applications requiring
high availability rely on parallel and distributed platforms for redundancy. It is therefore extremely important, from the point of view of
cost, performance, and application requirements, to understand the principles, tools, and techniques for programming the wide variety of
parallel platforms currently available.

[ Team LiB ]
This document was created by an unregistered ChmMagic, please go to http://www.bisenter.com to register it. Thanks

[ Team LiB ]

1.1 Motivating Parallelism

Development of parallel software has traditionally been thought of as time and effort intensive. This can be largely attributed to the
inherent complexity of specifying and coordinating concurrent tasks, a lack of portable algorithms, standardized environments, and
software development toolkits. When viewed in the context of the brisk rate of development of microprocessors, one is tempted to
question the need for devoting significant effort towards exploiting parallelism as a means of accelerating applications. After all, if it takes
two years to develop a parallel application, during which time the underlying hardware and/or software platform has become obsolete,
the development effort is clearly wasted. However, there are some unmistakable trends in hardware design, which indicate that
uniprocessor (or implicitly parallel) architectures may not be able to sustain the rate of realizable performance increments in the future.
This is a result of lack of implicit parallelism as well as other bottlenecks such as the datapath and the memory. At the same time,
standardized hardware interfaces have reduced the turnaround time from the development of a microprocessor to a parallel machine
based on the microprocessor. Furthermore, considerable progress has been made in standardization of programming environments to
ensure a longer life-cycle for parallel applications. All of these present compelling arguments in favor of parallel computing platforms.

1.1.1 The Computational Power Argument – from Transistors to FLOPS

In 1965, Gordon Moore made the following simple observation:

"The complexity for minimum component costs has increased at a rate of roughly a factor of two per year.
Certainly over the short term this rate can be expected to continue, if not to increase. Over the longer term, the
rate of increase is a bit more uncertain, although there is no reason to believe it will not remain nearly constant for
at least 10 years. That means by 1975, the number of components per integrated circuit for minimum cost will be
65,000."

His reasoning was based on an empirical log-linear relationship between device complexity and time, observed over three data points.
He used this to justify that by 1975, devices with as many as 65,000 components would become feasible on a single silicon chip
occupying an area of only about one-fourth of a square inch. This projection turned out to be accurate with the fabrication of a 16K CCD
memory with about 65,000 components in 1975. In a subsequent paper in 1975, Moore attributed the log-linear relationship to
exponential behavior of die sizes, finer minimum dimensions, and "circuit and device cleverness". He went on to state that:

"There is no room left to squeeze anything out by being clever. Going forward from here we have to depend on
the two size factors - bigger dies and finer dimensions."

He revised his rate of circuit complexity doubling to 18 months and projected from 1975 onwards at this reduced rate. This curve came to
be known as "Moore's Law". Formally, Moore's Law states that circuit complexity doubles every eighteen months. This empirical
relationship has been amazingly resilient over the years both for microprocessors as well as for DRAMs. By relating component density
and increases in die-size to the computing power of a device, Moore's law has been extrapolated to state that the amount of computing
power available at a given cost doubles approximately every 18 months.

The limits of Moore's law have been the subject of extensive debate in the past few years. Staying clear of this debate, the issue of
translating transistors into useful OPS (operations per second) is the critical one. It is possible to fabricate devices with very large
transistor counts. How we use these transistors to achieve increasing rates of computation is the key architectural challenge. A logical
recourse to this is to rely on parallelism – both implicit and explicit. We will briefly discuss implicit parallelism in Section 2.1 and devote
the rest of this book to exploiting explicit parallelism.
This document was created by an unregistered ChmMagic, please go to http://www.bisenter.com to register it. Thanks .

1.1.2 The Memory/Disk Speed Argument

The overall speed of computation is determined not just by the speed of the processor, but also by the ability of the memory system to
feed data to it. While clock rates of high-end processors have increased at roughly 40% per year over the past decade, DRAM access
times have only improved at the rate of roughly 10% per year over this interval. Coupled with increases in instructions executed per clock
cycle, this gap between processor speed and memory presents a tremendous performance bottleneck. This growing mismatch between
processor speed and DRAM latency is typically bridged by a hierarchy of successively faster memory devices called caches that rely on
locality of data reference to deliver higher memory system performance. In addition to the latency, the net effective bandwidth between
DRAM and the processor poses other problems for sustained computation rates.

The overall performance of the memory system is determined by the fraction of the total memory requests that can be satisfied from the
cache. Memory system performance is addressed in greater detail in Section 2.2. Parallel platforms typically yield better memory system
performance because they provide (i) larger aggregate caches, and (ii) higher aggregate bandwidth to the memory system (both typically
linear in the number of processors). Furthermore, the principles that are at the heart of parallel algorithms, namely locality of data
reference, also lend themselves to cache-friendly serial algorithms. This argument can be extended to disks where parallel platforms can
be used to achieve high aggregate bandwidth to secondary storage. Here, parallel algorithms yield insights into the development of
out-of-core computations. Indeed, some of the fastest growing application areas of parallel computing in data servers (database servers,
web servers) rely not so much on their high aggregate computation rates but rather on the ability to pump data out at a faster rate.

1.1.3 The Data Communication Argument

As the networking infrastructure evolves, the vision of using the Internet as one large heterogeneous parallel/distributed computing
environment has begun to take shape. Many applications lend themselves naturally to such computing paradigms. Some of the most
impressive applications of massively parallel computing have been in the context of wide-area distributed platforms. The SETI (Search
for Extra Terrestrial Intelligence) project utilizes the power of a large number of home computers to analyze electromagnetic signals from
outer space. Other such efforts have attempted to factor extremely large integers and to solve large discrete optimization problems.

In many applications there are constraints on the location of data and/or resources across the Internet. An example of such an
application is mining of large commercial datasets distributed over a relatively low bandwidth network. In such applications, even if the
computing power is available to accomplish the required task without resorting to parallel computing, it is infeasible to collect the data at
a central location. In these cases, the motivation for parallelism comes not just from the need for computing resources but also from the
infeasibility or undesirability of alternate (centralized) approaches.

[ Team LiB ]
This document was created by an unregistered ChmMagic, please go to http://www.bisenter.com to register it. Thanks .

[ Team LiB ]
This document was created by an unregistered ChmMagic, please go to http://www.bisenter.com to register it. Thanks

1.2 Scope of Parallel Computing

Parallel computing has made a tremendous impact on a variety of areas ranging from computational simulations for scientific and
engineering applications to commercial applications in data mining and transaction processing. The cost benefits of parallelism coupled
with the performance requirements of applications present compelling arguments in favor of parallel computing. We present a small
sample of the diverse applications of parallel computing.

1.2.1 Applications in Engineering and Design

Parallel computing has traditionally been employed with great success in the design of airfoils (optimizing lift, drag, stability), internal
combustion engines (optimizing charge distribution, burn), high-speed circuits (layouts for delays and capacitive and inductive effects),
and structures (optimizing structural integrity, design parameters, cost, etc.), among others. More recently, design of
microelectromechanical and nanoelectromechanical systems (MEMS and NEMS) has attracted significant attention. While most
applications in engineering and design pose problems of multiple spatial and temporal scales and coupled physical phenomena, in the
case of MEMS/NEMS design these problems are particularly acute. Here, we often deal with a mix of quantum phenomena, molecular
dynamics, and stochastic and continuum models with physical processes such as conduction, convection, radiation, and structural
mechanics, all in a single system. This presents formidable challenges for geometric modeling, mathematical modeling, and algorithm
development, all in the context of parallel computers.

Other applications in engineering and design focus on optimization of a variety of processes. Parallel computers have been used to
solve a variety of discrete and continuous optimization problems. Algorithms such as Simplex, Interior Point Method for linear
optimization and Branch-and-bound, and Genetic programming for discrete optimization have been efficiently parallelized and are
frequently used.

1.2.2 Scientific Applications

The past few years have seen a revolution in high performance scientific computing applications. The sequencing of the human genome
by the International Human Genome Sequencing Consortium and Celera, Inc. has opened exciting new frontiers in bioinformatics.
Functional and structural characterization of genes and proteins hold the promise of understanding and fundamentally influencing
biological processes. Analyzing biological sequences with a view to developing new drugs and cures for diseases and medical
conditions requires innovative algorithms as well as large-scale computational power. Indeed, some of the newest parallel computing
technologies are targeted specifically towards applications in bioinformatics.

Advances in computational physics and chemistry have focused on understanding processes ranging in scale from quantum phenomena
to macromolecular structures. These have resulted in design of new materials, understanding of chemical pathways, and more efficient
processes. Applications in astrophysics have explored the evolution of galaxies, thermonuclear processes, and the analysis of extremely
large datasets from telescopes. Weather modeling, mineral prospecting, flood prediction, etc., rely heavily on parallel computers and
have very significant impact on day-to-day life.

Bioinformatics and astrophysics also present some of the most challenging problems with respect to analyzing extremely large datasets.
Protein and gene databases (such as PDB, SwissProt, and ENTREZ and NDB) along with Sky Survey datasets (such as the Sloan
Digital Sky Surveys) represent some of the largest scientific datasets. Effectively analyzing these datasets requires tremendous
computational power and holds the key to significant scientific discoveries.

1.2.3 Commercial Applications


This document was created by an unregistered ChmMagic, please go to http://www.bisenter.com to register it. Thanks .

With the widespread use of the web and associated static and dynamic content, there is increasing emphasis on cost-effective servers
capable of providing scalable performance. Parallel platforms ranging from multiprocessors to linux clusters are frequently used as web
and database servers. For instance, on heavy volume days, large brokerage houses on Wall Street handle hundreds of thousands of
simultaneous user sessions and millions of orders. Platforms such as IBMs SP supercomputers and Sun Ultra HPC servers power these
business-critical sites. While not highly visible, some of the largest supercomputing networks are housed on Wall Street.

The availability of large-scale transaction data has also sparked considerable interest in data mining and analysis for optimizing business
and marketing decisions. The sheer volume and geographically distributed nature of this data require the use of effective parallel
algorithms for such problems as association rule mining, clustering, classification, and time-series analysis.

1.2.4 Applications in Computer Systems

As computer systems become more pervasive and computation spreads over the network, parallel processing issues become engrained
into a variety of applications. In computer security, intrusion detection is an outstanding challenge. In the case of network intrusion
detection, data is collected at distributed sites and must be analyzed rapidly for signaling intrusion. The infeasibility of collecting this data
at a central location for analysis requires effective parallel and distributed algorithms. In the area of cryptography, some of the most
spectacular applications of Internet-based parallel computing have focused on factoring extremely large integers.

Embedded systems increasingly rely on distributed control algorithms for accomplishing a variety of tasks. A modern automobile consists
of tens of processors communicating to perform complex tasks for optimizing handling and performance. In such systems, traditional
parallel and distributed algorithms for leader selection, maximal independent set, etc., are frequently used.

While parallel computing has traditionally confined itself to platforms with well behaved compute and network elements in which faults
and errors do not play a significant role, there are valuable lessons that extend to computations on ad-hoc, mobile, or faulty
environments.

[ Team LiB ]
This document was created by an unregistered ChmMagic, please go to http://www.bisenter.com to register it. Thanks

[ Team LiB ]

1.3 Organization and Contents of the Text

This book provides a comprehensive and self-contained exposition of problem solving using parallel computers. Algorithms and metrics
focus on practical and portable models of parallel machines. Principles of algorithm design focus on desirable attributes of parallel
algorithms and techniques for achieving these in the contest of a large class of applications and architectures. Programming techniques
cover standard paradigms such as MPI and POSIX threads that are available across a range of parallel platforms.

Chapters in this book can be grouped into four main parts as illustrated in Figure 1.1. These parts are as follows:

Figure 1.1. Recommended sequence for reading the chapters.


This document was created by an unregistered ChmMagic, please go to http://www.bisenter.com to register it. Thanks .

Fundamentals This section spans Chapters2 through 4 of the book. Chapter 2, Parallel Programming Platforms, discusses the physical
organization of parallel platforms. It establishes cost metrics that can be used for algorithm design. The objective of this chapter is not to
provide an exhaustive treatment of parallel architectures; rather, it aims to provide sufficient detail required to use these machines
efficiently. Chapter 3, Principles of Parallel Algorithm Design, addresses key factors that contribute to efficient parallel algorithms and
presents a suite of techniques that can be applied across a wide range of applications. Chapter 4, Basic Communication Operations,
presents a core set of operations that are used throughout the book for facilitating efficient data transfer in parallel algorithms. Finally,
Chapter 5, Analytical Modeling of Parallel Programs, deals with metrics for quantifying the performance of a parallel algorithm.

Parallel Programming This section includes Chapters6 and 7 of the book. Chapter 6, Programming Using the Message-Passing
Paradigm, focuses on the Message Passing Interface (MPI) for programming message passing platforms, including clusters. Chapter 7,
Programming Shared Address Space Platforms, deals with programming paradigms such as threads and directive based approaches.
Using paradigms such as POSIX threads and OpenMP, it describes various features necessary for programming shared-address-space
parallel machines. Both of these chapters illustrate various programming concepts using a variety of examples of parallel programs.

Non-numerical Algorithms Chapters 9–12 present parallel non-numerical algorithms. Chapter 9 addresses sorting algorithms such as
bitonic sort, bubble sort and its variants, quicksort, sample sort, and shellsort. Chapter 10 describes algorithms for various graph theory
problems such as minimum spanning tree, shortest paths, and connected components. Algorithms for sparse graphs are also discussed.
Chapter 11 addresses search-based methods such as branch-and-bound and heuristic search for combinatorial problems.Chapter 12
classifies and presents parallel formulations for a variety of dynamic programming algorithms.

Numerical Algorithms Chapters 8 and 13 present parallel numerical algorithms. Chapter 8 covers basic operations on dense matrices
such as matrix multiplication, matrix-vector multiplication, and Gaussian elimination. This chapter is included before non-numerical
algorithms, as the techniques for partitioning and assigning matrices to processors are common to many non-numerical algorithms.
Furthermore, matrix-vector and matrix-matrix multiplication algorithms form the kernels of many graph algorithms. Chapter 13 describes
algorithms for computing Fast Fourier Transforms.

[ Team LiB ]
This document was created by an unregistered ChmMagic, please go to http://www.bisenter.com to register it. Thanks .

[ Team LiB ]

1.4 Bibliographic Remarks

Many books discuss aspects of parallel processing at varying levels of detail. Hardware aspects of parallel computers have been
discussed extensively in several textbooks and monographs [CSG98, LW95, HX98, AG94, Fly95, AG94, Sto93, DeC89, HB84, RF89,
Sie85, Tab90, Tab91, WF84, Woo86]. A number of texts discuss paradigms and languages for programming parallel computersLB98, [
+
Pac98, GLS99, GSNL98, CDK 00, WA98, And91, BA82, Bab88, Ble90, Con89, CT92, Les93, Per87, Wal91]. Akl [Akl97], Cole [Col89],
Gibbons and Rytter [GR90], Foster [Fos95], Leighton [Lei92], Miller and Stout [MS96], and Quinn [Qui94] discuss various aspects of
parallel algorithm design and analysis. Buyya (Editor) [Buy99] and Pfister [Pfi98] discuss various aspects of parallel computing using
clusters. Jaja [Jaj92] covers parallel algorithms for the PRAM model of computation. Hillis H
[ il85, HS86] and Hatcher and Quinn H[ Q91]
discuss data-parallel programming. Agha [Agh86] discusses a model of concurrent computation based onactors. Sharp [Sha85]
addresses data-flow computing. Some books provide a general overview of topics in parallel computing [CL93, Fou94, Zom96, JGD87,
LER92, Mol93, Qui94]. Many books address parallel processing applications in numerical analysis and scientific computingDDSV99,
[
+
FJDS96, GO93, Car89]. Fox et al. [FJL 88] and Angus et al. [AFKW90] provide an application-oriented view of algorithm design for
problems in scientific computing. Bertsekas and Tsitsiklis [BT97] discuss parallel algorithms, with emphasis on numerical applications.

Akl and Lyons [AL93] discuss parallel algorithms in computational geometry. Ranka and Sahni RS90b] [ and Dew, Earnshaw, and
Heywood [DEH89] address parallel algorithms for use in computer vision. Green Gre91] [ covers parallel algorithms for graphics
applications. Many books address the use of parallel processing in artificial intelligence applications [Gup87, HD89b, KGK90, KKKS94,
Kow88, RZ89].

A useful collection of reviews, bibliographies and indexes has been put together by the Association for Computing Machinery [ACM91].
Messina and Murli [MM91] present a collection of papers on various aspects of the application and potential of parallel computing. The
scope of parallel processing and various aspects of US government support have also been discussed in National Science Foundation
reports [NSF91, GOV99].

A number of conferences address various aspects of parallel computing. A few important ones are the Supercomputing Conference,
ACM Symposium on Parallel Algorithms and Architectures, the International Conference on Parallel Processing, the International
Parallel and Distributed Processing Symposium, Parallel Computing, and the SIAM Conference on Parallel Processing. Important
journals in parallel processing include IEEE Transactions on Parallel and Distributed Systems, International Journal of Parallel
Programming, Journal of Parallel and Distributed Computing, Parallel Computing, IEEE Concurrency, and Parallel Processing Letters.
These proceedings and journals provide a rich source of information on the state of the art in parallel processing.

[ Team LiB ]
Other documents randomly have
different content
Power then, though joined with reason, and under its direction,
cannot be expected to prevail over opposite power, though merely
brutal, unless the one bears some proportion to the other. Again: put
the imaginary case, that rational and irrational creatures were of like
external shape and manner: it is certain, before there were
opportunities for the first to distinguish each other, to separate from
their adversaries, and to form a union among themselves, they
might be upon a level, or in several respects upon great
disadvantage; though united they might be vastly superior: since
union is of such efficacy, that ten men united, might be able to
accomplish, what ten thousand of the same natural strength and
understanding wholly ununited, could not. In this case, brute force
might more than maintain its ground against reason, for want of
union among the rational creatures. Or suppose a number of men to
land upon an island inhabited only by wild beasts; men who, by the
regulations of civil government, the inventions of art, and the
experience of some years, could they be preserved so long, would
be really sufficient to subdue the wild beasts, and to preserve
themselves in security from them: yet a conjuncture of accidents
might give such advantage to the irrational animals as they might at
once overpower, and even extirpate, the rational ones. Length of
time then, proper scope, and opportunities for reason to exert itself,
may be absolutely necessary to its prevailing over brute force.
Further: there are many instances of brutes succeeding in
attempts, which they could not have undertaken, had not their
irrational nature rendered them incapable of foreseeing the danger
of such attempt, or the fury of passion hindered their attending to it:
and there are instances of reason and real prudence preventing
men’s undertaking what, it has appeared afterwards, they might
have succeeded in by a lucky rashness. In certain conjunctures,
ignorance and folly, weakness and discord, may have their
advantages. So that rational animals have not necessarily the
superiority over irrational ones; but, how improbable soever it may
be, it is evidently possible, that in some globes the latter may be
superior. And were the former wholly at variance and disunited, by
false self-interest and envy, by treachery and injustice, and
consequent rage and malice against each other, whilst the latter
were firmly united among themselves by instinct, this might greatly
contribute to the introducing such an inverted order of things. For
every one would consider it as inverted: since reason has, in the
nature of it, a tendency to prevail over brute force; notwithstanding
the possibility it may not prevail, and the necessity, which there is, of
many concurring circumstances to render it prevalent.
Now I say, virtue in a society has a like tendency to procure
superiority and additional power: whether this power be considered
as the means of security from opposite power, or of obtaining other
advantages. It has this tendency, by rendering public good, an
object and end, to every member of the society; by putting every
one upon consideration and diligence, recollection and self-
government, both in order to see what is the most effectual method,
and also in order to perform their proper part, for obtaining and
preserving it; by uniting a society within itself, and so increasing its
strength; and, which is particularly to be mentioned, uniting it by
means of veracity and justice. For as these last are principal bonds
of union, so benevolence or public spirit, undirected, unrestrained by
them, is, nobody knows what.
And suppose the invisible world, and the invisible dispensations of
Providence, to be, in any sort, analogous to what appears: or that
both together make up one uniform scheme, the two parts of which,
the part which we see, and that which is beyond our observation,
are analogous to each other: then, there must be a like natural
tendency in the derived power, throughout the universe, under the
direction of virtue, to prevail in general over that which is not under
its direction; as there is in reason, derived reason in the universe, to
prevail over brute force.
But then, in order to the prevalence of virtue, or that it may
actually produce, what it has a tendency to produce; the like
concurrences are necessary, as are, to the prevalence of reason.
There must be some proportion, between the natural power or force
which is, and that which is not, under the direction of virtue: there
must be sufficient length of time; for the complete success of virtue,
as of reason, cannot, from the nature of the thing, be otherwise
than gradual: there must be, as one may speak, a fair field of trial, a
stage large and extensive enough, proper occasions and
opportunities, for the virtuous to join together, to exert themselves
against lawless force, and to reap the fruit of their united labors.
Now indeed it is to be hoped, that the disproportion between the
good and bad, even here on earth, is not so great, but that the
former have natural power sufficient to their prevailing to a
considerable degree, if circumstances would permit this power to be
united. For, much less, very much less, power under the direction of
virtue, would prevail over much greater not under the direction of it.
[77] However, good men over the face of the earth cannot unite;
because, (among other reasons,) they cannot be sufficiently
ascertained of each other’s characters. And the known course of
human things, the scene we are now passing through, particularly
the shortness of life, denies to virtue its full scope in several other
respects.
The natural tendency which we have been considering, though
real, is hindered from being carried into effect in the present state:
but these hinderances may be removed in a future one. Virtue, to
borrow the Christian allusion, is militant here; and various untoward
accidents contribute to its being often overborne: but it may combat
with greater advantage hereafter, and prevail completely, and enjoy
its consequent rewards, in some future states. Neglected as it is,
perhaps unknown, perhaps despised and oppressed here; there
maybe scenes in eternity, lasting enough, and in every other way
adapted, to afford it a sufficient sphere of action; and a sufficient
sphere for the natural consequences of it to follow in fact. If the soul
be naturally immortal, and this state be a progress towards a future
one, as childhood is towards mature age, good men may naturally
unite, not only among themselves, but also with other orders of
virtuous creatures, in that future state. For virtue, from the very
nature of it, is a principle and bond of union, in some degree, among
all who are endued with it, and known to each other; so as that by
it, a good man cannot but recommend himself to the favor and
protection of all virtuous beings, throughout the whole universe,
who can be acquainted with his character, and can any way
interpose in his behalf in any part of his duration.
One might add, that suppose all this advantageous tendency of
virtue to become effect, among one or more orders of creatures, in
any distant scenes and periods, and to be seen by any orders of
vicious creatures, throughout the universal kingdom of God; this
happy effect of virtue would have a tendency, by way of example,
and possibly in other ways, to amend those of them who are capable
of amendment, and of being recovered to a just sense of virtue. If
our notions of the plan of Providence were enlarged in any sort
proportionable to what late discoveries have enlarged our views with
respect to the material world, representations of this kind would not
appear absurd or extravagant. They are not to be taken as intended
for a literal delineation of what is in fact the particular scheme of the
universe, which cannot be known without revelation: for
suppositions are not to be looked on as true, because not incredible:
but they are mentioned to show, that our finding virtue to be
hindered from procuring to itself such superiority and advantages, is
no objection against its having, in the essential nature of the thing, a
tendency to procure them. And the suppositions now mentioned do
plainly show this: for they show, that these hinderances are so far
from being necessary, that we ourselves can easily conceive, how
they may be removed in future states, and full scope be granted to
virtue. And all these advantageous tendencies of it are to be
considered as declarations of God in its favor. This however is taking
a pretty large compass: though it is certain, that, as the material
world appears to be, in a manner, boundless and immense, there
must be some scheme of Providence vast in proportion to it.
But let us return to the earth our habitation; and we shall see this
happy tendency of virtue, by imagining an instance not so vast and
remote: by supposing a kingdom or society of men upon it, perfectly
virtuous, for a succession of many ages; to which, if you please, may
be given a situation advantageous for universal monarchy. In such a
state, there would be no such thing as faction: but men of the
greatest capacity would of course, all along, have the chief direction
of affairs willingly yielded to them; and they would share it among
themselves without envy. Each of these would have the part
assigned him, to which his genius was peculiarly adapted; and
others, who had not any distinguished genius, would be safe, and
think themselves very happy, by being under the protection and
guidance of those who had. Public determinations would really be
the result of the united wisdom of the community: and they would
faithfully be executed, by the united strength of it. Some would
contribute in a higher way, but all in some way, to the public
prosperity: and in it, each would enjoy the fruits of his own virtue.
And as injustice, whether by fraud or force, would be unknown
among themselves, so they would be sufficiently secured from it in
their neighbors. For cunning and false self-interest, confederacies in
injustice, ever slight, and accompanied with faction and intestine
treachery; these on one hand would be found mere childish folly and
weakness, when set in opposition against wisdom, public spirit,
union inviolable, and fidelity on the other: allowing both a sufficient
length of years to try their force. Add the general influence, which
such a kingdom would have over the face of the earth, by way of
example particularly, and the reverence which would be paid it. It
would plainly be superior to all others, and the world must gradually
come under its empire; not by means of lawless violence; but partly
by what must be allowed to be just conquest; and partly by other
kingdoms submitting themselves voluntarily to it, throughout a
course of ages, and claiming its protection, one after another, in
successive exigencies. The head of it would be a universal monarch,
in another sense than any mortal has yet been; and the Eastern
style would be literally applicable to him, that all people, nations,
and languages should serve him. And though indeed our knowledge
of human nature, and the whole history of mankind, show the
impossibility, without some miraculous interposition, that a number
of men, here on earth, should unite in one society or government, in
the fear of God and universal practice of virtue; and that such a
government should continue so united for a succession of ages: yet
admitting or supposing this, the effect would be as now drawn out.
Thus for instance, the wonderful power and prosperity promised to
the Jewish nation in the Scripture, would be, in a great measure, the
consequence of what is predicted of them; that the people should be
all righteous, and inherit the land forever;[78] were we to understand
the latter phrase of a long continuance only, sufficient to give things
time to work. The predictions of this kind, for there are many of
them, cannot come to pass, in the present known course of nature;
but suppose them come to pass, and then, the dominion and
preëminence promised must naturally follow, to a very considerable
degree.
Consider now the general system of religion; that the government
of the world is uniform, and one, and moral; that virtue and right
shall finally have the advantage, and prevail over fraud and lawless
force, over the deceits as well as the violence of wickedness, under
the conduct of one supreme governor: and from the observations
above made, it will appear that God has, by our reason, given us to
see a peculiar connection in the several parts of this scheme, and a
tendency towards the completion of it, arising out of the very nature
of virtue: which tendency is to be considered as something moral in
the essential constitution of things. If any one should think all this to
be of little importance, I desire him to consider, what he would think,
if vice had, essentially and in its nature, these advantageous
tendencies; or if virtue had essentially the contrary ones.
It may be objected, that notwithstanding all these natural effects
and natural tendencies of virtue, yet things may be now going on
throughout the universe, and may go on hereafter, in the same
mixed way as here at present upon earth: virtue sometimes
prosperous, sometimes depressed; vice sometimes punished,
sometimes successful.
The answer to which is, that it is not the purpose of this chapter,
nor of this treatise, properly to prove God’s perfect moral
government over the world, or the truth of religion; but to observe
what there is in the constitution and course of nature, to confirm the
proper proof of it, supposed to be known: and that the weight of the
foregoing observations to this purpose may be thus distinctly proved.
Pleasure and pain are, to a certain degree, say to a very high
degree, distributed among us without any apparent regard to the
merit or demerit of characters. And were there nothing else
concerning this matter discernible in the constitution and course of
nature, there would be no ground from the constitution and course
of nature, to hope or to fear that men would be rewarded or
punished hereafter according to their deserts: which, however, it is
to be remarked, implies, that even then there would be no ground
from appearances to think, that vice upon the whole would have the
advantage, rather than that virtue would. Thus the proof of a future
state of retribution would rest upon the usual known arguments for
it; which are I think plainly unanswerable; and would be so, though
there were no additional confirmation of them from the things above
insisted on. But these things are a very strong confirmation of them.
For,
First, They show that the Author of nature is not indifferent to
virtue and vice. They amount to a declaration, from him,
determinate and not to be evaded, in favor of one, and against the
other; such a declaration, as there is nothing to be set over against
or answer, on the part of vice. So that were a man, laying aside the
proper proof of religion, to determine from the course of nature only,
whether it were most probable, that the righteous or the wicked
would have the advantage in a future life; there can be no doubt,
but that he would determine the probability to be, that the former
would. The course of nature then, in the view of it now given,
furnishes us with a real practical proof of the obligations of religion.
Secondly, When, conformably to what religion teaches us, God
shall reward and punish virtue and vice as such, so as that every one
shall, upon the whole, have his deserts; this distributive justice will
not be a thing different in kind, but only in degree, from what we
experience in his present government. It will be that in effect,
towards which we now see a tendency. It will be no more than the
completion of that moral government, the principles and beginning
of which have been shown, beyond all dispute, discernible in the
present constitution and course of nature.
Thirdly, As under the natural government of God, our experience
of those kinds and degrees of happiness and misery, which we do
experience at present, gives just ground to hope for, and to fear,
higher degrees and other kinds of both in a future state, supposing a
future state admitted: so under his moral government our
experience, that virtue and vice are, in the manners above
mentioned, actually rewarded and punished at present, in a certain
degree, gives just ground to hope and to fear, that they may be
rewarded and punished in a higher degree hereafter. It is
acknowledged indeed that this alone is not sufficient ground to
think, that they actually will be rewarded and punished in a higher
degree, rather than in a lower: but then,
Lastly, There is sufficient ground to think so, from the good and
bad tendencies of virtue and vice. For these tendencies are essential,
and founded in the nature of things: whereas the hinderances to
their becoming effect are, in numberless cases, not necessary, but
artificial only. Now it may be much more strongly argued, that these
tendencies, as well as the actual rewards and punishments, of virtue
and vice, which arise directly out of the nature of things, will remain
hereafter, than that the accidental hinderances of them will. And if
these hinderances do not remain; those rewards and punishments
cannot but be carried on much farther towards the perfection of
moral government: i.e. the tendencies of virtue and vice will become
effect; but when, or where, or in what particular way, cannot be
known at all, but by revelation.
Upon the whole: there is a kind of moral government implied in
God’s natural government:[79] virtue and vice are naturally rewarded
and punished as beneficial and mischievous to society;[80] and
rewarded and punished directly as virtue and vice.[81] The notion of
a moral scheme of government is not fictitious, but natural; for it is
suggested to our thoughts by the constitution and course of nature:
and the execution of this scheme is actually begun, in the instances
here mentioned. And these things are to be considered as a
declaration of the Author of nature, for virtue, and against vice: they
give a credibility to the supposition of their being rewarded and
punished hereafter; and also ground to hope and to fear, that they
may be rewarded and punished in higher degrees than they are
here. All this is confirmed, and the argument for religion, from the
constitution and course of nature, is carried on farther, by observing,
that there are natural tendencies, and, in innumerable cases, only
artificial hinderances, to this moral scheme’s being carried on much
farther towards perfection, than it is at present.[82]
The notion then of a moral scheme of government, much more
perfect than what is seen, is not a fictitious, but a natural notion; for
it is suggested to our thoughts, by the essential tendencies of virtue
and vice. These tendencies are to be considered as intimations, as
implicit promises and threatenings, from the Author of nature, of
much greater rewards and punishments to follow virtue and vice,
than do at present. Indeed, every natural tendency, which is to
continue, but which is hindered from becoming effect by only
accidental causes, affords a presumption, that such tendency will,
some time or other, become effect: a presumption proportionable in
degree to the length of the duration, through which such tendency
will continue. From these things together, arises a real presumption,
that the moral scheme of government established in nature, shall be
carried on much farther towards perfection hereafter; and, I think, a
presumption that it will be absolutely completed. From these things,
joined with the moral nature which God has given us, considered as
given us by him, arises a practical proof[83] that it will be completed:
a proof from fact; and therefore a distinct one from that which is
deduced from the eternal and unalterable relations, the fitness and
unfitness of actions.
CHAPTER IV.
PROBATION, AS IMPLYING TRIAL, DIFFICULTIES, AND DANGER.[84]

The general doctrine of religion, that our present life is a state of


probation for a future one, comprehends under it several particular
things, distinct from each other. The first and most common
meaning of it seems to be, that our future interest is now
depending, and depending upon ourselves; that we have scope and
opportunities here, for that good and bad behavior, which God will
reward and punish hereafter; together with temptations to one, as
well as inducements of reason to the other. And this, in a great
measure, is the same as saying, that we are under the moral
government of God, and to give an account of our actions to him.
For the notion of a future account and general righteous judgment,
implies some sort of temptations to what is wrong: otherwise there
would be no moral possibility of doing wrong, nor ground for
judgment, or discrimination. But there is this difference, that the
word probation is more distinctly and particularly expressive of
allurements to wrong, or difficulties in adhering uniformly to what is
right, and of the danger of miscarrying by such temptations, than
the words moral government. A state of probation then, as thus
particularly implying in it trial, difficulties, and danger, may require to
be considered distinctly by itself.[85]
As the moral government of God, which religion teaches us,
implies that we are in a state of trial with regard to a future world,
so also his natural government over us implies that we are in a state
of trial, in the like sense, with regard to the present world. Natural
government by rewards and punishments, as much implies natural
trial, as moral government does moral trial. The natural government
of God here meant,[86] consists in his annexing pleasure to some
actions, and pain to others, which are in our power to do or forbear,
and giving us notice of such appointment, beforehand. This
necessarily implies, that he has made our happiness and misery, or
our interest, to depend in part upon ourselves. So far as men have
temptations to any course of action, which will probably occasion
them greater temporal inconvenience and uneasiness, than
satisfaction, so far their temporal interest is in danger from
themselves; or they are in a state of trial with respect to it. Now
people often blame others, and even themselves, for their
misconduct in their temporal concerns. And we find many are greatly
wanting to themselves, and miss that natural happiness, which they
might have obtained in the present life: perhaps every one does in
some degree. But many run themselves into great inconvenience,
and into extreme distress and misery, not through incapacity of
knowing better, and doing better, for themselves, which would be
nothing to the present purpose, but through their own fault. These
things necessarily imply temptation, and danger of miscarrying, in a
greater or less degree, with respect to our worldly interest or
happiness. Every one too, without having religion in his thoughts,
speaks of the hazards which young people run, upon their setting
out in the world: hazards from other causes, than merely their
ignorance, and unavoidable accidents. And some courses of vice, at
least, being contrary to men’s worldly interest or good; temptations
to these must at the same time be temptations to forego our present
and our future interest.
Thus in our natural or temporal capacity, we are in a state of trial,
i.e. of difficulty and danger, analogous, or like to our moral and
religious trial. This will more distinctly appear to any one, who thinks
it worth while, more distinctly, to consider, what it is which
constitutes our trial in both capacities, and to observe, how mankind
behave under it.
That which constitutes this trial, in both these capacities, must be
something either in our external circumstances, or in our nature. For,
on the one hand, persons may be betrayed into wrong behavior
upon surprise, or overcome upon any other very singular and
extraordinary external occasions, who would, otherwise, have
preserved their character of prudence and of virtue: in which cases,
every one, in speaking of the wrong behavior of these persons,
would impute it to such particular external circumstances. On the
other hand, men who have contracted habits of vice and folly of any
kind, or have some particular passions in excess, will seek
opportunities, and, as it were, go out of their way, to gratify
themselves in these respects, at the expense of their wisdom and
their virtue; led to it, as every one would say, not by external
temptations, but by such habits and passions. And the account of
this last case is, that particular passions are no more coincident with
prudence, or that reasonable self-love, the end of which is our
worldly interest, than they are with the principle of virtue and
religion; but often draw contrary ways to one, as well as to the
other: and so such particular passions are as much temptations, to
act imprudently with regard to our worldly interest, as to act
viciously.[87] When we say, men are misled by external
circumstances of temptation; it cannot but be understood, that there
is somewhat within themselves, to render those circumstances
temptations, or to render them susceptible of impressions from
them. So when we say, they are misled by passions; it is always
supposed, that there are occasions, circumstances, and objects,
exciting these passions, and affording means for gratifying them.
Therefore, temptations from within, and from without, coincide, and
mutually imply each other. The several external objects of the
appetites, passions, and affections, being present to the senses, or
offering themselves to the mind, and so exciting emotions suitable to
their nature; not only in cases where they can be gratified
consistently with innocence and prudence, but also in cases where
they cannot, and yet can be gratified imprudently and viciously: this
as really puts them in danger of voluntarily foregoing their present
interest or good, as their future; and as really renders self-denial
necessary to secure one, as the other: i.e. we are in a like state of
trial with respect to both, by the very same passions, excited by the
very same means.
Thus mankind having a temporal interest depending upon
themselves, and a prudent course of behavior being necessary to
secure it, passions inordinately excited, whether by means of
example, or by any other external circumstance, towards such
objects, at such times, or in such degrees, as that they cannot be
gratified consistently with worldly prudence, are temptations;
dangerous, and too often successful temptations, to forego a greater
temporal good for a less; i.e. to forego what is, upon the whole, our
temporal interest, for the sake of a present gratification. This is a
description of our state of trial in our temporal capacity. Substitute
now the word future for temporal, and virtue for prudence; and it
will be just as proper a description of our state of trial in our
religious capacity; so analogous are they to each other.[88]
If, from consideration of this our like state of trial in both
capacities, we go on to observe farther, how mankind behave under
it; we shall find there are some, who have so little sense of it, that
they scarce look beyond the passing day: they are so taken up with
present gratifications, as to have, in a manner, no feeling of
consequences, no regard to their future ease or fortune in this life:
any more than to their happiness in another. Some appear to be
blinded and deceived by inordinate passion, in their worldly
concerns, as much as in religion. Others are not deceived, but as it
were forcibly carried away by the like passions, against their better
judgment, and feeble resolutions too of acting better.[89] And there
are men, and truly not a few, who shamelessly avow, not their
interest, but their mere will and pleasure, to be their law of life: and
who, in open defiance of every thing reasonable, will go on in a
course of vicious extravagance, foreseeing, with no remorse and
little fear, that it will be their temporal ruin; and some of them,
under the apprehension of the consequences of wickedness in
another state. To speak in the most moderate way, human creatures
are not only continually liable to go wrong voluntarily, but we see
likewise that they often actually do so, with respect to their temporal
interests, as well as with respect to religion.
Thus our difficulties and dangers, or our trials in our temporal and
our religious capacity, as they proceed from the same causes, and
have the same effect upon men’s behavior, are evidently analogous,
and of the same kind.
It may be added, that the difficulties and dangers of miscarrying
in our religious state of trial, are greatly increased, and one is ready
to think, are in a manner wholly made, by the ill behavior of others;
by a wrong education, wrong in a moral sense, sometimes positively
vicious; by general bad example; by the dishonest artifices which are
got into business of all kinds; and, in very many parts of the world,
by religion’s being corrupted into superstitions, which indulge men in
their vices. In like manner, the difficulties of conducting ourselves
prudently in respect to our present interest, and our danger of being
led aside from pursuing it, are greatly increased, by a foolish
education; and, after we come to mature age, by the extravagance
and carelessness of others, with whom we have intercourse: and by
mistaken notions, very generally prevalent, and taken up from
common opinion, concerning temporal happiness, and wherein it
consists.
Persons, by their own negligence and folly in temporal affairs, no
less than by a course of vice, bring themselves into new difficulties,
and, by habits of indulgence, become less qualified to go through
them: and one irregularity after another, embarrasses things to such
a degree, that they know not whereabout they are; and often makes
the path of conduct so intricate and perplexed, that it is difficult to
trace it out; difficult even to determine what is the prudent or the
moral part. Thus, for instance, wrong behavior in one stage of life,
youth; wrong, I mean considering ourselves only in our temporal
capacity, without taking in religion; this, in several ways, increases
the difficulties of right behavior in mature age; i.e. puts us into a
more disadvantageous state of trial in our temporal capacity.
We are an inferior part of the creation of God. There are natural
appearances of our being in a state of degradation.[90] We certainly
are in a condition, which does not seem, by any means, the most
advantageous we could imagine or desire, either in our natural or
moral capacity, for securing either our present or future interest.
However, this condition, low, and careful, and uncertain as it is, does
not afford any just ground of complaint. For, as men may manage
their temporal affairs with prudence, and so pass their days here on
earth in tolerable ease and satisfaction, by a moderate degree of
care: so likewise with regard to religion, there is no more required
than what they are well able to do,[91] and what they must be
greatly wanting to themselves, if they neglect. And for persons to
have that put upon them, which they are well able to go through,
and no more, we naturally consider as an equitable thing; supposing
it done by proper authority. Nor have we any more reason to
complain of it, with regard to the Author of nature, than of his not
having given us advantages belonging to other orders of creatures.
[Remarks.] The thing here insisted upon is, that the state of trial,
which religion teaches us we are in, is rendered credible, by its being
throughout uniform and of a piece with the general conduct of
Providence towards us, in all other respects within the compass of
our knowledge. Indeed if mankind, considered in their natural
capacity, as inhabitants of this world only, found themselves, from
their birth to their death, in a settled state of security and happiness,
without any solicitude or thought of their own: or if they were in no
danger of being brought into inconveniences and distress, by
carelessness, or the folly of passion, through bad example, the
treachery of others, or the deceitful appearances of things: were this
our natural condition, then it might seem strange, and be some
presumption against the truth of religion, that it represents our
future and more general interest, as not secure of course, but as
depending upon our behavior, and requiring recollection and self-
government to obtain it. It then might be alleged, “What you say is
our condition, in one respect, is not in any wise of a sort with what
we find, by experience, is our condition in another. Our whole
present interest is secured to our hands, without any solicitude of
ours; and why should not our future interest, if we have any such,
be so too?” But since, on the contrary, thought and consideration,
the voluntary denying ourselves many things which we desire, and a
course of behavior, far from being always agreeable to us, are
absolutely necessary to our acting even a common decent, and
common prudent part, so as to pass with any satisfaction through
the present world, and be received upon any tolerable good terms in
it: since this is the case, all presumption against self-denial and
attention being necessary to secure our higher interest,[92] is
removed.
Had we not experience, it might, perhaps speciously, be urged,
that it is improbable any thing of hazard and danger should be put
upon us by an infinite being; when every thing which has hazard
and danger in our manner of conception, and will end in error,
confusion, and misery, is already certain in his foreknowledge.
Indeed, why any thing of hazard and danger should be put upon
such frail creatures as we are, may well be thought a difficulty in
speculation; and cannot but be so, till we know the whole, or at
least much more of the case. But still the constitution of nature is as
it is. Our happiness and misery are trusted to our conduct, and
made to depend upon it. Somewhat, and, in many circumstances, a
great deal too, is put upon us, either to do, or to suffer, as we
choose. All the various miseries of life, which people bring upon
themselves by negligence and folly, and might have avoided by
proper care, are instances of this: which miseries are, beforehand,
just as contingent and undetermined as conduct, and left to be
determined by it.
These observations are an answer[93] to the objections against
the credibility of a state of trial, as implying temptations, and real
danger of miscarrying with regard to our general interest, under the
moral government of God. And they show, that, if we are at all to be
considered in such a capacity, and as having such an interest, the
general analogy of Providence must lead us to apprehend ourselves
in danger of miscarrying, in different degrees, as to this interest, by
our neglecting to act the proper part belonging to us in that capacity.
For we have a present interest under the government of God, which
we experience here upon earth. This interest, as it is not forced
upon us, so neither is it offered to our acceptance, but to our
acquisition; and in such manner, as that we are in danger of missing
it, by means of temptations to neglect, or act contrary to it; and
without attention and self-denial, we must and do miss it. It is then
perfectly credible, that this may be our case, with respect to that
chief and final good, which religion proposes to us.

CHAPTER V.
PROBATION, AS INTENDED FOR MORAL DISCIPLINE AND
IMPROVEMENT.

From the consideration of our being in a probation-state, of so


much difficulty and hazard, naturally arises the question, how we
came to be placed in it? But such a general inquiry as this would be
found involved in insuperable difficulties. For, though some of these
difficulties would be lessened, by observing that all wickedness is
voluntary, as is implied in its very notion; and that many of the
miseries of life have apparent good effects: yet, when we consider
other circumstances belonging to both, and what must be the
consequence of the former in a life to come, it cannot but be
acknowledged plain folly and presumption, to pretend to give an
account of the whole reasons of this matter; the whole reasons of
our being allotted a condition, out of which so much wickedness and
misery, so circumstanced, would in fact arise. Whether it be not
beyond our faculties, not only to find out, but even to understand;
or, though we should be supposed capable of understanding it, yet,
whether it would be of service or prejudice to us to be informed of
it, is impossible to say. But as our present condition can in no wise
be shown to be inconsistent with the perfect moral government of
God: so religion teaches us we were placed in it, that we might
qualify ourselves, by the practice of virtue, for another state which is
to follow it. This, though but a partial answer, a very partial one
indeed, to the inquiry now mentioned; is yet a more satisfactory
answer to another, which is of real, and of the utmost importance to
us to have answered,—viz.: What is our business here? The known
end then, why we are placed in a state of so much affliction, hazard,
and difficulty, is, our improvement in virtue and piety, as the
requisite qualification for a future state of security and happiness.
The beginning of life, considered as an education for mature age
in the present world, appears plainly, at first sight, analogous to this
our trial for a future one: the former being in our temporal capacity,
what the latter is in our religious capacity. Some observations
common to both, and a more distinct consideration of each, will
more distinctly show the extent and force of the analogy between
them; and the credibility, which arises from hence, as well as from
the nature of the thing, that the present life was intended to be a
state of discipline for a future one.
I. Every species of creatures is, we see, designed for a particular
way of life; to which, the nature, the capacities, temper, and
qualifications, of each species, are as necessary as their external
circumstances. Both come into the notion of such state, or particular
way of life, and are constituent parts of it. Change a man’s capacities
or character, to the degree in which it is conceivable they may be
changed, and he would be altogether incapable of a human course
of life, and human happiness; as incapable, as if, his nature
continuing unchanged, he were placed in a world, where he had no
sphere of action, nor any objects to answer his appetites, passions,
and affections of any sort. One thing is set over against another, as
an ancient writer expresses it.[94] Our nature corresponds to our
external condition. Without this correspondence, there would be no
possibility of any such thing as human life and happiness: which life
and happiness are, therefore, a result from our nature and condition
jointly: meaning by human life, not living in the literal sense, but the
whole complex notion commonly understood by those words. So
that without determining what will be the employment and
happiness, the particular life, of good men hereafter; there must be
some determinate capacities, some necessary character and
qualifications, without which persons cannot but be utterly incapable
of it: in like manner, as there must be some, without which men
would be incapable of their present state of life.
II. The constitution of human creatures, and indeed of all
creatures which come under our notice, is such, as that they are
capable of naturally becoming qualified for states of life, for which
they were once wholly unqualified. In imagination we may indeed
conceive of creatures, incapable of having any of their faculties
naturally enlarged, or as being unable naturally to acquire any new
qualifications. But the faculties of every species known to us, are
made for enlargement; for acquirements of experience and habits.
We find ourselves, in particular, endued with capacities, not only of
perceiving ideas, and of knowledge or perceiving truth, but also of
storing up ideas and knowledge by memory. We are capable, not
only of acting, and of having different momentary impressions made
upon us; but of getting a new facility in any kind of action, and of
settled alterations in our temper or character. The power of the two
last is the power of habits. But neither the perception of ideas, nor
knowledge of any sort, are habits; though absolutely necessary to
the forming of them. However, apprehension, reason, memory,
which are the capacities of acquiring knowledge, are greatly
improved by exercise. Whether the word habit is applicable to all
these improvements, and in particular how far the powers of
memory and of habits may be powers of the same nature, I shall not
inquire. But that perceptions come into our minds readily and of
course, by means of their having been there before, seems a thing
of the same sort, as readiness in any particular kind of action,
proceeding from being accustomed to it. Aptness to recollect
practical observations, of service in our conduct, is plainly habit in
many cases. There are habits of perception, and habits of action. An
instance of the former, is our constant and even involuntary
readiness, in correcting the impressions of our sight concerning
magnitudes and distances, so as to substitute judgment in the room
of sensation, imperceptibly to ourselves. It seems as if all other
associations of ideas not naturally connected, might be called
passive habits; as properly as our readiness in understanding
languages upon sight, or hearing of words. Our readiness in
speaking and writing them, are instances of active habits.
For distinctness, we may consider habits, as belonging to the
body, or to the mind: and the latter will be explained by the former.
Under the former are comprehended all bodily activities or motions,
whether graceful or unbecoming, which are owing to use: under the
latter, general habits of life and conduct; such as those of obedience
and submission to authority, or to any particular person; those of
veracity, justice, and charity; those of attention, industry, self-
government, envy, revenge. Habits of this latter kind seem produced
by repeated acts, as well as the former. And as habits belonging to
the body are produced by external acts, so habits of the mind are
produced by the exertion of inward practical principles; i.e. by
carrying them into act, or acting upon them; the principles of
obedience, of veracity, justice, and charity. Nor can those habits be
formed by any external course of action, otherwise than as it
proceeds from these principles: because it is only these inward
principles exerted, which are strictly acts of obedience, of veracity, of
justice, and of charity.
So likewise habits of attention, industry, self-government, are in
the same manner acquired by exercise; and habits of envy and
revenge by indulgence, whether in outward act, or in thought and
intention; i.e. inward act: for such intention is an act. Resolutions to
do well, are also properly acts. And endeavoring to enforce upon our
own minds a practical sense of virtue, or to beget in others that
practical sense of it, which a man really has himself, is a virtuous
act. All these, therefore, may and will contribute towards forming
good habits. But going over the theory of virtue in one’s thoughts,
talking well, and drawing fine pictures, of it; this is so far from
necessarily or certainly conducing to form a habit of it, in him who
thus employs himself, that it may harden the mind in a contrary
course, and render it gradually more insensible; i.e. form a habit of
insensibility to all moral considerations. For, from our very faculty of
habits, passive impressions, by being repeated, grow weaker.
Thoughts, by often passing through the mind, are felt less sensibly:
being accustomed to danger, begets intrepidity, i.e. lessens fear; to
distress, lessens the passion of pity; to instances of others’ mortality,
lessens the sensible apprehension of our own.
From these two observations together, that practical habits are
formed and strengthened by repeated acts, and that passive
impressions grow weaker by being repeated upon us, it must follow,
that active habits may be gradually forming and strengthening, by a
course of acting upon such and such motives and excitements, while
these motives and excitements themselves are, by proportionable
degrees, growing less sensible; i.e. are continually less and less
sensibly felt, even as the active habits strengthen. And experience
confirms this: for active principles, at the very time that they are less
lively in perception than they were, are found to be, somehow,
wrought more thoroughly into the temper and character, and
become more effectual in influencing our practice. The three things
just mentioned may afford instances of it. Perception of danger is a
natural excitement of passive fear, and active caution: and by being
inured to danger, habits of the latter are gradually wrought, at the
same time that the former gradually lessens. Perception of distress
in others is a natural excitement, passively to pity, and actively to
relieve it: but let a man set himself to attend to, inquire out, and
relieve distressed persons, and he cannot but grow less and less
sensibly affected with the various miseries of life, with which he
must become acquainted; when yet, at the same time, benevolence,
considered not as a passion, but as a practical principle of action,
will strengthen: and while he passively compassionates the
distressed less, he will acquire a greater aptitude actively to assist
and befriend them. So also at the same time that the daily instances
of men’s dying around us give us daily a less sensible passive feeling
or apprehension of our own mortality, such instances greatly
contribute to the strengthening a practical regard to it in serious
men; i.e. to forming a habit of acting with a constant view to it.
This seems further to show, that passive impressions made upon
our minds by admonition, experience, or example, though they may
have a remote efficacy, and a very great one, towards forming active
habits, yet can have this efficacy no otherwise than by inducing us
to such a course of action: and that it is not being affected so and
so, but acting, which forms those habits: only it must be always
remembered, that real endeavors to enforce good impressions upon
ourselves are a species of virtuous action. Nor do we know how far it
is possible, in the nature of things, that effects should be wrought in
us at once, equivalent to habits; i.e. what is wrought by use and
exercise. The thing insisted on is, not what may be possible, but
what is in fact the appointment of nature: which is, that active habits
are to be formed by exercise. Their progress may be so gradual, as
to be imperceptible in its steps: it may be hard to explain the faculty,
by which we are capable of habits, throughout its several parts; and
to trace it up to its original, so as to distinguish it from all others in
our mind: and it seems as if contrary effects were to be ascribed to
it. But the thing in general, that our nature is formed to yield to use
and exercise, in some such manner as this, is matter of certain
experience.
Thus, by accustoming ourselves to any course of action, we get an
aptness to go on, a facility, readiness, and often pleasure, in it. The
inclinations which rendered us averse to it, grow weaker; the
difficulties in it, not only the imaginary but the real ones, lessen; the
reasons for it offer themselves of course to our thoughts upon all
occasions; and the least glimpse of them is sufficient to make us go
on, in a course of action, to which we have been accustomed.
Practical principles appear to grow stronger, absolutely in
themselves, by exercise; as well as relatively, with regard to contrary
principles; which, by being accustomed to submit, do so habitually,
and of course. Thus a new character, in several respects, may be
formed; and many habitudes of life, not given by nature, but which
nature directs us to acquire.
III. Indeed we may be assured, that we should never have had
these capacities of improving by experience, acquired knowledge,
and habits, had they not been necessary, and intended to be made
use of. And accordingly we find them so necessary, and so much
intended, that without them we should be utterly incapable of that
which was the end for which we were made, considered in our
temporal capacity only: the employments and satisfactions of our
mature state of life.
Nature does in no wise qualify us wholly, much less at once, for
this mature state of life. Even maturity of understanding, and bodily
strength, not only are arrived at gradually, but are also very much
owing to the continued exercise of our powers of body and mind
from infancy. If we suppose a person brought into the world with
both these in maturity, as far as this is conceivable, he would plainly
at first be as unqualified for the human life of mature age, as an
idiot. He would be in a manner distracted, with astonishment, and
apprehension, and curiosity, and suspense: nor can one guess, how
long it would be, before he would be familiarized to himself and the
objects about him, enough even to set himself to any thing. It may
be questioned too, whether the natural information of his sight and
hearing would be of any manner of use to him in acting, before
experience. And it seems, that men would be strangely headstrong
and self-willed, and disposed to exert themselves with an
impetuosity, which would render society insupportable, and the living
in it impracticable, were it not for some acquired moderation and
self-government, some aptitude and readiness in restraining
themselves, and concealing their sense of things. Want of every
thing of this kind which is learnt would render a man as incapable of
society, as want of language would; or as his natural ignorance of
any of the particular employments of life would render him incapable
of providing himself with the common conveniences, or supplying
the necessary wants of it. In these respects, and probably in many
more of which we have no particular notion, mankind is left by
nature, an unformed, unfinished creature; utterly deficient and
unqualified, before the acquirement of knowledge, experience, and
habits, for that mature state of life, which was the end of his
creation, considering him as related only to this world.
But, as nature has endued us with a power of supplying those
deficiencies, by acquired knowledge, experience, and habits; so
likewise we are placed in a condition, in infancy, childhood, and
youth, fitted for it; fitted for our acquiring those qualifications of all
sorts, which we stand in need of in mature age. Hence children,
from their very birth, are daily growing acquainted with the objects
about them, with the scene in which they are placed, and to have a
future part; and learning something or other, necessary to the
performance of it. The subordinations, to which they are accustomed
in domestic life, teach them self-government in common behavior
abroad, and prepare them for subjection and obedience to civil
authority.[95] What passes before their eyes, and daily happens to
them, gives them experience, caution against treachery and deceit,
together with numberless little rules of action and conduct, which we
could not live without; and which are learnt so insensibly and so
perfectly, as to be mistaken perhaps for instinct, though they are the
effect of long experience and exercise; as much so as language, or
knowledge in particular business, or the qualifications and behavior
belonging to the several ranks and professions. Thus the beginning
of our days is adapted to be, and is, a state of education in the
theory and practice of mature life. We are much assisted in it by
example, instruction, and the care of others; but a great deal is left
to ourselves to do. And of this, as part is done easily and of course;
so part requires diligence and care, the voluntary foregoing many
things which we desire, and setting ourselves to what we should
have no inclination to, but for the necessity or expedience of it. For
that labor and industry, which the station of so many absolutely
requires, they would be greatly unqualified for, in maturity, as those
in other stations would be for any other sorts of application; if both
were not accustomed to them in their youth. And, according as
persons behave themselves, in the general education which all go
through, and in the particular ones adapted to particular
employments, their character is formed,[96] and made to appear;
they recommend themselves more or less; and are capable of, and
placed in, different stations in society.
The former part of life, then, is to be considered as an important
opportunity, which nature puts into our hands; and which, when lost
is not to be recovered. And our being placed in a state of discipline
throughout this life, for another world, is a providential disposition of
things, exactly of the same kind, as our being placed in a state of
discipline during childhood, for mature age. Our condition in both
respects is uniform and of a piece, and comprehended under one
and the same general law of nature.
If we were not able at all to discern, how or in what way the
present life could be our preparation for another; this would be no
objection against the credibility of its being so. We do not discern,
how food and sleep contribute to the growth of the body; nor could
have any thought that they would, before we had experience. Nor
do children at all think, on the one hand, that the sports and
exercises, to which they are so much addicted, contribute to their
health and growth; nor, on the other, of the necessity which there is
for their being restrained in them. Nor are they capable of
understanding the use of many parts of discipline, which
nevertheless they must be made to go through, in order to qualify
them for the business of mature age. Were we not able then to
discover, in what respects the present life could form us for a future
one; yet nothing would be more supposable than that it might, in
some respects or other, from the general analogy of Providence. And
this, for aught I see, might reasonably be said, even though we
should not take in the consideration of God’s moral government over
the world. But,
IV. Take in this consideration, and consequently, that the character
of virtue and piety is a necessary qualification for the future state,
and then we may distinctly see, how, and in what respects, the
present life may be a preparation for it; since we want, and are
capable of, improvement in that character, by moral and religious
habits; and the present life is fit to be a state of discipline for such
improvement: in like manner as we have already observed, how, and
in what respects, infancy, childhood, and youth, are a necessary
preparation, and a natural state of discipline, for mature age.
Nothing which we at present see, would lead us to the thought of
a solitary inactive state hereafter. If we judge at all from the analogy
of nature, we must suppose, according to the Scripture account of it,
that it will be a community. And there is no shadow of any thing
unreasonable in conceiving, though there be no analogy for it, that
this community will be, as the Scripture represents it, under the
more immediate, or, if such an expression may be used, the more
sensible government of God. Nor is our ignorance, what will be the
employments of this happy community, nor our consequent
ignorance, what particular scope or occasion there will be for the
exercise of veracity, justice, and charity, among the members of it
with regard to each other, any proof, that there will be no sphere of
exercise for those virtues. Much less, if that were possible, is our
ignorance any proof, that there will be no occasion for that frame of
mind, or character, which is formed by the daily practice of those
particular virtues here, and which is a result from it.[97] This at least
must be owned in general, that, as the government established in
the universe is moral, the character of virtue and piety must, in
some way or other, be the condition of our happiness or the
qualification for it.
From what is above observed, concerning our natural power of
habits, it is easy to see, that we are capable of moral improvement
by discipline. And how greatly we want it, need not be proved to any
one who is acquainted with the great wickedness of mankind; or
even with those imperfections, which the best are conscious of. But
it is not perhaps distinctly attended to by every one, that the
occasion which human creatures have for discipline, to improve in
them this character of virtue and piety, is to be traced up higher
than to excess in the passions, by indulgence and habits of vice.
Mankind, and perhaps all finite creatures, from the very constitution
of their nature, before habits of virtue, are deficient, and in danger
of deviating from what is right; and therefore stand in need of
virtuous habits, for a security against this danger. For, together with
the general principle of moral understanding, we have in our inward
frame various affections towards particular external objects. These
affections are naturally, and of right, subject to the government of
the moral principle, as to the occasions upon which they may be
gratified; as to the times, degrees, and manner, in which the objects
of them may be pursued. But the principle of virtue can neither
excite them, nor prevent their being excited. On the contrary, they
are naturally felt, when the objects of them are present to the mind,
not only before all consideration whether they can be obtained by
lawful means, but after it is found they cannot. The natural objects
of affection continue so; the necessaries, conveniences, and
pleasures of life, remain naturally desirable, though they cannot be
obtained innocently: nay, though they cannot possibly be obtained at
all. And when the objects of any affection whatever cannot be
obtained without unlawful means; but may be obtained by them:
such affection, though its being excited, and its continuing some
time in the mind, be as innocent as it is natural and necessary, yet
cannot but be conceived to have a tendency to incline persons to
venture upon such unlawful means: and therefore must be
conceived as putting them in some danger of it. Now what is the
general security against this danger, against their actually deviating
from right? As the danger is, so also must the security be, from
within: from the practical principle of virtue.[98] The strengthening or
improving this principle, considered as practical, or as a principle of
action, will lessen the danger, or increase the security against it. And
this moral principle is capable of improvement, by proper discipline
and exercise: by recollecting the practical impressions which
example and experience have made upon us: and, instead of
following humor and mere inclination, by continually attending to the
equity and right of the case, in whatever we are engaged, be it in
greater or less matters; and accustoming ourselves always to act
upon it, as being itself the just and natural motive of action; and as
this moral course of behavior must necessarily, under the divine
government, be our final interest. Thus the principle of virtue,
improved into a habit, of which improvement we are thus capable,
will plainly be, in proportion to the strength of it, a security against
the danger which finite creatures are in, from the very nature of
propension, or particular affections. This way of putting the matter,
supposes particular affections to remain in a future state; which it is
scarce possible to avoid supposing. And if they do; we clearly see,
that acquired habits of virtue and self-government may be necessary
for the regulation of them. However, though we were not distinctly
to take in this supposition, but to speak only in general; the thing
really comes to the same. For habits of virtue, thus acquired by
discipline, are improvement in virtue: and improvement in virtue
must be advancement in happiness, if the government of the
universe be moral.
From these things we may observe, (and it will further show this
our natural and original need of being improved by discipline,) how it
comes to pass, that creatures made upright, fall; and how those who
preserve their uprightness, raise themselves by so doing, to a more
secure state of virtue. To say that the former is accounted for by the
nature of liberty, is to say no more, than that an event’s actually
happening is accounted for by a mere possibility of its happening.
But it seems distinctly conceivable from the very nature of particular
affections or propensions. For, suppose creatures intended for such a
particular state of life, for which such propensions were necessary:
suppose them endued with such propensions, together with moral
understanding, as well including a practical sense of virtue as a
speculative perception of it; and that all these several principles,
both natural and moral, forming an inward constitution of mind,
were in the most exact proportion possible; i.e. in a proportion the
most exactly adapted to their intended state of life; such creatures
would be made upright, or finitely perfect. Now particular
propensions, from their very nature, must be felt, the objects of
them being present; though they cannot be gratified at all, or not
with the allowance of the moral principle. If they can be gratified
without its allowance, or by contradicting it, then they must be
conceived to have some tendency, in how low a degree soever, yet
some tendency, to induce persons to such forbidden gratification.
This tendency, in some one particular propension, may be increased,
by the greater frequency of occasions naturally exciting it, than of
occasions exciting others. The least voluntary indulgence in
forbidden circumstances,[99] though but in thought, will increase this
wrong tendency; and may increase it further, till, peculiar
conjunctures perhaps conspiring, it becomes effect; and danger of
deviating from right, ends in actual deviation from it; a danger
necessarily arising from the very nature of propension, and which
therefore could not have been prevented, though it might have been
escaped, or got innocently through. The case would be, as if we
were to suppose a straight path marked out for a person, in which a
certain degree of attention would keep him steady: but if he would
not attend, in this degree, any one of a thousand objects, catching
his eye, might lead him out of it.
Now it is impossible to say, how much even the first full overt act
of irregularity might disorder the inward constitution; unsettle the
adjustments, and alter the proportions, which formed it, and in
which the uprightness of its make consisted: but repetition of
irregularities would produce habits. Thus the constitution would be
spoiled; and creatures made upright, become corrupt and depraved
in their settled character, proportionably to their repeated
irregularities in occasional acts,[100] On the contrary, these creatures
might have improved and raised themselves, to a higher and more
secure state of virtue, by the contrary behavior: by steadily following
the moral principle, supposed to be one part of their nature: and
thus withstanding that unavoidable danger of defection, which
necessarily arose from propension, the other part of it. For, by thus
preserving their integrity for some time, their danger would lessen;
since propensions, by being inured to submit, would do it more
easily and of course: and their security against this lessening danger
would increase; since the moral principle would gain additional
strength by exercise: both which things are implied in the notion of
virtuous habits.
Thus vicious indulgence is not only criminal in itself, but also
depraves the inward constitution and character. And virtuous self-
government is not only right in itself, but also improves the inward
constitution or character: and may improve it to such a degree, that
though we should suppose it impossible for particular affections to
be absolutely coincident with the moral principle; and consequently
should allow, that such creatures as have been above supposed,
would forever remain defectible, yet their danger of actually
deviating from right may be almost infinitely lessened, and they fully
fortified against what remains of it; if that may be called danger,
against which there is an adequate, effectual security. Still, this their
higher perfection may continue to consist in habits of virtue formed
in a state of discipline, and this their more complete security remain
to proceed from them.
Thus it is plainly conceivable, that creatures without blemish, as
they came out of the hands of God, may be in danger of going
wrong; and so may stand in need of the security of virtuous habits,
additional to the moral principle wrought into their natures by him.
That which is the ground of their danger, or their want of security,
maybe considered as a deficiency in themselves, to which virtuous
habits are the natural supply. And as they are naturally capable of
being raised and improved by discipline, it may be a thing fit and
requisite, that they should be placed in circumstances with an eye to
it: in circumstances peculiarly fitted to be to them a state of
discipline for their improvement in virtue.
But how much more strongly must this hold with respect to those
who have corrupted their natures, are fallen from their original
rectitude, and whose passions are become excessive by repeated
violations of their inward constitution! Upright creatures may want to
be improved: depraved creatures want to be renewed. Education
and discipline, which may be in all degrees and sorts of gentleness
and of severity, are expedient for those: but must be absolutely
necessary for these. For these, discipline of the severer sort too, and
in the higher degrees of it, must be necessary, in order to wear out
vicious habits; to recover their primitive strength of self-government,
which indulgence must have weakened; to repair, as well as raise
into a habit, the moral principle, in order to their arriving at a secure
state of virtuous happiness.
Whoever will consider the thing, may clearly see that the present
world is peculiarly fit to be a state of discipline for this purpose, to
such as will set themselves to mend and improve. For, the various
temptations with which we are surrounded; our experience of the
deceits of wickedness; having been in many instances led wrong
ourselves; the great viciousness of the world; the infinite disorders
consequent upon it; our being made acquainted with pain and
sorrow, either from our own feeling of it, or from the sight of it in
others; these things, though some of them may indeed produce
wrong effects upon our minds, yet when duly reflected upon, have,
all of them, a direct tendency to bring us to a settled moderation
and reasonableness of temper: the contrary both to thoughtless
levity, and also to that unrestrained self-will, and violent bent to
follow present inclination, which may be observed in undisciplined
minds.
Such experience, as the present state affords, of the frailty of our
nature; of the boundless extravagance of ungoverned passion; of
the power which an infinite being has over us, by the various
capacities of misery which he has given us; in short, that kind and
degree of experience, which the present state affords us, that the
constitution of nature is such as to admit the possibility, the danger,
and the actual event, or creatures losing their innocence and
happiness, and becoming vicious and wretched; has a tendency to
give us a practical sense of things very different from a mere
speculative knowledge, that we are liable to vice, and capable of
misery. And who knows, whether the security of creatures in the
highest and most settled state of perfection, may not in part arise,
from their having had such a sense of things as this, formed, and
habitually fixed within them, in some state of probation. And passing
through the present world with that moral attention, which is
necessary to the acting a right part in it, may leave everlasting
impressions of this sort upon our minds.
To be a little more distinct: allurements to what is wrong,
difficulties in the discharge of our duty, our not being able to act a
uniform right part without some thought and care, and the
opportunities which we have, or imagine we have, of avoiding what
we dislike or obtaining what we desire, by unlawful means, when we
either cannot do it at all, or at least not so easily, by lawful ones,
these things, i.e. the snares and temptations of vice, are what
render the present world peculiarly fit to be a state of discipline, to
those who will preserve their integrity: because they render being
upon our guard, resolution, and the denial of our passions,
necessary in order to that end. The exercise of such particular
recollection, intention of mind, and self-government, in the practice
of virtue, has, from the make of our nature, a peculiar tendency to
form habits of virtue; as implying, not only a real, but also a more
continued, and a more intense exercise of the virtuous principle, or a
more constant and a stronger effort of virtue exerted into act. Thus
suppose a person to know himself to be in particular danger, for
some time, of doing any thing wrong, which yet he fully resolves not
to do; continued recollection and keeping upon his guard, in order to
make good his resolution, is a continued exerting of that act of
virtue in a high degree, which need have been, and perhaps would
have been, only instantaneous and weak, had the temptation been
so.
It is indeed ridiculous to assert, that self-denial is essential to
virtue and piety:[101] but it would have been nearer the truth,
though not strictly the truth itself, to have said, that it is essential to
discipline and improvement. For though actions materially virtuous,
which have no sort of difficulty, but are perfectly agreeable to our
particular inclinations, may possibly be done only from these
particular inclinations, and so may not be any exercise of the
principle of virtue, i.e. not be virtuous actions at all; yet, on the
contrary, they may be an exercise of that principle: and when they
are, they have a tendency to form and fix the habit of virtue. But
when the exercise of the virtuous principle is more continued,
oftener repeated, and more intense; as it must be in circumstances
of danger, temptation, and difficulty, of any kind and in any degree;
this tendency is increased proportionably, and a more confirmed
habit is the consequence.
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookultra.com

You might also like