Principles of Concurrent and Distributed Programming
53%
off

Principles of Concurrent and Distributed Programming

3.5 (36 ratings by Goodreads)
By (author) 

Free delivery worldwide

Available. Dispatched from the UK in 2 business days
When will my order arrive?

Description

Principles of Concurrent and Distributed Programming provides an introduction to concurrent programming focusing on general principles and not on specific systems. Software today is inherently concurrent or distributed  from event-based GUI designs to operating and real-time systems to Internet applications. The new edition of this classic introduction to concurrency has been completely revised in view of the growing importance of concurrency constructs embedded in programming languages and of formal methods such as model checking that are widely used in industry.show more

Product details

  • Paperback | 384 pages
  • 170 x 232 x 22mm | 639.58g
  • Pearson Education (US)
  • Addison-Wesley Educational Publishers Inc
  • New Jersey, United States
  • English
  • 2nd edition
  • 032131283X
  • 9780321312839
  • 161,583

About M. Ben-Ari

Mordechai (Moti) Ben-Ari is an Associate Professor in the Department of Science Teaching at the Weizmann Institute of Science in Rehovot, Israel. He is the author of texts on Ada, concurrent programming, programming languages, and mathematical logic, as well as Just a Theory: Exploring the Nature of Science. In 2004 he was honored with the ACM/SIGCSE Award for Outstanding Contribution to Computer Science Education.show more

Back cover copy

Final Cover Copy - Ben-Ari Principles of Concurrent and Distributed Programming 2nd Edition M. Ben-Ari The latest edition of a classic text from a winner of the ACM/SIGCSE Award for Outstanding Contribution to Computer Science Education. Software today is inherently concurrent or distributed - from event-based GUI designs to operating and real-time systems to Internet applications. The new edition of this classic introduction to concurrency has been completely revised in view of the growing importance of concurrency constructs embedded in programming languages and of formal methods such as model checking that are widely used in industry. The 2nd edition: O Focuses on algorithmic principles rather than language syntax; O Emphasizes the use of the Spin model checker for modeling concurrent systems and verifying program correctness; O Explains the implementation of concurrency in the Java and Ada languages. O Facilitates lab work with software tools for learning concurrent and distributed programming. Check out the companion website for the book at www.pearson.co.uk/ben-ari to find additional resources for both students and instructors, including source code in various languages for the programs in the book, answers to the exercises, and slides for all diagrams, algorithms and programs. About the Author Mordechai (Moti) Ben-Ari is an Associate Professor in the Department of Science Teaching at the Weizmann Institute of Science in Rehovot, Israel. He is the author of texts on Ada, concurrent programming, programming languages, and mathematical logic, as well as Just a Theory: Exploring the Nature of Science. In 2004 he was honored with the ACM/SIGCSE Award for Outstanding Contribution to Computer Science Education.show more

Table of contents

