0

For some reason I cannot find the answers to this. Multiple threads can be associated with the same process. It's called a multithreaded process. One of the good things about multithreaded processes is that they share resources. But what resources do they share, and what resources do they not share?

I know there are both shared resources among threads of the same process, and there are resources that may not be shared among threads of the same process.

tk421x
  • 57
  • 1
  • 7
  • 1
    Please [edit] your question to indicate what CPU architecture and threading library/language you're asking about. Thanks for improving the question's reference value and making it more answerable! – Nathan Tuggy May 04 '15 at 02:24
  • possible duplicate of [What is the difference between a process and a thread](http://stackoverflow.com/questions/200469/what-is-the-difference-between-a-process-and-a-thread). Several answers can clarify things for you. – UmNyobe May 04 '15 at 07:02

1 Answers1

0
  1. They share a common view of memory. A pointer created in one thread is useable in another. Similarly, a value set in one thread will, with caveats, be visible in another thread.

  2. They do not share a stack. Their stacks are located at different addresses in memory.

merlin2011
  • 71,677
  • 44
  • 195
  • 329