Question:

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

Show Hint

Threads share memory and resources within the same process but are not protected from interfering with each other by default.
Updated On: Jan 22, 2025
  • Threads can only be implemented in kernel space
  • Each thread has its own file descriptor table for open files
  • All the threads belonging to a process share a common stack
  • Threads belonging to a process are by default not protected from each other
Hide Solution
collegedunia
Verified By Collegedunia

The Correct Option is D

Solution and Explanation

Step 1: Threads in kernel/user space.
Threads can be implemented either in kernel space (kernel threads) or in user space (user threads). Statement (1) is false. Step 2: File descriptor table.
Threads of the same process share the same file descriptor table, making statement (2) false. Step 3: Shared resources.
Threads belonging to the same process share memory, file descriptors, and other resources. However, each thread has its own stack. Thus, statement (3) is false. Step 4: Protection between threads.
Threads of a process share the same address space and are not protected from each other. Hence, statement (4) is true. Final Answer: \[ \boxed{\text{(4)}} \]
Was this answer helpful?
0
0

Top Questions on Ratio and Proportion

View More Questions

Questions Asked in GATE CS exam

View More Questions