views:

67

answers:

2

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 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.

+6  A: 

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.

Will
I also edit my question to ask about process's meaning. Please help me.
Lu Lu
No, in MS Word, a single process owns all the editor windows. That's the typical way of doing things in GUI apps.
Will
A: 

Application = process +data

neverend