• Complain

Brian Goetz - Java Concurrency in Practice

Here you can read online Brian Goetz - Java Concurrency in Practice full text of the book (entire story) in english for free. Download pdf and epub, get meaning, cover and reviews about this ebook. year: 2006, publisher: Addison-Wesley Professional, genre: Computer. Description of the work, (preface) as well as reviews are available. Best literature library LitArk.com created for fans of good reading and offers a wide selection of genres:

Romance novel Science fiction Adventure Detective Science History Home and family Prose Art Politics Computer Non-fiction Religion Business Children Humor

Choose a favorite category and find really read worthwhile books. Enjoy immersion in the world of imagination, feel the emotions of the characters or learn something new for yourself, make an fascinating discovery.

Brian Goetz Java Concurrency in Practice

Java Concurrency in Practice: summary, description and annotation

We offer to read an annotation, description, summary or preface (depends on what the author of the book "Java Concurrency in Practice" wrote himself). If you haven't found the necessary information about the book — write in the comments, we will try to find it.

I was fortunate indeed to have worked with a fantastic team on the design and implementation of the concurrency features added to the Java platform in Java 5.0 and Java 6. Now this same team provides the best explanation yet of these new features, and of concurrency in general. Concurrency is no longer a subject for advanced users only. Every Java developer should read this book.--Martin BuchholzJDK Concurrency Czar, Sun MicrosystemsFor the past 30 years, computer performance has been driven by Moores Law; from now on, it will be driven by Amdahls Law. Writing code that effectively exploits multiple processors can be very challenging. Java Concurrency in Practice provides you with the concepts and techniques needed to write safe and scalable Java programs for todays--and tomorrows--systems.--Doron RajwanResearch Scientist, Intel CorpThis is the book you need if youre writing--or designing, or debugging, or maintaining, or contemplating--multithreaded Java programs. If youve ever had to synchronize a method and you werent sure why, you owe it to yourself and your users to read this book, cover to cover.--Ted NewardAuthor of Effective Enterprise JavaBrian addresses the fundamental issues and complexities of concurrency with uncommon clarity. This book is a must-read for anyone who uses threads and cares about performance.--Kirk PepperdineCTO, JavaPerformanceTuning.comThis book covers a very deep and subtle topic in a very clear and concise way, making it the perfect Java Concurrency reference manual. Each page is filled with the problems (and solutions!) that programmers struggle with every day. Effectively exploiting concurrency is becoming more and more important now that Moores Law is delivering more cores but not faster cores, and this book will show you how to do it.--Dr. Cliff ClickSenior Software Engineer, Azul SystemsI have a strong interest in concurrency, and have probably written more thread deadlocks and made more synchronization mistakes than most programmers. Brians book is the most readable on the topic of threading and concurrency in Java, and deals with this difficult subject with a wonderful hands-on approach. This is a book I am recommending to all my readers of The Java Specialists Newsletter, because it is interesting, useful, and relevant to the problems facing Java developers today.--Dr. Heinz KabutzThe Java Specialists NewsletterIve focused a career on simplifying simple problems, but this book ambitiously and effectively works to simplify a complex but critical subject: concurrency. Java Concurrency in Practice is revolutionary in its approach, smooth and easy in style, and timely in its delivery--its destined to be a very important book.--Bruce TateAuthor of Beyond JavaJava Concurrency in Practice is an invaluable compilation of threading know-how for Java developers. I found reading this book intellectually exciting, in part because it is an excellent introduction to Javas concurrency API, but mostly because it captures in a thorough and accessible way expert knowledge on threading not easily found elsewhere.--Bill VennersAuthor of Inside the Java Virtual MachineThreads are a fundamental part of the Java platform. As multicore processors become the norm, using concurrency effectively becomes essential for building high-performance applications. Java SE 5 and 6 are a huge step forward for the development of concurrent applications, with improvements to the Java Virtual Machine to support high-performance, highly scalable concurrent classes and a rich set of new concurrency building blocks. In Java Concurrency in Practice, the creators of these new facilities explain not only how they work and how to use them, but also the motivation and design patterns behind them.However, developing, testing, and debugging multithreaded programs can still be very difficult; it is all too easy to create concurrent programs that appear to work, but fail when it matters most: in production, under heavy load. Java Concurrency in Practice arms readers with both the theoretical underpinnings and concrete techniques for building reliable, scalable, maintainable concurrent applications. Rather than simply offering an inventory of concurrency APIs and mechanisms, it provides design rules, patterns, and mental models that make it easier to build concurrent programs that are both correct and performant.This book covers: Basic concepts of concurrency and thread safety Techniques for building and composing thread-safe classes Using the concurrency building blocks in java.util.concurrent Performance optimization dos and donts Testing concurrent programs Advanced topics such as atomic variables, nonblocking algorithms, and the Java Memory Model

