- 0
- 0
- 约2.67千字
- 约 19页
- 2020-12-30 发布于安徽
- 举报
* * * * * * * * 4.* Operating System Operating System Chapter 4: Threads Overview Multithreading Models Threading Issues PThreads Windows Threads Linux Threads Java Threads Operating System Single and Multithreaded Processes Operating System Benefits Responsiveness Resource Sharing Economy Utilization of MP Architectures Operating System User Threads Thread management done by user-level threads library(线程库) Three primary thread libraries: POSIX Pthreads(用户级或者内核级) Win32 threads(内核级) Java threads(运行在操作系统上) Operating System Kernel Threads Supported by the Kernel Examples - Windows 95/98/NT/2000/XP - Solaris - Tru64 UNIX - BeOS - Linux Operating System Multithreading Models Many-to-One One-to-One Many-to-Many Operating System Many-to-One Many user-level threads mapped to single kernel thread.(只有一个线程可以访问内核,不能并行运行) Used on systems that do not support kernel threads. Operating System Many-to-One Model Operating System One-to-One Each user-level thread maps to kernel thread. Examples - Windows 95/98/NT/2000/XP - OS/2 Operating System One-to-one Model Operating System Many-to-Many Model Allows many user level threads to be mapped to many kernel threads. Allows the operating system to create a sufficient number of kernel threads. Solaris 2 Windows NT/2000 with the ThreadFiber package Operating System Many-to-Many Model Operating System Threading Issues Semantics of fork()(复制单个/多个线程) and exec()(替换所有线程) system calls. Thread cancellation.(终止线程) target thread cancellation point Signal handling(UNIX occur) Thread pools(线程池) Thread specific data(线程副本) Operating System Pthreads A POSIX standard (IEEE 1003.1c) API for thread creation and synchronization API specifies behavior of the thread library, implementation is up to development of the library Common in UNIX operating systems (Solaris, Linux, Mac OS X) Operating System Windows XP Threads Implements the one-to-one mapping(一对一映射) Each thread contains A thread id Register set Separate user and ke
您可能关注的文档
- 信号与系统:3.07 主抽样定理.ppt
- 信号与系统:第8章系统的状态空间分析.ppt
- 信号与系统:第六章 离散系统z域分析.ppt
- 信号与系统:第四章 连续时间系统的S域分析.ppt
- 信号与系统:第五章 离散系统的时域分析.ppt
- 信号与系统:改3.04 典型非周期信号的频谱.ppt
- 信息系统分析与设计:第01章 绪论.ppt
- 信息系统分析与设计:第06章 功能分析.pptx
- 2011微原接口B卷答案.doc
- ERP原理与教程教学课件.ppt
- 操作系统概念英文课件:Chapter 7 Deadlocks.ppt
- 操作系统概念英文课件:CHapter 08-main memory.pptx
- 操作系统概念英文课件:Chapter 8 Memory Management (2).ppt
- 操作系统概念英文课件:Chapter 8 Memory Management.ppt
- 操作系统概念英文课件:Chapter 09-virtual memory.pptx
- 操作系统概念英文课件:Chapter 9 Virtual Memory.ppt
- 操作系统概念英文课件:Chapter 10 File-System Interface.ppt
- 操作系统概念英文课件:Chapter 11-file-system implementation.pptx
- 操作系统概念英文课件:Chapter 12 Mass-Storage Systems.ppt
- 操作系统概念英文课件:Chapter 13-IO systems.pptx
原创力文档

文档评论(0)