Chapter 4 Flashcards
Limiting the number of threads helps avoid exhausting system resources is a benefit of ………….
Thread pool
In one-to-one model, Multiple threads can run in parallel on multi-core systems (T/F)
True
A thread comprises a thread ID, a PC, a …………, and a stack
register set
In …………, Each task is mapped to a separate thread using the many-to-many model
implicit threading
Process threads share code section, ……….. , and resources
data section
Most operating systems use the ………….. model
one-to-one
……………: Thread creation has less overhead than process creation
(Benefits of Multithreaded Programs)
Economy
Process threads share ………, data section, and resources
code section
Cancellation of a target thread can be asynchronous or deferred
(T/F)
True
In Many-to-Many model, Multiple threads can run in parallel on multi-core systems
(T/F)
True
Does not suffer from the drawback of the many-to-one model is an advantage of Many-to-Many Model
(T/F)
True
Implicit fork-join is a synchronous version of the ……….
Thread pool
In Many-to-one model, The entire process will block if a thread makes a blocking system call (T/F)
True
……………: Threads can run in parallel on a multiprocessor machine
(Benefits of Multithreaded Programs)
Scalability
Distribution of data across multiple cores
Data parallelism
………………: Ensure that these tasks perform equal work of equal value
(Multi-core Programming
Challenges)
Balance
In …………, When the server receives a request, it submits it to the pool
Thread pool
In one-to-one model, When a thread makes a blocking system call, another thread cannot run (T/F)
False
In …………, A library manages the creation of threads and assigns tasks to those threads
Implicit fork-join
In one-to-one model, multiple threads can access the kernel at a given time
(T/F)
True
………… is a synchronous version of the thread pool
Implicit fork-join
In Many-to-Many model, only one thread can access the kernel at a given time
(T/F)
False
In ………….., If the pool has a thread, the request is served immediately
Thread pool
In ………….., Once a thread completes serving the request, it returns to the pool
Thread pool
In asynchronous cancellation, One thread immediately terminates the target thread
(T/F)
True
A traditional process has a …….. thread of control
single
………….. Helps developing modern applications with hundreds of threads
implicit threading
………….. are managed without OS support
user threads
Developers identify tasks and the library maps them to ……….. threads
(User / kernel)
Kernel
In Many-to-one model, Threads can run in parallel on multi-core systems (T/F)
False