in Operating System
1,730 views
5 votes
5 votes
Assume that process A has 3 user level threads and process B has 4 kernel-level threads. Consider while process A is running in CPU, process B is waiting in ready queue. If one of the thread in A is blocked then find status of A threads and B threads?

A. All A threads are blocked and all B threads are blocked.

B. All A threads are blocked and B threads are not blocked.

C. All B threads are blocked and A threads are not blocked.

D. None.
in Operating System
by
1.7k views

3 Comments

B is right .
0
0
Yes (B) is correct.
1
1
Reason, A is in runnug and B is waiting to get it's turn. So, when A is not in execution stage, B got it's turn to execute.
1
1

2 Answers

6 votes
6 votes
Blocking is one main problem of user level thread.

'here if one thread is blocked then all of them in it get  blocked

but in kernel level thread case is not the same

A is in user level

so A is blocked whereas B is not

B is the answer
edited by

2 Comments

i have read in galvin that....if one thread calls for blocking state the other threads will be blocked only in case of many to one model....for other models this will not happen...so how we generalise this concept to statement that every time it is blocked ??
3
3

@vamp_vaibhav yes that is correct. Question is wrongly framed.

0
0
0 votes
0 votes
B is correct
Answer:

Related questions