Types of Threads

Types of Threads - Types of Threads There are two types of...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
Types of Threads There are two types of Threads Kernel Threads User Level Threads
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Kernel Threads They use Preemptive scheduling . Preemptive context switch may happen at any time The OS has data structures that represent kernel threads. The OS has knowledge at these threads. Context switch is slower since it has to cross kernel/user space boundary. kernel threads of the same process may run in different processors To create a kernel thread in POSIX threads, you
Background image of page 2
They use Non-preemptive scheduling . Context switch will happen only when the thread has to wait on a call (example: read(), write(), etc) Context switch will be faster, since all the context switch happens in the user mode The OS does not keep a record of these kind of threads. the thread library implements data structures to keep track of these threads in user space. A user lever thread will have to run on top of a
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 7

Types of Threads - Types of Threads There are two types of...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online