Wednesday, April 29, 2020

Operating Systems Question Bank with Answers 07

What are user level and kernel level threads, Define user level threads, Define kernel level threads


Question:

What are user level and kernel level threads?


Answer:
User Level Threads
  • User level threads are managed by a user level library however, they still require a kernel system call to operate. The kernel knows nothing about thread management and only takes care of the execution part. 
  • User level threads are typically fast. 
  • Creating threads, switching between threads and synchronizing threads only needs a procedure call. 
  • They are a good choice for non blocking tasks otherwise the entire process will block if any of the threads blocks.
Kernel Level Threads
  • Kernel level threads are managed by the OS, therefore, thread operations (ex. Scheduling) are implemented in the kernel code. This means kernel level threads may favor thread heavy processes. Moreover, they can also utilize multiprocessor systems by splitting threads on different processors or cores. 
  • They are a good choice for processes that block frequently. If one thread blocks it does not cause the entire process to block. 
  • Kernel level threads are slower than user level threads due to the management overhead. 
  • Kernel level context switch involves more steps than just saving some registers. Finally, they are not portable because the implementation is operating system dependent.

No comments:

Post a Comment

Featured Content

Multiple choice questions in Natural Language Processing Home

MCQ in Natural Language Processing, Quiz questions with answers in NLP, Top interview questions in NLP with answers Multiple Choice Que...

All time most popular contents

data recovery