Implementation of Thread
Share what you can. Keep separate versions only if necessary
What is shared and what is separate?
Shared
- code
- global variables
- heap
- file descriptor
Separate
- stack
- register values
- program counter
- instruction register
- stack pointer
- frame pointer
- etc.