retagged by
4,002 views
3 votes
3 votes

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

  1. Threads can only be implemented in kernel space
  2. Each thread has its own file descriptor table for open files
  3. All the threads belonging to a process share a common stack
  4. Threads belonging to a process are by default not protected from each other
retagged by

2 Answers

5 votes
5 votes

Correct Answer - Option D

let's go through the options one after the other

  1. Threads can only be implemented in kernel space -  This is false as we can implmenet threads in userspace with help of Kernel threads (Refer DInosaur book) 
  2. A process block has a single file descriptor, All the threads belonging to the process share the same descriptor along with data segment, heap, code.. 
  3. All threads share a common Memory address space but not the same stack, we augment multiple stacks in the same address space belonging to a process for each of the threads, this allows for parallel execution of the threads. 
  4. Since all the threads belong to the same process, results obtained by one thread might be used by another thread to continue with execution (critical section problem). Hence by definition userlevel threads are not protected from one another and the job of maintianing protection is left to the developer. 
1 votes
1 votes

Answer : D
A) User Level Thread are also present which are created by user, which are not implemented in Kernel Space. [ FALSE ]
B) Each Process has File Descriptor , and thread belonging to that process share among themselves. [ FALSE]

C) All the threads belong to process share Heap Memory , each thread has its own stack . [ FALSE ]
D) Yes, By default the threads are not protected from each other , they might end up using the false results for the execution. [ TRUE ]

Answer:

Related questions

2.8k
views
2 answers
1 votes
Arjun asked Feb 16
2,844 views
Consider the following two threads $\mathrm{T} 1$ and $\mathrm{T} 2$ that update two shared variables $\mathrm{a}$ and $\mathrm{b}$ ...
3.9k
views
1 answers
5 votes
Arjun asked Feb 16
3,869 views
Which of the following process state transitions is/are NOT possible?Running to ReadyWaiting to RunningReady to WaitingRunning to Terminated
4.5k
views
2 answers
7 votes
Arjun asked Feb 16
4,498 views
Which of the following statements about a relation $\mathbf{R}$ in first normal form $\text{(1NF)}$ is/are TRUE?$\mathbf{R}$ can have a multi- ... $\mathbf{R}$ cannot have more than one candidate key