The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
x
+22 votes
3k views

Consider the following statements about user level threads and kernel level threads. Which one of the following statements is FALSE?

  1. Context switch time is longer for kernel level threads than for user level threads.

  2. User level threads do not need any hardware support.

  3. Related kernel level threads can be scheduled on different processors in a multi-processor system.

  4. Blocking one kernel level thread blocks all related threads.

asked in Operating System by Veteran (52k points) | 3k views

2 Answers

+40 votes
Best answer

Answer: (D)

  1. Context switch time is longer for kernel level threads than for user level threads. $-$ This is True, as Kernel level threads are managed by OS and Kernel maintains lot of data structures. There are many overheads involved in Kernel level thread management, which are not present in User level thread management !

  2. User level threads do not need any hardware support.$-$ This is true, as User level threads are implemented by Libraries programmably, Kernel does not sees them.

  3. Related kernel level threads can be scheduled on different processors in a multi-processor system.$-$ This is true.

  4. Blocking one kernel level thread blocks all related threads. $-$ This is false. If it had been user Level threads this would have been true, (In One to one, or many to one model !) Kernel level threads are independent.

answered by Boss (41k points)
edited by
+7
can user level threads be scheduled on different processors in a multi-processor system.??
0
great answer!
+1
In point 4, not in the one-to-one model I think! Since each user level thread has a corresponding kernel level thread!
+8

Hi @sushmita ji,

can user level threads be scheduled on different processors in a multi-processor system.?

NO. Because User level threads are transparent to the kernel. And Kernel can schedule process. Please correct  me if i am wrong. 

0
If it is One-One  then not possible, but if it is Many-One or Many-Many then possible
+1
"can user level threads be scheduled on different processors in a multi-processor system.??"

No because  user level thread not known to OS but kernal level thread be scheduled on different processor Because Kernal level thread work like a process because of these thread already known to OS only difference in kernal level thread is they are lighter than process .
0

@Shaik Masthan

@tusharp

blocking one user level therads will block other threads ..this is posiible only in many to one mapping right ?

In one to one it blocking one user level thread will not block other as other is mapped to different kernel level therad ...Please correct if wrong..what about many to many mapping ??

+10 votes

D is False.

Kernel Level Threads are independent of each other.

Ref: http://www.personal.kent.edu/~rmuhamma/OpSystems/Myos/threads.htm

answered by Boss (19.9k points)
–1
Ans should be C). As kernel level threads are processor dependent. They cant run on different processors.
+1
Answer is D. Related kernel threads are usually not scheduled in different processors to minimize cache misses since cache build by one thread can be used by different related thread. Otherwise an unrelated thread would first cause many cache misses before stabilizing. But the scheduler is free to give any thread to any processor.
Answer:

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
49,535 questions
54,122 answers
187,321 comments
71,039 users