Which of these do threads of the same process share?
A
Nothing; each thread has private memory
B
Their individual call stacks
C
Program counter and registers
D
Code, data and heap memory
Correct answer
Correct answer
D. Code, data and heap memory
11 views
⚔️
Challenge a friend on Operating Systems
Same MCQs, timed, live leaderboard. Send the link on WhatsApp – no sign-up needed.
Create challenge
Explanation
Threads share the process's address space (code, global data, heap and open files), which makes communication fast. Each thread has its own stack, registers and program counter.
Reference
Asked in: GATE CS, NTS, PPSC
Doubts & discussionNot sure why the answer is D? Ask here and get an explanation.
Ask a doubt about this MCQ
‹ Previous MCQ A semaphore initialised to 1 and used for mutual exclusion is known as a: Next MCQ › Internal fragmentation is most closely associated with: