操作系统概念英文课件:Chapter 4 Threads.pptVIP

  • 0
  • 0
  • 约2.67千字
  • 约 19页
  • 2020-12-30 发布于安徽
  • 举报

操作系统概念英文课件:Chapter 4 Threads.ppt

* * * * * * * * 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

文档评论(0)

1亿VIP精品文档

相关文档