Implementation of Thread

Share what you can. Keep separate versions only if necessary

Pasted image 20231207150352.png

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.