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

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

问题描述

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

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天全站免登陆