写译 — 详细讲讲进程和线程的区别?
- Author : Cyan_RA9
- 和大家分享英语写译,包括计算机英文教材,计算机基础,中英文诗词,英文名著,日常对话等,每一篇文章 我都会分别给出“原文内容”,“第一版翻译” 和 “第二版翻译”,以及“生词整理”共四部分。
- 写译 — 详细讲讲进程和线程的区别?
【原文内容】
- 进程是具有独立功能的程序在一个数据集合上运行的过程,它是系统进行资源分配和调度的独立单位。
- 进程的主要特点:
- 动态性:从创建到消亡,是动态的,具有生命周期。
- 并发性:多个进程并发执行时,会有以下3个特性:
- 间断性:并发的进程有间断运行的特点,当多个进程协同完成同一任务时,需要进行同步等操作,进而导致进程的暂停。
- 失去封闭性:并发进程会共享系统中的资源,任意进程都可能改变某个资源的状态,从而影响到其他进程。失去封闭性意味着进程的执行结果取决于其执行速度,使得进程的执行有不可再现性(每次执行的结果不一定相同);失去封闭性导致了不可再现性。
- 不可再现性:在相同的初始环境和条件下,并发执行的进程可能得到不同的结果。
- 独立性:进程能够独立运行,是资源分配的最小单位,各个进程获得的资源独立于其他进程。
- 异步性:进程以不可预知的状态向前推进。进程的并发性导致了进程的异步性。但是,通过同步与互斥,可以保证在异步性的前提下得到确定(可再现)的结果。
- 未引入线程概念时,进程有两个特点:
①是资源所有权最小单位,指一个进程拥有对资源的控制和所有权,包括内存、I/O通道、I/O设备等;
②是调度/执行的最小单位,指进程是一个可以被操作系统内核调度的独立实体。
- “线程”可以看作是在调度/执行这一属性上对进程的进一步细分——在引入线程前,进程是操作系统调度的最小单位;在引入线程且是由操作系统内核支持的线程(即内核级线程)后,线程是操作系统调度的最小单位。
【第一版翻译:(润色前,手译)】
- Process, it is the course of a program functioning on a dataset with individual function.
- Major Characteristics of Process:
- DYNAMICS: The process is dynamic from creation to death, with life cycle.
- CONCURRENCY: There will be 3 traits when processes function concurrently :
- Intermittence: Concurrent processes have a trait of Intermittence, they need operations like synchronization when ordinating with others for the same task, which will lead to the pause of processes.
- Lost Closedness: Concurrent processes will share the resources in the system, so any single process could change the state of any single kind of resource, which will influence others subsequently. Losing Closedness means that the functioning result of processes is depending on the rate of executing, causing Non-reproducibility to the performance of processes(The result of every single execution won't be certainly the same one). If we like, we could say losing Closedness causes Non-reproducibility.
- Non-reproducibility: Concurrent processes can possibly get different result under the same circumstances and conditions.
- INDEPENDENCE: Process can perform individually, it's the minimum unit of resources allocation and the gained resources of every single process are independent of others.
- ASYNCHRONY: Process goes on with an unpredicted state. The concurrency of process caused the asynchrony of process. But, we could ensure getting a certain result under the premise of asynchrony with Synchronization and Mutual Exclusion.
- Process have two special traits before introducing the concept of thread :
① the minimum unit of resource ownership, meaning that a process has both control and ownership to its resources, including memory, I/O channel, I/O devices, whatever.
② the minimum unit of performance or deployment, meaning that a process can be an individual entity deployed by Operating System's kernel.
- "Thread" can be considered as a more detailed distinction in the layer of deployment or performance——process is definitely the minimum unit of OS deployment before introducing thread, whilst thread is the minimum unit of OS deployment after introducing thread and if the thread is KLT.
【第二版翻译:(润色后,雅思水准)】
- A process is the execution of a program on a dataset, with its own individual function, serving as the independent unit for system resource allocation and scheduling.
- Major Characteristics of Process:
- DYNAMICS : A process is dynamic from creation to termination, with a life cycle.
- CONCURRENCY : There are three traits when processes execute concurrently :
- Intermittence: Concurrent processes exhibit intermittence; they require operations such as synchronization when coordinating with others for the same task, which may lead to pauses in the processes.
- Loss of Closedness: Concurrent processes share system resources, so any single process can alter the state of any resource, subsequently affecting others. Losing Closedness means that the result of processes' executions depends on their execution rate, leading to the Non-Reproducibility of the performance of processes(The outcome may differ across executions under identical conditions). If we like, we could say losing Closedness causes Non-reproducibility.
- Non-reproducibility: Concurrent processes may yield different results under the same circumstances and conditions.
- INDEPENDENCE : A process can perform individually. It is the minimum unit of resource allocation, and the gained resources of every single process are independent of others.
- ASYNCHRONY : Processes execute unpredictably. Concurrency among processes induces asynchrony. But, we could ensure getting a certain result under the premise of asynchrony with Synchronization and Mutual Exclusion.
- Before the concept of threads was introduced, processes were characterized by two special traits:
① the minimum unit of resource ownership, meaning that a process has both control and ownership over its resources, including memory, I/O channels, I/O devices, whatever.
② the minimum unit of performance or deployment, meaning that a process can be an individual entity scheduled by the Operating System kernel.
- "A thread" can be considered as a finer-grained unit at the level of deployment or performance —— Before the introduction of threads, a process was the minimum unit of OS deployment, whereas after the introduction of threads, a thread becomes the minimum unit of OS deployment if it is a KLT.
【生词整理】
- dataset:n.数据集,数据集合
- resource allocation and scheduling:phrase.资源分配和调度
- independent unit:phrase.独立单位
- DYNAMICS:n.动态性,动态,动态学,动力学
- CONCURRENCY:n.并发,并发性,同时发生
- INDEPENDENCE:n.独立性,独立,自主
- ASYNCHRONY:n.异步性,异步
- from creation to termination:phrase.从创建到消亡
- life cycle:phrase.生命周期
- Intermittence:n.间断性,周期性,间歇性
- Loss of Closedness:phrase.失去封闭性
- Non-reproducibility:n.不可再现性
- reproducibility:n.再现性,重复能力
- the rate of executing:phrase.执行速度