Contents Preface xi 1 What is Concurrent Programming? 11.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.2 Concurrency as abstract parallelism . . . . . . . . . . . . . . . . 21.3 Multitasking . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.4 The terminology of concurrency . . . . . . . . . . . . . . . . . 41.5 Multiple computers . . . . . . . . . . . . . . . . . . . . . . . . 51.6 The challenge of concurrent programming . . . . . . . . . . . . 5 2 The Concurrent Programming Abstraction 72.1 The role of abstraction . . . . . . . . . . . . . . . . . . . . . . . 72.2 Concurrent execution as interleaving of atomic statements . . . . 82.3 Justification of the abstraction . . . . . . . . . . . . . . . . . . . 132.4 Arbitrary interleaving . . . . . . . . . . . . . . . . . . . . . . . 172.5 Atomic statements . . . . . . . . . . . . . . . . . . . . . . . . . 192.6 Correctness . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212.7 Fairness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232.8 Machine-code instructions . . . . . . . . . . . . . . . . . . . . . 242.9 Volatile and non-atomic variables . . . . . . . . . . . . . . . . . 282.10 The BACI concurrency simulator . . . . . . . . . . . . . . . . . 292.11 Concurrency in Ada . . . . . . . . . . . . . . . . . . . . . . . . 312.12 Concurrency in Java . . . . . . . . . . . . . . . . . . . . . . . . 342.13 Writing concurrent programs in Promela . . . . . . . . . . . . . 362.14 Supplement: the state diagram for the frog puzzle . . . . . . . . 37 3 The Critical Section Problem 453.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453.2 The definition of the problem . . . . . . . . . . . . . . . . . . . 453.3 First attempt . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483.4 Proving correctness with state diagrams . . . . . . . . . . . . . . 493.5 Correctness of the first attempt . . . . . . . . . . . . . . . . . . 533.6 Second attempt . . . . . . . . . . . . . . . . . . . . . . . . . . . 553.7 Third attempt . . . . . . . . . . . . . . . . . . . . . . . . . . . 573.8 Fourth attempt . . . . . . . . . . . . . . . . . . . . . . . . . . . 583.9 Dekker's algorithm . . . . . . . . . . . . . . . . . . . . . . . . 603.10 Complex atomic statements . . . . . . . . . . . . . . . . . . . . 61 4 Verification of Concurrent Programs 674.1 Logical specification of correctness properties . . . . . . . . . . 684.2 Inductive proofs of invariants . . . . . . . . . . . . . . . . . . . 694.3 Basic concepts of temporal logic . . . . . . . . . . . . . . . . . 724.4 Advanced concepts of temporal logic . . . . . . . . . . . . . . . 754.5 A deductive proof of Dekker's algorithm . . . . . . . . . . . . . 794.6 Model checking . . . . . . . . . . . . . . . . . . . . . . . . . . 834.7 Spin and the Promela modeling language . . . . . . . . . . . . . 834.8 Correctness specifications in Spin . . . . . . . . . . . . . . . . . 864.9 Choosing a verification technique . . . . . . . . . . . . . . . . . 88 5 Advanced Algorithms for the Critical Section Problem 935.1 The bakery algorithm . . . . . . . . . . . . . . . . . . . . . . . 935.2 The bakery algorithm for N processes . . . . . . . . . . . . . . 955.3 Less restrictive models of concurrency . . . . . . . . . . . . . . 965.4 Fast algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . . 975.5 Implementations in Promela . . . . . . . . . . . . . . . . . . . . 104 6 Semaphores 1076.1 Process states . . . . . . . . . . . . . . . . . . . . . . . . . . . 1076.2 Definition of the semaphore type . . . . . . . . . . . . . . . . . 1096.3 The critical section problem for two processes . . . . . . . . . . 1106.4 Semaphore invariants . . . . . . . . . . . . . . . . . . . . . . . 1126.5 The critical section problem for N processes . . . . . . . . . . . 1136.6 Order of execution problems . . . . . . . . . . . . . . . . . . . 1146.7 The producer-consumer problem . . . . . . . . . . . . . . . . . 1156.8 Definitions of semaphores . . . . . . . . . . . . . . . . . . . . . 1196.9 The problem of the dining philosophers . . . . . . . . . . . . . . 1226.10 Barz's simulation of general semaphores . . . . . . . . . . . . . 1266.11 Udding's starvation-free algorithm . . . . . . . . . . . . . . . . 1296.12 Semaphores in BACI . . . . . . . . . . . . . . . . . . . . . . . 1316.13 Semaphores in Ada . . . . . . . . . . . . . . . . . . . . . . . . 1326.14 Semaphores in Java . . . . . . . . . . . . . . . . . . . . . . . . 1336.15 Semaphores in Promela . . . . . . . . . . . . . . . . . . . . . . 134 7 Monitors 1457.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1457.2 Declaring and using monitors . . . . . . . . . . . . . . . . . . . 1467.3 Condition variables . . . . . . . . . . . . . . . . . . . . . . . . 1477.4 The producer-consumer problem . . . . . . . . . . . . . . . . . 1517.5 The immediate resumption requirement . . . . . . . . . . . . . . 1527.6 The problem of the readers and writers . . . . . . . . . . . . . . 1547.7 Correctness of the readers and writers algorithm . . . . . . . . . 1577.8 A monitor solution for the dining philosophers . . . . . . . . . . 1607.9 Monitors in BACI . . . . . . . . . . . . . . . . . . . . . . . . . 1627.10 Protected objects . . . . . . . . . . . . . . . . . . . . . . . . . . 1627.11 Monitors in Java . . . . . . . . . . . . . . . . . . . . . . . . . . 1677.12 Simulating monitors in Promela . . . . . . . . . . . . . . . . . . 173 8 Channels 1798.1 Models for communications . . . . . . . . . . . . . . . . . . . . 1798.2 Channels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1818.3 Parallel matrix multiplication . . . . . . . . . . . . . . . . . . . 1838.4 The dining philosophers with channels . . . . . . . . . . . . . . 1878.5 Channels in Promela . . . . . . . . . . . . . . . . . . . . . . . . 1888.6 Rendezvous . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1908.7 Remote procedure calls . . . . . . . . . . . . . . . . . . . . . . 193 9 Spaces 1979.1 The Linda model . . . . . . . . . . . . . . . . . . . . . . . . . . 1979.2 Expressiveness of the Linda model . . . . . . . . . . . . . . . . 1999.3 Formal parameters . . . . . . . . . . . . . . . . . . . . . . . . . 2009.4 The master-worker paradigm . . . . . . . . . . . . . . . . . . . 2029.5 Implementations of spaces . . . . . . . . . . . . . . . . . . . . . 204 10 Distributed Algorithms 21110.1 The distributed systems model . . . . . . . . . . . . . . . . . . 21110.2 Implementations . . . . . . . . . . . . . . . . . . . . . . . . . . 21510.3 Distributed mutual exclusion . . . . . . . . . . . . . . . . . . . 21610.4 Correctness of the Ricart-Agrawala algorithm . . . . . . . . . . 22310.5 The RA algorithm in Promela . . . . . . . . . . . . . . . . . . . 22510.6 Token-passing algorithms . . . . . . . . . . . . . . . . . . . . . 22710.7 Tokens in virtual trees . . . . . . . . . . . . . . . . . . . . . . . 230 11 Global Properties 23711.1 Distributed termination . . . . . . . . . . . . . . . . . . . . . . 23711.2 The Dijkstra-Scholten algorithm . . . . . . . . . . . . . . . . . 24311.3 Credit-recovery algorithms . . . . . . . . . . . . . . . . . . . . 24811.4 Snapshots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250 12 Consensus 25712.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25712.2 The problem statement . . . . . . . . . . . . . . . . . . . . . . 25812.3 A one-round algorithm . . . . . . . . . . . . . . . . . . . . . . 26012.4 The Byzantine Generals algorithm . . . . . . . . . . . . . . . . 26112.5 Crash failures . . . . . . . . . . . . . . . . . . . . . . . . . . . 26312.6 Knowledge trees . . . . . . . . . . . . . . . . . . . . . . . . . . 26412.7 Byzantine failures with three generals . . . . . . . . . . . . . . . 26612.8 Byzantine failures with four generals . . . . . . . . . . . . . . . 26812.9 The flooding algorithm . . . . . . . . . . . . . . . . . . . . . . 27112.10 The King algorithm . . . . . . . . . . . . . . . . . . . . . . . . 27412.11 Impossibility with three generals . . . . . . . . . . . . . . . . . 280 13 Real-Time Systems 28513.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28513.2 Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28713.3 Reliability and repeatability . . . . . . . . . . . . . . . . . . . . 28813.4 Synchronous systems . . . . . . . . . . . . . . . . . . . . . . . 29013.5 Asynchronous systems . . . . . . . . . . . . . . . . . . . . . . . 29313.6 Interrupt-driven systems . . . . . . . . . . . . . . . . . . . . . . 29713.7 Priority inversion and priority inheritance . . . . . . . . . . . . . 29913.8 The Mars Pathfinder in Spin . . . . . . . . . . . . . . . . . . . . 30313.9 Simpson's four-slot algorithm . . . . . . . . . . . . . . . . . . . 30613.10 The Ravenscar profile . . . . . . . . . . . . . . . . . . . . . . . 30913.11 UPPAAL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31113.12 Scheduling algorithms for real-time systems . . . . . . . . . . . 312 A The Pseudocode Notation 317 B Review of Mathematical Logic 321B.1 The propositional calculus . . . . . . . . . . . . . . . . . . . . . 321B.2 Induction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323B.3 Proof methods . . . . . . . . . . . . . . . . . . . . . . . . . . . 324B.4 Correctness of sequential programs . . . . . . . . . . . . . . . . 326 C Concurrent Programming Problems 331 D Software Tools 339D.1 BACI and jBACI . . . . . . . . . . . . . . . . . . . . . . . . . . 339D.2 Spin and jSpin . . . . . . . . . . . . . . . . . . . . . . . . . . . 341D.3 DAJ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345 E Further Reading 349 Bibliography 351 Index 355show more

Rating details

36 ratings
3.5 out of 5 stars
5 14% (5)
4 36% (13)
3 39% (14)
2 8% (3)
1 3% (1)
Book ratings by Goodreads
Goodreads is the world's largest site for readers with over 50 million reviews. We're featuring millions of their reader ratings on our book pages to help you find your new favourite book. Close X