1/9
A set of flashcards covering key concepts about threads and concurrency relevant to operating systems.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
What is the difference between concurrency and parallelism?
Concurrency is dealing with lots of things at once (time-sharing), whereas parallelism is doing lots of things at once (actual simultaneous execution on multiple CPUs).
What system call is used in Linux to create threads?
The clone(2) system call is used to create threads in Linux.
What is Amdahl's Law?
Amdahl's Law states that the maximum speedup of a process is limited by the proportion of the process that must be done serially.
What is the primary benefit of using threads over processes?
Threads have lower memory usage and faster context switching compared to processes.
What are thread-local storage (TLS) and its use?
Thread-local storage allows each thread to have its own copy of global data, which is unique to each thread.
What is the main advantage of using thread pools?
Thread pools allow pre-created threads, which means no setup time and better management of task dispatching.
What is a common issue when debugging multi-threaded applications?
Debugging is often harder due to shared state leading to race conditions.
What happens when a thread crashes in a multi-threaded process?
If one thread crashes, the entire process may be affected; in contrast, a crashing process does not affect others.
What is the role of a CPU Scheduler in operating systems?
The CPU Scheduler is responsible for determining which process runs at any given time, optimizing CPU utilization and response time.
What is the definition of a thread ID?
A thread ID is a unique identifier assigned to each thread in a process.