开发者

What is application and process?

开发者 https://www.devze.com 2022-12-23 08:21 出处:网络
An application consists of one or more processes. A process, in the simplest terms, is an executing program. One or more threads run in the context of the process. A thread is the basic unit to which

An application consists of one or more processes. A process, in the simplest terms, is an executing program. One or more threads run in the context of the process. A thread is the basic unit to which the operating system allocates processor time. A thread can开发者_如何学Go execute any part of the process code, including parts currently being executed by another thread. Source: http://msdn.microsoft.com/en-us/library/ms684841%28VS.85%29.aspx

I understand about thread, but I can't distinguish between application & process. What is application? What is process? How do an application have more than 1 process? And please give me an example in C#. Thanks.

Update: I have another question about WinWord. When you run WinWord application, a editor window will open. And from this window, you click on New button on Toolbar, 2nd editor window will open. Question: Is the 2nd window running in another process? If yes, why I use Task Manager, I only see one WinWord process name. Thanks.


While "process" and "thread" have well-defined meanings, "application" doesn't, at least on the Windows platform. Usually there's a one-to-one correspondence between "application" and "process", but an application may be implemented as a suite of processes that work together to solve a particular problem.

For example, VMWare Workstation is an application. It may involve several processes running together to accomplish its goals, for instance vmware.exe, vmware-authd.exe, and others.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号