Threads are independent subsets of processes.
There can be two types of threads:-
- User-level threads
- Kernel-level threads
When the threading is done at user-level, kernel isn't aware of it. Because Kernel just has the process table. It knows what the processes are in Main Memory; it has no thread table. The thread table is managed independently by the process. (Statement IV is True)
User-level threading can be done even when the OS doesn't support it, because OS has practically no role to play.
Since the thread table is managed independently by its process, context-switching is faster in user-level threads, as we don't have to inform the kernel. (Statement I is False)
Now since kernel is unaware of threading at the user-level, when a thread makes a system call, kernel sees it as the process making a system call. So, the whole process gets blocked, and not just the thread. (Statement II is True)
When the threading is done at kernel level, Kernel has the thread table. So, threads can be scheduled independently by the kernel. (Statement III is True)
Moreover, since each thread has to be registered in the kernel's thread table, context switching of threads in slower in kernel-level threads. But the plus point is that they can be scheduled independently, and when a kernel-level thread makes a system call, just the thread is blocked, and not the whole process.