Brian Goetz: author's other books


Who wrote Java Concurrency in Practice? Find out the surname, the name of the author of the book and a list of all author's works by series.

Java Concurrency in Practice — read online for free the complete book (whole text) full work

Below is the text of the book, divided by pages. System saving the place of the last page read, allows you to conveniently read the book "Java Concurrency in Practice" online for free, without having to search again every time where you left off. Put a bookmark, and you can go to the page where you finished reading at any time.

Light

Font size:

Reset

Interval:

Bookmark:

Make
Index
[].] abstractions [See .] AbstractQueuedSynchronizer [See AQS framework.].] acquisition of locks [See locks, acquisition.].].].].].].].].].].].].].]
Index
[].].].] bias [See , pitfalls.].].].].].].]
Index
[].].].].].].].].].] compare-and-swap (CAS) instructions [See .].].].]examples of [See .].]errors [See .].].].].].].].].].].].].].].].].].].].].]
Index
[].].].]handling [See .].] deadly embrace [See .].].].].].].].]examples [See .] destruction [See .].].].]
Index
[].].].]concurrency [See .].].].].]
Index
[].].].].].].].].] flag(s) [See .].].].] [See also RMI framework.] [See also Servlets framework.]
Index
[].].].].].]
Index
[].].].] hijacked signal [See .].].].]
Index
[].].].].].].].].].].].].].].]
Index
[].] JMM (Java Memory Model) [See .].]
Index
[]
Index
[].].].] lightweight processes [See .].].].].]causes [See .]safety vs [See .].].]monitor [See .].].]
Index
[].].].].].].]locks [See .].].].].]
Index
[].] notifyAll
Index
[].].] optimistic concurrency management [See .][See also atomic variabless.] [See also nonblocking synchronization.].].]impact of [See .]reduction [See .]sources [See .]
Index
[], shared data.].].].].].].].].] pessimistic concurrency management [See .].].].].].].].] presentation [See .]lightweight [See .].].].].].]
Index
[].].]
Index
[].].] reaping [See .] recovery, deadlock [See .].].].].].].].].].].]
Index
[].].].].].].]stateless.].].].].] single notification [See .].].].].].].].].].].].].].].]types [See .].]
Index
[]
Index
[].].].].] [See also statistics.].].].].].].].].].].].].].]
Index
[].].].].].].].]
Index
[] value(s) [See .].].].]
Index
[].].] within-thread usage [See .]
Appendix A. Annotations for Concurrency

We've used annotations such as @GuardedBy and @ThreadSafe to show how thread-safety promises and synchronization policies can be documented. This appendix documents these annotations; their source code can be downloaded from this book's website. (There are, of course, additional thread-safety promises and implementation details that should be documented but that are not captured by this minimal set of annotations.)

A.1. Class Annotations

We use three class-level annotations to describe a class's intended thread-safety promises: @Immutable , @ThreadSafe , and @NotThreadSafe . @Immutable means, of course, that the class is immutable, and implies @ThreadSafe . @NotThreadSafe is optionalif a class is not annotated as thread-safe, it should be presumed not to be thread-safe, but if you want to make it extra clear, use @NotThreadSafe .

These annotations are relatively unintrusive and are beneficial to both users and maintainers. Users can see immediately whether a class is thread-safe, and maintainers can see immediately whether thread-safety guarantees must be preserved. Annotations are also useful to a third constituency: tools. Static codeanalysis tools may be able to verify that the code complies with the contract indicated by the annotation, such as verifying that a class annotated with @Immutable actually is immutable.

A.2. Field and Method Annotations

The class-level annotations above are part of the public documentation for the class. Other aspects of a class's thread-safety strategy are entirely for maintainers and are not part of its public documentation.

