The Gateway to Computer Science Excellence
First time here? Checkout the FAQ!
+29 votes

Which one of the following is FALSE?

  1. User level threads are not scheduled by the kernel.
  2. When a user level thread is blocked, all other threads of its process are blocked.
  3. Context switching between user level threads is faster than context switching between kernel level threads.
  4. Kernel level threads cannot share the code segment.
asked in Operating System by Veteran (96.1k points) | 3.9k views

2 Answers

+36 votes
Best answer

(D) is the answer. Threads can share the Code segments. They have only separate Registers and stack.

User level threads are scheduled by the thread library and kernel knows nothing about it. So, A is TRUE. 

When a user level thread is blocked, all other threads of its process are blocked. So, B is TRUE. (With a multi-threaded kernel, user level threads can make non-blocking system calls without getting blocked. But in this option, it is explicitly said 'a thread is blocked'.)

Context switching between user level threads is faster as they actually have no context-switch- nothing is saved and restored while for kernel level thread, Registers, PC and SP must be saved and restored. So, C also TRUE. 


answered by Loyal (7.7k points)
edited by
This is an ambiguos question. I think B and D both should be answer.
D , obviosly true
In case of B, the statement is not always true and depends on the model being used.i.e ,if one to one OR many to many model is used ,then the statement is false.

Yes @Hcas you are TRUE . Blocking a user level threads blocks all user threads ONLY in many-to-one threading model. For other models like one-to-one it is not true.

But generally, not in all the general purpose processor we have this feature of running a kernel level  thread for every user thread that  runs. Hence (D) is  more STRONGER and UNIVERSAL answer for the time being unless threading model is explicitly stated.

ok.. thanks bro :)

From the Galvin:

Many to one model

  • Maps many user level threads to one kernel thread
  • Thread library in user space provides thread management
  • If thread makes a blocking system call, the entire process will be blocked.

One ot one model

  • Maps each user thread to kernel level thread
  • Kernel provides full thread support (Makes Option A wrong)
  • If one thread makes a blocking system call, other threads can continue to run  (Makes Option B wrong)


As threads have different pc, stack, etc, they also have different code segment. hence (generally) threads do not share code segment.


+20 votes
User thread are implemented by user processes. kernel threads are implemented by OS.
OS doesn’t recognized user level threads. Kernel threads are recognized by OS.
Implementation of User threads is easy. Implementation of Kernel thread is complicated.
Context switch time is less. Context switch time is more.
Context switch requires no hardware support. Hardware support is needed.
If one user level thread perform blocking operation then entire process will be blocked. If one kernel thread perform blocking operation then another thread can continue execution.
Example : Java thread, POSIX threads. Example : Window Solaris.
answered by Loyal (9.3k points)
Good Information

@Regina Phalange 


for point 6 UserLevel

P1 have thread t1,t2,t3 another process P2 have thread T1,T2

if t1 perform blocking (Io) then P1 blocked i,e t2,t3 but not P2???

If it's independent process than yes you're right

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
71,039 users