Machine-translated by Google. Questions are authored in English.
Top

Discussion

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

  • A.Threads can only be implemented in kernel space
  • B.Each thread has its own file descriptor table for open files
  • C.All the threads belonging to a process share a common stack
  • D.Threads belonging to a process are by default not protected from each other

Answer: D

The true statement is Threads belonging to a process are by default not protected from each other.

Threads of one process share its address space, open files and other resources. Any thread can read or overwrite memory used by another, so the operating system provides no protection between them; protection exists between processes.

The other statements are false. Threads can be implemented in user space by a thread library as well as in the kernel. The file descriptor table belongs to the process and is shared by all its threads. Each thread has its own stack, along with its own registers and program counter, because each runs its own sequence of function calls.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.