操作系统概念英文
合集下载
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
as a part of a process and can indecently runs on CPU A process may contain several threads. As a basic unit for CPU
scheduling, a thread in a process shares with other threads that belongs to the same process its code section, data section and other resources
resources are allocated to the process, and all threads in this process share these resources
tread = thread ID + program counter + a register set + stack —— refer to Fig.4.1 and the figure in the next slide
Example
Web server program Pr multithreaded web server process more than one thread in the process each thread serves for a client access request, many clients can be served concurrently.
Why thread needed (cont.)
Benefits (P131) responsiveness resource sharing economy utilization of multiple-processor architectures
Refer to Appendix 4.A for more details about threads
unit of resource allocation unit of CPU scheduling The costs of process management, such as costs of process creation, cancellation, process switch and process communication, are somewhat high, refer to Fig.3.4, and the concurrency (or multiprogramming degree) may be limited. To reduce costs of process management and improve degrees of concurrency and parallelism, the thread is presented
§4.1 Overview
4.1.2 Basic concepts Definition of the thread
a basic unit/entity of CPU utilization, that is, the basic unit /entity for CPU scheduling
Categories and implementation (mapping) of threads ( §4.2)
In view of programmers, multithreaded programming API— —thread Libraries (§4.3)
An Introduction to Chapter 5 (cont.)
User mode
in running
state
Kernel mode
User mode
in ready or waiting
state
Fig.3.4 CPU Switch From Process to Process
Why thread needed (cont.)
In thread-supporting OS, the process is as the unit of resource allocation, while the thread as the unit of CPU scheduling and the running entity on CPU.
Merits less costs of thread context switching than that of process context switching improving concurrency and parallelism, less possibility of being blocked /* 程序并行执行 在多处理器系统中,线程被内核独立调度并可在多个处 理器上运行。因此,当一个进程中含有多个线程时,进程 可分得多个CPU,实现程序并行执行
操作系统概念英文
Chapter 4 Threads
An Introduction to Chapter 5 (five parts)
Why the thread needed, the concept of threads (§4.1 Overview) thread states ( Appendix 4.A )
Operating-Systemwenku.baidu.comExamples (§4.5) Windows XP Linux
Appendixes HyperThread (HT) (Appendix 4.C) Dual-core CPU (Appendix 4.D)
4.1 Overview
4.1.1Why thread needed As described in Chapter 3, the process is as the
Basic concepts (cont.)
线程内容
tID
scheduling, a thread in a process shares with other threads that belongs to the same process its code section, data section and other resources
resources are allocated to the process, and all threads in this process share these resources
tread = thread ID + program counter + a register set + stack —— refer to Fig.4.1 and the figure in the next slide
Example
Web server program Pr multithreaded web server process more than one thread in the process each thread serves for a client access request, many clients can be served concurrently.
Why thread needed (cont.)
Benefits (P131) responsiveness resource sharing economy utilization of multiple-processor architectures
Refer to Appendix 4.A for more details about threads
unit of resource allocation unit of CPU scheduling The costs of process management, such as costs of process creation, cancellation, process switch and process communication, are somewhat high, refer to Fig.3.4, and the concurrency (or multiprogramming degree) may be limited. To reduce costs of process management and improve degrees of concurrency and parallelism, the thread is presented
§4.1 Overview
4.1.2 Basic concepts Definition of the thread
a basic unit/entity of CPU utilization, that is, the basic unit /entity for CPU scheduling
Categories and implementation (mapping) of threads ( §4.2)
In view of programmers, multithreaded programming API— —thread Libraries (§4.3)
An Introduction to Chapter 5 (cont.)
User mode
in running
state
Kernel mode
User mode
in ready or waiting
state
Fig.3.4 CPU Switch From Process to Process
Why thread needed (cont.)
In thread-supporting OS, the process is as the unit of resource allocation, while the thread as the unit of CPU scheduling and the running entity on CPU.
Merits less costs of thread context switching than that of process context switching improving concurrency and parallelism, less possibility of being blocked /* 程序并行执行 在多处理器系统中,线程被内核独立调度并可在多个处 理器上运行。因此,当一个进程中含有多个线程时,进程 可分得多个CPU,实现程序并行执行
操作系统概念英文
Chapter 4 Threads
An Introduction to Chapter 5 (five parts)
Why the thread needed, the concept of threads (§4.1 Overview) thread states ( Appendix 4.A )
Operating-Systemwenku.baidu.comExamples (§4.5) Windows XP Linux
Appendixes HyperThread (HT) (Appendix 4.C) Dual-core CPU (Appendix 4.D)
4.1 Overview
4.1.1Why thread needed As described in Chapter 3, the process is as the
Basic concepts (cont.)
线程内容
tID