Book description
1700G-6
The ultimate guide to multithreading with Java technology!
Powerful techniques for enhancing application performance
Multithreaded program design for network and Internet applications
Extensive code examples throughout
Multithreading gives developers using the Java 2 platform a powerful tool for dramatically improving the responsiveness and performance of their programs on any platform, even those without inherent multithreading support. Multithreaded Programming with Java Technology is the first complete guide to multithreaded development with the Java 2 platform. Multithreading experts Bil Lewis and Daniel J. Berg cover the underlying structures upon which threads are built; thread construction; and thread lifecycles, including birth, life, death, and cancellation. Next, using extensive code examples, they cover everything developers need to know to make the most of multithreading, including:
Thread scheduling models and synchronization-with solutions for complex, real-world synchronization problems
Multithreaded program design for networked and Internet applications
Thread-specific data: use and implementation
Leveraging OS libraries to make Java-based multithreading more effective
Optimizing thread performance and designing for SMP hardware
Powerful techniques and comprehensive example code for improving Java-based application performance with multithreading!
Table of contents
- Copyright
- Preface
- Acknowledgments
- 1. Introduction
- 2. Concepts
- 3. Foundations
- 4. Lifecycle
- 5. Scheduling
- 6. Synchronization
- 7. Complexities
- 8. TSD
-
9. Cancellation
- What Cancellation Is
- interrupt()
- A Cancellation Example
- Using Cancellation
- Cleanup
- Implementing enableInterrupts()
- A Cancellation Example (Improved)
- Simple Polling
- APIs Used in This Chapter
- Summary
- 10. Details
- 11. Libraries
-
12. Design
-
Making Libraries Safe and Hot
- Trivial Library Functions
- Functions That Maintain State across Invocations
- Making malloc() More Concurrent
- Manipulating Lists
- Single, Global Mutex
- Global RWLock with Global Mutex to Protect Salaries
- Global RWLock with Local Mutex to Protect Salaries
- One Local Lock
- Two Local Locks
- Local RWLock with Local Mutex to Protect Salaries
- Program Design
- Design Patterns
- Summary
-
Making Libraries Safe and Hot
- 13. RMI
- 14. Tools
-
15. Performance
- Optimization: Objectives and Objections
- CPU Time, I/O Time, Contention, Etc.
- Limits on Speedup
- Amdahl's Law
- Performance Bottlenecks
- Benchmarks and Repeatable Testing
- The Lessons of NFS
- Summary
- 16. Hardware
-
17. Examples
- Threads and Windows
- Displaying Things for a Moment (Memory.java)
- Socket Server (Master/Slave Version)
- Socket Server (Producer/Consumer Version)
- Making a Native Call to pthread_setconcurrency()
- Actual Implementation of POSIX Synchronization
- A Robust, Interruptible Server
- Disk Performance with Java
- Other Programs on the Web
- Summary
- A. Internet
- B. Books
-
C. Timings
-
Timings
- Mutex Lock/Unlock
- Explicit Synchronized
- Implicit Synchronized
- Readers/Writer Lock/Unlock
- Semaphore Post/Wait
- notify()
- condSignal()
- Local Context Switch (unbound)
- Local Context Switch (bound)
- Process Context Switch
- Cancellation Disable/Enable
- Test for Deferred Cancellation
- Reference a Global Variable
- Reference Thread-Specific Data
- Reference “Fake” Thread-Specific Data
-
Timings
-
D. APIs
- Function Descriptions
- The Class java.lang.Thread
- The Interface java.lang.Runnable
- The Class java.lang.Object
- The Class java.lang.ThreadLocal
- The Class java.lang.ThreadGroup
- Helper Classes from Our Extensions LibraryThe Class Extensions.InterruptibleThread
- The Class Extensions.Semaphore
- The Class Extensions.Mutex
- The Class Extensions.ConditionVar
- The Class Extensions.RWLock
- The Class Extensions.Barrier
- The Class Extensions.SingleBarrier
- Glossary
Product information
- Title: Multithreaded Programming with JAVA™ Technology
- Author(s):
- Release date: December 1999
- Publisher(s): Pearson
- ISBN: 0130170070
You might also like
video
Java Multithreading and Parallel Programming Masterclass
Multithreading is an advanced topic for any developer, and they struggle to understand many allied concepts …
book
Java Threads, 3rd Edition
Threads are essential to Java programming, but learning to use them effectively is a nontrivial task. …
book
Java Threads and the Concurrency Utilities
This concise book empowers all Java developers to master the complexity of the Java thread APIs …
book
Mastering Concurrency Programming with Java 8
Master the principles and techniques of multithreaded programming with the Java 8 Concurrency API About This …