edited by
2,561 views
3 votes
3 votes

Which of the following are NOT shared by the threads of the same process?

  1. Stack
  2. Registers
  3. Address space
  4. Message queue
  1. a and d
  2. b and c
  3. a and b
  4. a, b and c
edited by

2 Answers

3 votes
3 votes
Stack and Registers are not shared by threads of same process.

Threads can not share stack (used for maintaining function calls) as they may have their individual function call sequence.
0 votes
0 votes

In general each thread has its own registers (including its own program counter), its own stack pointer, and its own stack. Everything else is shared between the threads sharing a process.

Why registers cannot be shared?

Each thread needs its own program counter value. (which is a register)

Why stack cannot be shared?

Each thread may have its own calling sequence.

So, C. Stacks and Registers is correct.

Ref: https://cs.stackexchange.com/questions/48345/what-threads-share-in-general

Answer:

Related questions

1.3k
views
1 answers
1 votes
Arjun asked Jul 2, 2019
1,268 views
For a magnetic disk with concentric circular tracks, the seek latency is not linearly proportional to the seek distance due tonon-uniform distribution of ... of tracks on the periphery of the platteruse of uniform arm scheduling policies
2.4k
views
5 answers
2 votes
Arjun asked Jul 2, 2019
2,381 views
Consider a disk system with $100$ cylinders. The requests to access the cylinders occur in the following sequences:$4, 34, 10, 7, 19, 73, 2, 15, 6, 20$Assuming ... shortest seek time first policy is used?$357$ ms$238$ ms$276$ ms$119$ ms
2.1k
views
3 answers
3 votes
Arjun asked Jul 2, 2019
2,089 views
Match List-I with List-II: ... -iva-iii; b-i; c-iv; d-iia-ii; b-i; c-iv; d-iiia-ii; b-iv; c-iii; d-i
4.6k
views
4 answers
1 votes
Arjun asked Jul 2, 2019
4,618 views
Consider that a process has been allocated $3$ frames and has a sequence of page referencing as $1, 2, 1, 3, 7, 4, 5, 6, 3, 1$. What shall be ... $0$1$3$