Questions: Thread Models: User-Level and Kernel Threads

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

A server uses user-level threads to handle 10 simultaneous client connections. One thread makes a blocking disk read. What happens to the other 9 threads?

AThey continue running on other CPU cores, since the user-level thread library schedules them independently
BThey all block, because the OS sees only one process and suspends it entirely while waiting for the disk
CThe OS moves them to a different process so they can continue running
DThey automatically migrate to kernel threads to bypass the blocking issue
Question 2 Multiple Choice

A developer benchmarks thread creation and finds that creating 10,000 kernel threads (1:1 model) is significantly slower than creating an equivalent number of goroutines in Go. What is the most likely explanation?

AUser-space scheduling introduces quadratic overhead when threads number in the thousands
BEach kernel thread creation requires a system call and kernel data structure allocation, which accumulates at scale; Go goroutines are multiplexed onto far fewer kernel threads
CThe 1:1 model cannot support more than a few hundred threads on any OS
DThread creation is slower in languages without garbage collection
Question 3 True / False

With user-level threads, four threads in the same process can achieve true parallelism across a four-core CPU.

TTrue
FFalse
Question 4 True / False

Kernel threads are slower to create and switch than user-level threads because all kernel thread operations require crossing the user-kernel boundary via a system call.

TTrue
FFalse
Question 5 Short Answer

What is the fundamental tradeoff between user-level and kernel-level threads, and why have most modern operating systems settled on the 1:1 model?

Think about your answer, then reveal below.