Skip to content
Official PYQ · 2024

GATE CS 2024 Set 1 Q14 — Processes and Threads

Explain with AI

Which of the following statements about threads is/are TRUE?

Choose one option
View worked solution

Answer: D

To determine the correct statement, let's analyze each option in detail:

  • Option A: Threads can only be implemented in kernel space (Incorrect)
    Threads can be implemented at both the user level (using user-space thread libraries like POSIX Pthreads, where the kernel is unaware of the threads) and the kernel level (where the OS kernel manages the threads directly).
  • Option B: Each thread has its own file descriptor table for open files (Incorrect)
    All threads belonging to a single process share the same resources, including the address space, global variables, and the file descriptor table. If one thread opens or closes a file, it affects all other threads in that process.
  • Option C: All the threads belonging to a process share a common stack (Incorrect)
    Each thread has its own independent execution path. To support independent function calls, local variables, and return addresses, each thread must have its own private stack and register set (including the Program Counter).
  • Option D: Threads belonging to a process are by default not protected from each other (Correct)
    Because all threads of a process share the same virtual address space (including the heap and global data), any thread can access or modify the memory of any other thread. There is no default hardware-enforced memory protection between threads of the same process, unlike processes which have isolated address spaces.

Thus, only statement D is true.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Processes and Threads questions