Which of the following statements about threads is/are TRUE?
GATE CSE 2024Operating System › Process Concepts, Threads & System CallsVerified
GATE CSE 2024 PYQ: Which of the following statements about threads is/are TRUE?
- AThreads can only be implemented in kernel space
- BEach thread has its own file descriptor table for open files
- CAll the threads belonging to a process share a common stack
- DThreads belonging to a process are by default not protected from each otherCorrect answer
Answer
(D) Threads belonging to a process are by default not protected from each other
Approach
Evaluate each statement against standard OS thread model: threads within a process share address space, code, data, heap, and file descriptor table, but each has its own stack, registers, and program counter. Also, threads may be implemented in user space, kernel space, or both.
Only statement D is true: threads in the same process share memory and are not protected from one another by default. A, B, and C are false because threads can be user-level, share one file descriptor table, and each has a separate stack.
Reviewed by GateIQ Editorial Team: IIT & IISc Alumni.