Processes vs Threads

13 03 2013

A process can contain multiple threads.
When you double-click on an application (e.g. Power Point) icon, the OS starts a new process and executes the main thread of that app, which can start other threads.
An advantage of multithreading is that an application can execute different tasks at the same time.

The biggest difference between a process and a thread, is that each process has it’s own address space, while threads (of the same process) run in a shared memory space. This means that it’s possible to share data amongst threads (e.g. reading and write to the same variables) which should be carefully done, using synchronization on the shared data.