Introduces techniques for designing and implementing multithreaded software applications, discussing its advantages as well as how to overcome such challenges as resource sharing and deadlock. Coverage includes thread management, creation, termination, synchronization, and prioritization; the role of monitors and data encapsulation; and how to use DCOM to implement multithreading in distributed software. Intended for application developers familiar with C. The CD-ROM contains all source code from the book. Annotation c. by Book News, Inc., Portland, Or.
"synopsis" may belong to another edition of this title.
Thuan Q. Pham is a developer at Netgravity in Palo Alto, CA.
Pankaj K. Garg is a Member of the Technical Staff (MTS) at HP Laboratories in Palo Alto, CA.
Build faster, more responsive NT applications with multithreading!
Multithreaded Programming with Win32.
* Complete coverage of the Win32 Thread Interface.
* Covers the latest Win32 interfaces, APIs, and DCOM programming model.
* Thread management, creation, termination, synchronization, prioritization, and more!
* Improve robustness with advanced deadlock prevention and recovery techniques.
* Make the most of Java threads.
* Create multithreaded distributed applications with DCOM.
If you want to deliver NT applications with maximum performance, efficiency and robustness, you need to master multithreading. Multithreaded Programming with Win32 brings together every Win32 multithreading technique and concept you must know-all brilliantly explained with practical examples and sample code.
Start by learning how multithreading works, and the fundamentals of the Win32 Thread Interface, including processes, thread management, creation, termination, and prioritization. Next, review key Win32 techniques for thread synchronization. Understand the role of monitors and data encapsulation. Then, use Microsoft's deadlock detection, prevention, and recovery techniques to maximize the robustness of your multithreaded applications.
Master the thread-package architecture and implementations, including user-level, kernel-level, and multiplexed threads, as well as the scheduler. Even learn how to use DCOM to implement multithreading in distributed software.
No matter what NT applications you develop-desktop, client/server, distributed, or Web-based-this book will help you supercharge them!
Preface In this book, we describe techniques for designing and implementing multithreaded software applications. Multithreaded programming can effectively improve efficiency and performance in an application program by introducing concurrency or parallelism. Until recently, concurrent programming required multiple processes, each with a single thread of execution, running concurrently on a multitasking operating system. In the past, concurrent programming was a tool used mostly by researchers and system implementors, that is, programmers of operating systems, networking, and other systems software. Modern operating systems like Solaris, AIX, DEC-UNIX, Windows 98, Windows NT, HP-UX, and Linux, all support multiple threads of control within the same address space. With the wide availability of multiprocessor computers in the coming years, multithreaded programming will be a viable and important technique for application programmers to master. With threads, a process can have multiple instruction streams executing simultaneously with much lower overhead than concurrent processes. Threads within the same address space inherently share that process's memory, which makes communication and data sharing among threads efficient. In addition, multithreading technology is absolutely essential for domains such as real-time multimedia and distributed systems. Andrew Birrell, in his excellent tutorial, Programming with Threads, lists five main benefits of multithreaded programming: (1) greater speed from multiprocessor computers, (2) improved program efficiency by avoiding waits associated with slow-speed I/O devices, (3) multiple inputs from a user at the same time, (4) simpler server programs, and (5) responsive programs with computations judiciously spread over time. Developing programs that exploit these benefits of multithreading, however, is a challenge; the presence of parallelism introduces a new set of problems like resource sharing, deadlocks, race conditions, and so forth. The purpose of this book is both to introduce you to the concept of multithreaded programming, and to demonstrate how some of these challenges can be overcome. We have tried to cover all the important aspects of multithreaded programming, and to create a book that you will want to read as a primer book and use later as a reference guide. Outline of Chapters Chapter 1 introduces the basic concepts, history, benefits, and challenges of multithreaded programming. To provide an immediate hands-on experience, this chapter presents a small multithreaded program for you to experiment with right away. Chapter 2 introduces the Win32 thread interface and discusses its use. Here we also discuss the concepts of processes and threads, illustrate thread management functions, describe thread priorities and scheduling, and examine synchronization objects. In Chapter 3 we discuss the fundamental techniques for synchronizing threads of a multithreaded application. Using classic concurrency problems of producer-consumer, bounded-buffer, and readers-writers, we demonstrate synchronization techniques using the threads interface described in Chapter 2. Chapters 4 and 5 introduce monitors, an important abstraction and tool for multithreaded programming. While Chapter 4 describes the structure and properties of monitors, Chapter 5 simulates monitors using a combination of C++ classes and Win32 synchronization objects. Once again, we use concurrency problems of producer-consumer, bounded-buffer, and readers-writers to illustrate and demonstrate the usefulness of monitors in these chapters. Chapter 6 covers system deadlock in detail. In this chapter, we describe conditions for deadlock and explore techniques for avoiding it. Using the classic dining philosophers' problem, we demonstrate how to apply several deadlock- handling techniques like deadlock detection and recovery, prevention, and avoidance to application programs. Chapter 7 surveys a variety of thread package architectures, including user-level threads, kernel threads, multiplexed threads, and scheduler activations. We describe the impact of each thread architecture on the design and implementation of multithreaded programs. Chapter 8 covers the important topic of how to break up an application into multiple threads. We present illustrative programming models, including work groups, manager-worker, deferred computation, pipeline, and WorkCrew. Each model is illustrated using a sample program. In Chapter 9 we describe how threads can be used in the client and server components of a distributed application. Multithreaded programming plays an important role in this domain. We show the basic steps for constructing a distributed application using Microsofts' Remote Procedure Call (RPC) and Distributed Component Object Model (DCOM). The concurrent programming techniques covered in this book are well known in the computer science research community and are discussed in technical publications and several operating system textbooks. These concepts have, however, only recently become available for application programmers. The target audience for this book are application developers who want to experiment with multithreaded programming, and who have a working knowledge of the C programming language. Some parts of the book require a knowledge of the C++ language and the Visual C++ programming environement. We do not describe the threads API of the Microsoft Foundation Classes (MFC). The examples have been implemented on Intel Pentium machines running the Windows NT 4.0 Workstation operating system. Also, for clarity and brevity of exposition, we have removed error-checking code from the listings presented in the book except where such code is essential to the content under discussion. Acknowledgments Scott Marovich provided invaluable assistance with the preparation of this book: he carefully went through several versions, pointing out numerous corrections and improvements. Scott, thank you! We thank Anthony T. Nguyen for his early discussions with us on the book. We thank Nawaf Bitar for his valuable review and feedback for this book's proposal. We thank Debbie Caswell for her review of earlier versions of the book and encouraging comments about it. We thank Mary Franz, our editor at Prentice Hall, for initially suggesting the project, for patiently guiding us through the process, and for her eternal optimism. We thank Derrick Burns, Jill Huchital, Mehdi Jazayeri, John Krystynak, Srikanth Nadhamuni, and Thu Nguyen for their comments on earlier versions of the book. We thank Craig Little, our production editor, for patiently working with us on this project, and Scott Disanno for his careful copyediting of the book. Thuan thanks his wonderful wife, Nicole Anh-Dao, for all the support, encouragement, patience, and understanding that has made this project possible. Pankaj thanks his parents, Shri Harish Chand Garg and Smt. Savitri Garg for their love, affection and care. He thanks Puna, for her caring and wonderful companionship, his sister, Priti, and brother-in-law, Ajay, and all his friends for their encouragement and support.
"About this title" may belong to another edition of this title.
FREE shipping within U.S.A.
Destination, rates & speedsSeller: SecondSale, Montgomery, IL, U.S.A.
Condition: Good. Item in good condition. Textbooks may not include supplemental items i.e. CDs, access codes etc. Seller Inventory # 00066806142
Quantity: 1 available
Seller: Better World Books, Mishawaka, IN, U.S.A.
Condition: Good. Former library book; may include library markings. Used book that is in clean, average condition without any missing pages. Seller Inventory # 11087967-6
Quantity: 2 available
Seller: ThriftBooks-Dallas, Dallas, TX, U.S.A.
Paperback. Condition: Very Good. No Jacket. May have limited writing in cover pages. Pages are unmarked. ~ ThriftBooks: Read More, Spend Less 1.21. Seller Inventory # G0130109126I4N00
Quantity: 1 available
Seller: Goodwill of Silicon Valley, SAN JOSE, CA, U.S.A.
Condition: acceptable. Supports Goodwill of Silicon Valley job training programs. The cover and pages are in Acceptable condition! Any other included accessories are also in Acceptable condition showing use. Use can include some highlighting and writing, page and cover creases as well as other types visible wear such as cover tears discoloration, staining, marks, scuffs, etc. All pages intact. Seller Inventory # GWSVV.0130109126.A
Quantity: 1 available
Seller: dsmbooks, Liverpool, United Kingdom
Paperback. Condition: Good. Good. book. Seller Inventory # D8S0-3-M-0130109126-6
Quantity: 1 available