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
所有线程管理的工