GATE 2017 CS (CS1) – Question 28
Operating System · System Calls, Processes, Threads and IPC · 1 mark · Multiple choice
Threads of a process share
- global variables but not heap.
- heap but not global variables.
- neither global variables nor heap.
- both heap and global variables.
Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: (D) both heap and global variables.
Explanation
Threads of one process run in the same address space, so they share the global variables and the heap. Each thread has its own stack and registers.
More System Calls, Processes, Threads and IPC questions
- GATE 2014 CS (CS1) Q30 – Which thread statement is FALSE?
- GATE 2017 CS (CS2) Q17 – Which are shared by all threads of one process? I: Program counter. II: Stack. III:…
- GATE 2012 CS Q18 – A process executes fork(); fork(); fork();. How many child processes are created?
- GATE 2011 CS Q16 – User-to-kernel mode switch time is t₁; switching between two processes takes t₂. Which is…
- GATE 2011 CS Q26 – An OS maintains smaller per-thread structures than per-process structures. Which statement…
- GATE 2015 CS (CS3) Q14 – For a system with n CPUs, the maximum number of processes in the Ready state is
All System Calls, Processes, Threads and IPC questions →