Expedia Interview Question
SDE-2sTeam: LSB
Country: United States
Interview Type: Phone Interview
Threads share a virtual address space (ie one thread can access another threads variables as long as it has it's address) while processes have completely different address spaces.
Each thread is given it's own run-time-stack when it's created (remember memory is just memory to assembly code). Each threads local variables are stored in each threads individual run-time-stack
Every running application constitutes a Process . Every Process can contain one or more threads.
- Chitra October 14, 2014Thread is a path of execution through the code. When a thread is created, OS assigns a set of resources - A program counter, Stack Space , Register State etc .