Threads Lecture Overview
- 20Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
20 questions
- 1A thread is a lightweight unit of execution that belongs to a_____and can run concurrently within it.
Hint
Think of a larger container that owns resources like code, data, and files.
Answer
process
- 2Threads are used to perform multiple tasks simultaneously, improving responsiveness; for example, a game might use a thread for keyboard input and another for_____.
Hint
Consider tasks that run in parallel, like rendering or display updates.
Answer
updating the screen
- 3Threads benefit from hardware advances such as_____or multiprocessor systems, allowing parallel execution.
Hint
Multiple processing units that can execute threads simultaneously.
Answer
multi-core
- 4Compared to processes, threads are less resource-heavy because they can share code, data, and_____within the same process.
Hint
Think of resources that are not duplicated when a thread is created.
Answer
files
- 5Inter-process communication often requires message passing, which adds overhead, but threads can share resources directly because they belong to the same_____.
Hint
Same container that owns the memory and other resources.
Answer
process
- 6A thread is specifically not a process because a process has its own code, data, and files, while a thread is a_____of a process that can run multiple pieces of code simultaneously.
Hint
Consider the relationship: a thread is contained within a larger entity.
Answer
part
- 7Programmers face challenges when implementing threads, such as synchronization, deadlocks, and_____conditions.
Hint
A situation where the outcome depends on the timing of thread execution.
Answer
race
- 8In_____execution, the system performs more than one task at the exact same instant, typically on multicore systems.
Hint
Opposite of sequential execution; multiple tasks happen simultaneously.
Answer
parallel
- 9Concurrency involves multiple tasks making progress over a period of time, but only_____can execute at any given moment on a single core.
Hint
Think of time-sharing where tasks are interleaved.
Answer
one
- 10Data parallelism splits_____across multiple threads to process in parallel, such as rendering different parts of an image.
Hint
The resource that is divided among threads.
Answer
data
- 11Task parallelism involves performing different_____simultaneously, such as editing and spell-checking at the same time.
Hint
Distinct activities or functions.
Answer
tasks
- 12According to Amdahl's law, the speedup from parallelization is limited by the portion of the application that must be executed_____.
Hint
Tasks that cannot be parallelized and must run one after another.
Answer
serially
- 13If an application is 75% parallel and 25% serial, doubling cores from 1 to 2 gives a speedup of about_____times (1.6, 1.75, 1.33).
Hint
Use Amdahl's law: Speedup = 1 / (S + (1-S)/N).
Answer
1.6
- 14Thread libraries such as Pthreads (POSIX), Windows threads, and Java threads provide APIs for programmers to create and manage_____.
Hint
The execution units that can run concurrently.
Answer
threads
- 15In the many-to-one thread model, many user threads are mapped to a single_____thread, which can block all if any thread performs a blocking operation.
Hint
The thread managed by the operating system.
Answer
kernel
- 16Windows and Linux use the one-to-one thread model, where each user thread maps to exactly one_____thread.
Hint
The operating system-level thread that can run in parallel.
Answer
kernel
- 17The two-level thread model combines many-to-many with the ability to_____a user thread to a specific kernel thread for dedicated handling.
Hint
A term similar to attaching or assigning.
Answer
bind
- 18In Windows, the thread context is managed by an executive thread that points to a kernel thread, which points to the actual user thread; the set of registers and stack is called the thread_____.
Hint
The state information needed to resume a thread.
Answer
context
- 19Linux treats threads as tasks and uses the_____system call to create a new thread, allowing selective sharing of resources like memory and files.
Hint
Name of the system call that creates a new task with shared resources.
Answer
clone
- 20A system call is how a user process requests a service from the_____system, such as file I/O or thread creation.
Hint
The software that manages hardware and provides services.
Answer
operating

Ask anything
We've read this whole study set, so questions about it get the best answers.