GATE | Sudo GATE 2020 Mock III (24 January 2019) | Question 34

Which of the following is/are shared by all the threads in a process?

I. Program Counter
II. Stack
III. State
IV. Registers 

(A) I and II only
(B) III only
(C) I and III only
(D) None of these.


Answer: (D)

Explanation: Threads share:

  • Address space
  • Heap
  • Static data
  • Code segments
  • File descriptors
  • Global variables
  • Child processes
  • Pending alarms
  • Signals and signal handlers
  • Accounting information

Threads have their own:

  • Program counter
  • Registers
  • Stack
  • State

Option (D) is correct.

Quiz of this Question

My Personal Notes arrow_drop_up
Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.