posted 21 years ago
You surely understand the concept of a "process" on your computer. When you launch a program, the result is a process; a running instance of a program. You can launch notepad.exe three times; there's one notepad.exe program -- i.e., one file named notepad.exe on your disk -- but three notepad processes.
The details differ across operating systems, but typically a process has its own stack, its own virtual address space, its own set of file descriptors, etc. Each process can more or less pretend that its the only process running on that computer; each process is fairly independent. If I create an object in one process, I can't readily pass it to another process, because each process has its own address space. A memory address that is meaningful for one process may not be meaningful for another; a pointer created in one process won't work in another process.
Also, each process believes that its instructions are executed one after the other, in order, without interruption. The operating system distributes the available CPU time among all the running processes.
Threads are sometimes called "lightweight processes." Again, the details vary slightly across operating systems, but in general, a thread is like a process, except it doesn't get its very own address space, file descriptor table, etc. It does get its own stack, but everything else it has to share with other threads. Invariably a thread "belongs to" a process; each process has one or more threads in it. Because the threads in a process share an address space, they can readily pass objects between themselves.
Make sense?