Threads and Multithreading
A thread is one line of execution inside a process (a running program). Threads in one process share its memory, so they cooperate easily but can corrupt shared data. Questions here cover how a thread differs from a process, why threads are cheaper, how user and kernel threads relate (the kernel is the core of the operating system), what a thread pool is, and why shared data needs locks (a lock lets only one thread use a piece of data at a time).
After this section you can list what threads share and what they keep private, name the three threading models, state how Linux threads work, and show a lost update with real numbers.
Topics in this section
- Thread against process
- Why use threads
- User threads, kernel threads and the models
- Linux threads
- Thread pools
- Thread safety and shared data
- Multithreading against multitasking