24,260 views
53 votes
53 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.

3 Answers

Best answer
63 votes
63 votes

(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. 

Reference: http://www.cs.cornell.edu/courses/cs4410/2008fa/homework/hw1_soln.pdf

edited by
34 votes
34 votes
USER LEVEL THREAD KERNEL LEVEL THREAD
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.
Answer:

Related questions

27 votes
27 votes
2 answers
1
24 votes
24 votes
4 answers
4
go_editor asked Sep 26, 2014
7,257 views
Assume that there are $3$ page frames which are initially empty. If the page reference string is $\text{1, 2, 3, 4, 2, 1, 5, 3, 2, 4, 6}$ the number of page faults using ...