零线程流程? [英] Zero Threaded Process?

查看:104
本文介绍了零线程流程?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一个进程中必须至少有一个线程吗?一个进程是否有可能没有任何线程,或者这没有意义吗?

Does a process have to have at least one thread in it? Is it possible for a process to be void of any threads, or does this not make sense?

推荐答案

一个进程通常至少具有一个线程. 维基百科的定义为:

A process usually has at least one thread. Wikipedia has the definition:

执行线程是操作系统可以调度的最小处理单元.线程和进程的实现因操作系统不同而异,但是在大多数情况下,线程包含在进程内部.

a thread of execution is the smallest unit of processing that can be scheduled by an operating system. The implementation of threads and processes differs from one operating system to another, but in most cases, a thread is contained inside a process.

MSDN 对此进行了备份:

处理器执行线程,而不执行进程,因此每个应用程序至少具有一个进程,并且一个进程始终具有至少一个执行线程,称为主线程.

A processor executes threads, not processes, so each application has at least one process, and a process always has at least one thread of execution, known as the primary thread.

尽管它确实会说:

一个进程可以具有零个或多个单线程单元,以及零个或一个多线程单元.

A process can have zero or more single-threaded apartments and zero or one multithreaded apartment.

这暗示着,如果单线程单元和多线程单元的数量都可以为零.但是,该过程不会做很多事情:)

Which implies that if both the number of single-threaded apartments and multithreaded apartments could be zero. However, the process wouldn't do much :)

这篇关于零线程流程?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