文件名称:
Pthreads Programming.chm
开发工具:
文件大小: 9mb
下载次数: 0
上传时间: 2010-04-29
详细说明: Chapter 1 - - Why Threads Overview What Are Pthreads? Potential Parallelism Specifying Potential Parallelism in a Concurrent Programming Environment UNIX Concurrent Programming: Multiple Processes Pthreads Concurrent Programming: Multiple Threads Parallel vs. Concurrent Programming Synchronization Sharing Process Resources Communication Scheduling Who Am I? Who Are You? Terminating Thread Execution Exit Status and Return Values Pthreads Library Calls and Errors Why Use Threads Over Processes? A Structured Progra mming Environment Choosing Which Applications to Thread Chapter 2 - - Designing Threaded Programs Overview Suitable Tasks for Threading Models Boss/Worker Model Peer Model Pipeline Model Buffering Data Between Threads Some Common Problems Performance Example: An ATM Server The Serial ATM Server The Multithreaded ATM Server Example: A Matrix Multiplication Program The Serial Matrix-Multiply Program The Multithreaded Matrix-Multiply Program Chapter 3 - - Synchronizing Pthreads Overview Selecting the Right Synchronization Tool Mutex Variables Using Mutexes Error Detection and Return Values Using pthread_mutex_trylock When Other Tools Are Better Some Shortcomings of Mutexes Contention for a Mutex Example: Using Mutexes in a Linked List Complex Data Structures and Lock Granularity Requirements and Goals for Synchronization Access Patterns and Granularity Locking Hierarchies Sharing a Mutex Among Processes Condition Variables Using a Mutex with a Condition Variable When Many Threads Are Waiting Checking the Condition on Wake Up: Spurious Wake Ups Condition Variable Attributes Condition Variables and UNIX Signals Condition Variables and Cancellation Reader/Writer Locks Synchronization in the ATM Server Synchronizing Access to Account Data Limiting the Number of Worker Threads Synchronizing a Server Shutdown Thread Pools An ATM Server Example That Uses a Thread Pool Chapter 4 - - Managing Pthreads Overview Setting Thread Attributes Setting a Thread’s Stack Size Setting a Thread’s Detached State Setting Multiple Attributes Destroying a Thread Attribute Object The pthread_once Mechanism Example: The ATM Server’s Communication Module Keys: Using Thread-Specific Data Initializing a Key: pthread_key_create Associating Data with a Key Retrieving Data from a Key Destructors Cancellation The Complication with Cancellation Cancelability Types and States Cancellation Points: More on Deferred Cancellation A Simple Cancellation Example Cleanup Stacks Cancellation in the ATM Server Scheduling Pthreads Scheduling Priority and Policy Scheduling Scope and Allocation Domains Runnable and Blocked Threads Scheduling Priority Scheduling Policy Using Priorities and Policies Setting Scheduling Policy and Priority Inheritance Scheduling in the ATM Server Mutex Scheduling Attributes Priority Ceiling Priority Inheritance The ATM Example and Priority Inversion Chapter 5 - - Pthreads and UNIX Overview Threads and Signals Traditional Signal Processing Signal Processing in a Multithreaded World Threads in Signal Handlers A Simple Example Some Signal Issues Handling Signals in the ATM Example Threadsafe Library Functions and System Calls Threadsafe and Reentrant Functions Example of Thread-Unsafe and Threadsafe Versions of the Same Function Functions That Return Pointers to Static Data Library Use of errno The Pthreads Standard Specifies Which Functions Must Be Threadsafe Using Thread-Unsafe Functions in a Multithreaded Program Cancellation-Safe Library Functions and System Calls Asynchronous Cancellation-Safe Functions Cancellation Points in System and Library Calls Thread-Blocking Library Functions and System Calls Threads and Process Management Calling fork from a Thread Calling exec from a Thread Process Exit and Threads Multiprocessor Memory Synchronization Chapter 6 - - Practical Considerations Overview Understanding Pthreads Implementation Two Worlds Two Kinds of Threads Who’s Providing the Thread? Debugging Deadlock Race Conditions Event Ordering Less Is Better Trace Statements Debugger Support for Threads Example: Debugging the ATM Server Performance The Costs of Sharing Too Much—Locking Thread Overhead Synchronization Overhead How Do Your Threads Spend Their Time? Performance in the ATM Server Example Conclusion Appendix A - - Pthreads and DCE The Structure of a DCE Server What Does the DCE Programmer Have to Do? Example: The ATM as a DCE Server Appendix B - - Pthreads Draft 4 vs. the Final Standard Detaching a Thread Mutex Variables Condition Variables Thread Attributes The pthread_once Function Keys Cancellation Scheduling Signals Threadsafe System Interfaces Error Reporting System Interfaces and Cancellation-Safety Process-Blocking Calls Process Management Appendix C - - Pthreads Quick Reference ...展开收缩
(系统自动生成,下载前可以参看下载内容)
下载文件列表
相关说明
- 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
- 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度。
- 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
- 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
- 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
- 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.