Riassunto
The popularity of the Internet has led to rapidly expanding interest in client-server programming by all kinds of businesses and organizations. Many client and server applications benefit from their design as object-oriented programs with multiple threads of control. An object-oriented language with built-in threads, Java is ideal for concurrent programming and developing multi-threaded applications. Demand for programmers skilled in object-oriented design and concurrency will only grow in the future, making concurrent programming and the Java programming language increasingly important to programming students and professionals.
Designed for students and professionals, Concurrent Programming: The Java Programming Language provides a practical, demonstrative introduction to the issues and concepts in concurrent programming, operating systems, the client-server model, and multiple threads. It features numerous Java example programs as stand-alone applications rather than as simple applets, showing readers how to utilize the Java programming language to write programs that use semaphores, monitors, message passing, remote procedure calls, and the rendezvous for thread synchronization and communication. Each example program includes output from one or more sample runs. Multithreading issues such as race conditions, critical sections, mutual exclusion, and condition synchronization are covered. Several thread communication tools used extensively in client server programming--message passing, the rendezvous, and remote procedure calls--are also described. An algorithm animation package, written in Java, is used in several of the example programs. The book concludes with a brief introduction to parallel processing with Java.
Concurrent Programming: The Java Programming Language is suitable for a concurrent programming course or as a supplement in an operating systems class. Professional programmers will also find the presentation accessible. All source code for the book is available by anonymous ftp from ftp.mcs.drexel.edu and from the World Wide Web at http://www.mcs.drexel.edu/~shartley/ConcProgJava/index.html.
Contenuti
- Preface
- List of Figures
- List of Tables
- 1: Introduction
- 1.1: Hardware and Software Concepts
- 1.1.1: Processes
- 1.1 2: Threads
- 1.1.4: CPU Scheduling and Context Switching
- 1.1.5: Hardware Protection
- 2: The Java Programming Language
- 2.1: Sequential Features
- 2.1.1: Single-Class Static Programs
- 2.1.2: Multi-Class Static Programs
- 2.2: Objects
- 2.3: Command Line Argument Parsing
- 2.4: Inheritance
- 2.4.1: Interfaces
- 2.4.2: User-Defined Exceptions
- 2.5: Packages
- 2.5.1: Mathematical Functions
- 2.6: Genetic Algorithms
- 2.7: Animating Programs with Java's AWT
- 2.8: Exercises
- 3: Concurrent Programming
- 3.1: Java Threads
- 3.1.1: Thread States and Scheduling
- 3.2.1: Other Thread Methods
- 3.2: Why Use Threads?
- 3.3: Debugging Techniques
- 3.4: Race Conditions and Thread Synchronization
- 3.4.1: Memory System Behavior
- 3.4.2: Thread Priorities and Starvation
- 3.5: The Mutual Exclusion Problem
- 3.5.1: Software Solutions for Two Threads
- 3.5.2: Software Solutions for More Than Two Threads
- 3.5.3: Hardware Solutions
- 3.5.4: Blocking Solutions
- 3.6: Exercises
- 4: Semaphores
- 4.1: Definitions and Implementation
- 4.2: Java Semaphores
- 4.2.1: Binary Semaphores
- 4.2.2: Counting Semaphores
- 4.3: Classical Operating Systems Problems
- 4.4: Semaphore Solutions
- 4.4.1: The Bounded Buffer Producer and Consumer
- 4.4.2: Using Bounded Buffers
- 4.4.3: The Sleeping Barber
- 4.4.4: The Dining Philosophers
- 4.4.5: The Readers and Writers
- 4.5: Deadlock
- 4.6: Counting Semaphores From Binary
- 4.7: Animating Operating Systems Algorithms
- 4.8: Exercises
- 5: Monitors
- 5.1: Definitions
- 5.2: Signal and Exit
- 5.2.1: The Bounded Buffer Producer and Consumer
- 5.2.2: The Dining Philosphers
- 5.2.3: The Readers and Writers
- 5.3: Signal and Continue
- 5.3.1: Java Monitors
- 5.3.2: The Bounded Buffer Producer and Consumer
- 5.3.3: The Dining Philosophers
- 5.3.4: The Readers and Writers
- 5.4: Deadlock
- 5.5: Binary and Counting Semaphore Monitors
- 5.6: Locks
- 5.7: Notification Objects
- 5.8: Implementing Monitors with Semaphores
- 5.8.1: Named Condition Variables for Java
- 5.9: Algorithm Animation
- 5.10: Exercises
- 6: Message Passing and the Rendezvous
- 6.1: Message Passing Definitions
- 6.2: Message Passing in Java
- 6.2.1: Synchronization Using Message Passing
- 6.2.2: Distributed Mutual Exclusion
- 6.2.3: Conditional Message Passing
- 6.2.4: The Distributed Dining Philosophers
- 6.3: Rendezvous
- 6.3.1: Conditional Rendezvous
- 6.4: Remote Method Invocation
- 6.5: More Animation with Java
- 6.6: Exercises
- 7: Parallel Computing
- 7.1: Definitions
- 7.2: Data Parallel Message Passing
- 7.3: Worker Crew Message Passing
- 7.4: Shared Memory Parallelism
- 7.5: Patterns of Communication
- 7.6: Exercises
- Bibliography
- Index
- List of Programs/Classes
- List of Library Classes
- Program and Library Class Source Code
Le informazioni nella sezione "Su questo libro" possono far riferimento a edizioni diverse di questo titolo.