Chapter 4 Flashcards

1
Q

Limiting the number of threads helps avoid exhausting system resources is a benefit of ………….

A

Thread pool

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

In one-to-one model, Multiple threads can run in parallel on multi-core systems (T/F)

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

A thread comprises a thread ID, a PC, a …………, and a stack

A

register set

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

In …………, Each task is mapped to a separate thread using the many-to-many model

A

implicit threading

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Process threads share code section, ……….. , and resources

A

data section

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Most operating systems use the ………….. model

A

one-to-one

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

……………: Thread creation has less overhead than process creation
(Benefits of Multithreaded Programs)

A

Economy

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Process threads share ………, data section, and resources

A

code section

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Cancellation of a target thread can be asynchronous or deferred
(T/F)

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

In Many-to-Many model, Multiple threads can run in parallel on multi-core systems
(T/F)

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Does not suffer from the drawback of the many-to-one model is an advantage of Many-to-Many Model
(T/F)

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Implicit fork-join is a synchronous version of the ……….

A

Thread pool

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

In Many-to-one model, The entire process will block if a thread makes a blocking system call (T/F)

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

……………: Threads can run in parallel on a multiprocessor machine
(Benefits of Multithreaded Programs)

A

Scalability

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Distribution of data across multiple cores

A

Data parallelism

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

………………: Ensure that these tasks perform equal work of equal value
(Multi-core Programming
Challenges)

A

Balance

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

In …………, When the server receives a request, it submits it to the pool

A

Thread pool

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

In one-to-one model, When a thread makes a blocking system call, another thread cannot run (T/F)

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

In …………, A library manages the creation of threads and assigns tasks to those threads

A

Implicit fork-join

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

In one-to-one model, multiple threads can access the kernel at a given time
(T/F)

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

………… is a synchronous version of the thread pool

A

Implicit fork-join

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

In Many-to-Many model, only one thread can access the kernel at a given time
(T/F)

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

In ………….., If the pool has a thread, the request is served immediately

A

Thread pool

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

In ………….., Once a thread completes serving the request, it returns to the pool

A

Thread pool

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
In asynchronous cancellation, One thread immediately terminates the target thread (T/F)
True
26
A traditional process has a ........ thread of control
single
27
.............. Helps developing modern applications with hundreds of threads
implicit threading
28
.............. are managed without OS support
user threads
29
Developers identify tasks and the library maps them to ........... threads (User / kernel)
Kernel
30
In Many-to-one model, Threads can run in parallel on multi-core systems (T/F)
False
31
A .............. can adjust the number of threads in the pool
dynamic thread pool
32
In ................, If the pool is empty, the task is queued until a thread becomes free
Thread pool
33
In ............., checking whether the target should terminate allows the target thread to terminate itself in an orderly fashion
Deferred cancellation
34
In .............., Threads are not constructed but parallel tasks are designated
Implicit fork-join
35
A ............ process can perform one task at a time
single-threaded
36
In two-level model, No need to limit the number of kernel threads on modern multicore systems (T/F)
True
37
..............: A blocked thread doesn’t block the process (Benefits of Multithreaded Programs)
Responsiveness
38
It is very easy to implement the many-to-many model (T/F)
False
39
In ..............., Run-time libraries (not programmers) create and manage threads
implicit threading
40
In .................., Programmers identify tasks (not threads) that can run in parallel
implicit threading
41
In ............., The target thread periodically checks whether it should terminate
Deferred cancellation
42
............... works well for asynchronous (independent) tasks
Thread pool
43
.................: Threads share the resources of the process (Benefits of Multithreaded Programs)
Resource sharing
44
A ..... comprises a thread ID, a PC, a register set, and a stack
thread
45
................ works well for tasks that are synchronous (cooperating)
Fork-join
46
In traditional ..............., the main parent thread create one or more child threads
Fork-Join
47
In ................., The number of threads that can be created has no upper bound
explicit threading
48
In Many-to-Many Model, Increasing the number of user threads does not affect system performance (T/F)
True
49
Distribution of tasks across multiple cores
Task parallelism
50
In ......... threading, the server creates a thread for each request
Explicit
51
In Many-to-one model, Thread management is done in OS space by a thread library not user (T/F)
False
52
...........: Testing a program with many execution paths (Multi-core Programming Challenges)
Testing and debugging
53
In traditional ..............., the main parent thread wait for the created threads (children) to terminate
Fork-Join
54
In ..................., The programmer writes a task as a function
implicit threading
55
...............: Divide data between tasks that run on separate cores (Multi-core Programming Challenges)
Data splitting
56
...............: Examine data to find dependencies between tasks (Multi-core Programming Challenges)
Data dependency
57
A .......... is a single sequence of execution
Thread
58
In ..........., Each new request requires creating a new thread
explicit threading
59
In Many-to-one model, Only ........ user thread can access the kernel at a time
one
60
In Many-to-Many model, OS creates a set of kernel threads (less than or equal to user threads) (T/F)
True
61
In one-to-one model, OS creates a kernel thread per user thread (can burden performance) (T/F)
True
62
In ...................., The thread is discarded once it has completed its work
explicit threading
63
A ........ is the basic unit of CPU
thread
64
In ....................., Too many threads that work concurrently can exhaust system resources
explicit threading
65
............. are supported and managed directly by the OS
Kernel threads
66
In Many-to-Many model, When a thread makes a blocking system call, another thread can run (T/F)
True
67
.............: divide program into tasks that can run in parallel (Multi-core Programming Challenges)
Identifying tasks
68
Serving a request with an existing thread is faster than creating a thread is a benefit of ..............
Thread pool
69
Does not suffer from the drawback of the one-to-one model is a disadvantage of Many-to-Many Model (T/F)
False
70
A thread comprises a thread ID, a PC, a register set, and a .........
stack
71
Refers to terminating a thread before it has completed
Thread Cancellation
72
In ............., One thread immediately terminates the target thread
Asynchronous cancellation
73
In traditional ..............., the main parent thread join the threads, at which point it can retrieve and combine their results
Fork-Join
74
Modern concurrency libraries use the .............. model
many-to-many
75
A ........ process can perform multiple tasks at a time
multi-threaded