2,908 views
1 votes
1 votes
Which of the following statements is incorrect?

(a)Threads are bound to a single process.

(b)It's much easier to communicate between processes than between threads.

(c)Process consumes more resources.

(d)It's easy for threads to inadvertently disrupt each other since they share the entire address space.

2 Answers

2 votes
2 votes

Ans. B

 

a) True.

  • Threads are bound to a process. A thread is the single unit of execution inside the process. The number of threads within a process can vary from one thread to many.

 

b) False

  • Threads share the same address space as the process and all other threads within the process. So threads can communicate with each other more efficiently than the process can.

 

c) True

  • Since threads exist within the process, the process consumes more resources than the thread.

 

d) True

  • Every process will have a heap and stack. 
    • Stack - > each thread will have its own stack. Not shared
    • Heap - > Common heap for all the threads. Shared
  • Now the advantage of sharing the same address space is that threads can communicate with each other more efficiently. But this also creates a problem that a single thread can affect all other threads of the same process. Thus any error happening to one thread can create issues in the shared address space, thereby causing issues to other threads. 

 

0 votes
0 votes
Option A: Threads are bound to a process. So this option is correct.

Option B:It is not easier to communicate between processes but it is easier to communicate between threads.  threads share the same address space as the process and other threads within the process, the operational cost of communication between the threads is low, which is an advantage.So option b is incorrect.

Option C:correct 

Option d:

Explanation:It's easy for threads to inadvertently disrupt each other since they share the entire address space.The threads are more vulnerable to problems caused by other threads in the same process.So according to me the reason behind is this is that they are sharing a common address space and can interrupt the functioning of any other thread(of the same process).

Related questions

1 votes
1 votes
2 answers
1
1 votes
1 votes
1 answer
2