13,812 views
27 votes
27 votes

Which one of the following is NOT shared by the threads of the same process ?

  1. Stack
  2. Address Space
  3. File Descriptor Table
  4. Message Queue

4 Answers

Best answer
30 votes
30 votes
Stack is not shared
selected by
12 votes
12 votes

Threads Share

  • Code   
  • Data  
  • File Descriptor table
  • Address spaces 
  • Message Queue
  • heap
  • gloabal varaibles
  • accounting information

these things are shared as two threads of the same process are doing same kind of work on different instances and these things don’t get changed while they are doing the task

Threads don’t Share

  • Registers
  • program counter
  • Stack

During performing a task above things get changed so they are not shared by threads

takeaway: Things which will get changed while a task is performed and may affect other task if we use them for other task too cannot be shared.

Answer(A) Stack

edited by
10 votes
10 votes
Threads have their own stack and registers , although resources like code , data , files and memory is shared.
4 votes
4 votes
Stack,program counter and register is not shared by thread.

So A is the answer.
Answer:

Related questions

41 votes
41 votes
6 answers
1
Ishrat Jahan asked Nov 2, 2014
11,823 views
A process executes the following segment of code :for(i = 1; i <= n; i++) fork ();The number of new processes created is$n$$((n(n + 1))/2)$$2^n - 1$$3^n - 1$
15 votes
15 votes
2 answers
2
23 votes
23 votes
4 answers
4
Ishrat Jahan asked Nov 2, 2014
4,857 views
Which one of the following binary trees has its inorder and preorder traversals as $BCAD$ and $ABCD$, respectively?