Classes that use locking should document which state variables are guarded with which locks, and which locks are used to guard those variables. A common source of inadvertent non-thread-safety is when a thread-safe class consistently uses locking to guard its state, but is later modified to add either new state variables that are not adequately guarded by locking, or new methods that do not use locking properly to guard the existing state variables. Documenting which variables are guarded by which locks can help prevent both types of omissions.

@GuardedBy(lock) documents that a field or method should be accessed only with a specific lock held. The lock argument identifies the lock that should be held when accessing the annotated field or method. The possible values for lock are:

  • @GuardedBy("this") , meaning the intrinsic lock on the containing object (the object of which the method or field is a member);

  • @GuardedBy(" fieldName ") , meaning the lock associated with the object referenced by the named field, either an intrinsic lock (for fields that do not refer to a Lock ) or an explicit Lock (for fields that refer to a Lock );

  • @GuardedBy(" ClassName.fieldName ") , like @GuardedBy("fieldName") , but referencing a lock object held in a static field of another class;

  • @GuardedBy(" methodName ()") , meaning the lock object that is returned by calling the named method;

  • @GuardedBy(" ClassName .class") , meaning the class literal object for the named class.

Using @GuardedBy to identify each state variable that needs locking and which lock guards it can assist in maintenance and code reviews, and can help automated analysis tools spot potential thread-safety errors.

Bibliography

Ken Arnold, James Gosling, and David Holmes. The Java Programming Language , Fourth Edition. AddisonWesley, 2005.

David F. Bacon, Ravi B. Konuru, Chet Murthy, and Mauricio J. Serrano. Thin Locks: Featherweight Synchronization for Java . In SIGPLAN Conference on Programming Language Design and Implementation , pages 258268, 1998. URL http://citeseer.ist.psu.edu/bacon98thin.html.

Joshua Bloch. Effective Java Programming Language Guide . AddisonWesley, 2001.

Joshua Bloch and Neal Gafter. Java Puzzlers . AddisonWesley, 2005.

Hans Boehm. Destructors, Finalizers, and Synchronization. In POPL '03: Proceedings of the 30th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages , pages 262272. ACM Press, 2003. URL http://doi.acm.org/10.1145/604131.604153.

Hans Boehm. Finalization, Threads, and the Java Memory Model. JavaOne presentation , 2005. URL http://developers.sun.com/learning/javaoneonline/2005/coreplatform/TS-3281.pdf.

Joseph Bowbeer. The Last Word in Swing Threads , 2005. URL http://java.sun.com/products/jfc/tsc/articles/threads/threads3.html.

Cliff Click. Performance Myths Exposed. JavaOne presentation , 2003.

Cliff Click. Performance Myths Revisited. JavaOne presentation , 2005. URL http://developers.sun.com/learning/javaoneonline/2005/coreplatform/TS-3268.pdf.

Martin Fowler. Presentation Model , 2005. URL http://www.martinfowler.com/eaaDev/PresentationModel.html.

Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides. Design Patterns . AddisonWesley, 1995.

Martin Gardner. The fantastic combinations of John Conway's new solitaire game 'Life' . Scientific American , October 1970.

James Gosling, Bill Joy, Guy Steele, and Gilad Bracha. The Java Language Specification , Third Edition. AddisonWesley, 2005.

Tim Harris and Keir Fraser. Language Support for Lightweight Transactions . In OOPSLA '03: Proceedings of the 18th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications , pages 388402. ACM Press, 2003. URL http://doi.acm.org/10.1145/949305.949340.

Tim Harris, Simon Marlow, Simon Peyton-Jones, and Maurice Herlihy. Composable Memory Transactions . In PPoPP '05: Proceedings of the Tenth ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming , pages 4860. ACM Press, 2005. URL http://doi.acm.org/10.1145/1065944.1065952.

Next page
Light

Font size:

Reset

Interval:

Bookmark:

Make

Similar books «Java Concurrency in Practice»

Look at similar books to Java Concurrency in Practice. We have selected literature similar in name and meaning in the hope of providing readers with more options to find new, interesting, not yet read works.


Reviews about «Java Concurrency in Practice»

Discussion, reviews of the book Java Concurrency in Practice and just readers' own opinions. Leave your comments, write what you think about the work, its meaning or the main characters. Specify what exactly you liked and what you didn't like, and why you think so.