Question: I was trying to understand what is the difference between process and thread and I understood all the important points but I was not able to understand this line:

> 
> The typical difference is that threads (of the same process) run in a
>  shared memory space, while processes run in separate memory spaces.
> 
> 
> 

Here is the [reference](https://stackoverflow.com/a/200473/663148).

Can anyone help me understand what does memory space means here? And what does above line means in layman terms so that I can understand?

Answer: 
If all memory in a system is a stack of paper. And each process is a little boy or girl who has it's own pile from the stack of papers on which to do their artwork. These are your applications.

Now if some of these applications are threaded, think of it like being two little girls or boys working together with the same pile of papers. They are both scribbling their creations on the same pieces of paper given to them. While other little girls and boys are not sharing their papers with each other, they are independent - single threaded.

In other words, two threads can read from the same memory and access the same global variables. i.e. memory is shared because it's the same address space.

Separate processes can't do that, they are independent of each other.
By "memory space", they mean the mapping of addresses to contents. So, for example, in two different processes, the contents of the same address may be different because they have different memory spaces.