Operating System ReviewCS-0811Chapter 4Processes and Threads 进程和线程到目前为止进程的两个特点:1、Resource ownership:资源所有权2、Scheduling/execution:调度/执行the unit of dispatching is usually referred to as a thread 线程, or lightweight process.将分派的单位称为线程或轻量级进程。线程同步:一个进程的所有线程共享一个地址空间(address space)和其他资源,因此需要同步各种线程的活动User-Lev el and Kernel-Lev el Threads 用户级和内核级线程User-Lev el Threads:·All of the word of thread management is done by the application and the kernel isnot aware of the existence of threads.有关线程管理的所有工作都由应用程序完成,内核意识不到线程的存在·使用用户级线程而不是内核级线程的优点:1、Thread switching does not require kernel mode privileges 线程切换不需要内核态特权2、Scheduling can be application specific.调度可以是应用程序相关的3、ULTs can run on any operating system.用户级线程可以在任何操作系统上运行Kernel-Level Threads:·all of the word of thread management is done by the kernel. 所有线程管理的工作由内核完成Threads : Processes 线程与进程的关系1:1传统的UNIXM:1Windows NT,Solaries,Linux1:MRS(Clouds)A thread that can move among address spaces.线程可以在地址空间中移动(thread migration)M:NTRIXOperating System ReviewCS-0812Symmetric Multiprocessing 对称多处理SISD 单指令单数据流:单处理器执行单个指令流SIMD 单指令多数据流:每条指令由不同的处理器在不同的数据集合上执行MISD 多指令单数据流:从未被实现过MIMD 多指令多数据流:一组处理器同时在不同的数据集上执行不同的指令序列In a symmetric multiprocessor, the kernel can execute on any processor, and typicallyeach processor does self-scheduling from the pool of available processes.内核可以在任何处理器上执行,并且通常是每个处理器从可用的进程或线程池中进行自己的调度工作Microkernel 微内核·monolithic operation system 单体结构的操作系统·layered operation system 分层的操作系统·microkernel operation 微内...