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
Q

In asynchronous cancellation, One thread immediately terminates the target thread
(T/F)

A

True

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

A traditional process has a …….. thread of control

A

single

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

………….. Helps developing modern applications with hundreds of threads

A

implicit threading

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

………….. are managed without OS support

A

user threads

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

Developers identify tasks and the library maps them to ……….. threads
(User / kernel)

A

Kernel

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

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

A

False

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

A ………….. can adjust the number of threads in the pool

A

dynamic thread pool

32
Q

In ……………., If the pool is empty, the task is queued until a thread becomes free

A

Thread pool

33
Q

In …………., checking whether the target should terminate allows the target thread to terminate itself in an orderly fashion

A

Deferred cancellation

34
Q

In ………….., Threads are not constructed but parallel tasks are designated

A

Implicit fork-join

35
Q

A ………… process can perform one task at a time

A

single-threaded

36
Q

In two-level model, No need to limit the number of kernel threads on modern multicore systems
(T/F)

A

True

37
Q

…………..: A blocked thread doesn’t block the process
(Benefits of Multithreaded Programs)

A

Responsiveness

38
Q

It is very easy to implement the many-to-many model
(T/F)

A

False

39
Q

In ……………, Run-time libraries (not programmers) create and manage threads

A

implicit threading

40
Q

In ………………, Programmers identify tasks (not threads) that can run in parallel

A

implicit threading

41
Q

In …………., The target thread periodically checks whether it should terminate

A

Deferred cancellation

42
Q

…………… works well for asynchronous (independent) tasks

A

Thread pool

43
Q

……………..: Threads share the resources of the process
(Benefits of Multithreaded Programs)

A

Resource sharing

44
Q

A ….. comprises a thread ID, a PC, a register set, and a stack

A

thread

45
Q

……………. works well for tasks that are synchronous (cooperating)

A

Fork-join

46
Q

In traditional ……………, the main parent thread create one or more child threads

A

Fork-Join

47
Q

In …………….., The number of threads that can be created has no upper bound

A

explicit threading

48
Q

In Many-to-Many Model, Increasing the number of user threads does not affect system performance (T/F)

A

True

49
Q

Distribution of tasks across multiple cores

A

Task parallelism

50
Q

In ……… threading, the server creates a thread for each request

A

Explicit

51
Q

In Many-to-one model, Thread management is done in OS space by a thread library not user
(T/F)

A

False

52
Q

………..: Testing a program with many execution paths
(Multi-core Programming Challenges)

A

Testing and debugging

53
Q

In traditional ……………, the main parent thread wait for the created threads (children) to terminate

A

Fork-Join

54
Q

In ………………., The programmer writes a task as a function

A

implicit threading

55
Q

……………: Divide data between tasks that run on separate cores
(Multi-core Programming
Challenges)

A

Data splitting

56
Q

……………: Examine data to find dependencies between tasks
(Multi-core Programming
Challenges)

A

Data dependency

57
Q

A ………. is a single sequence of execution

A

Thread

58
Q

In ……….., Each new request requires creating a new thread

A

explicit threading

59
Q

In Many-to-one model, Only …….. user thread can access the kernel at a time

A

one

60
Q

In Many-to-Many model, OS creates a set of kernel threads (less than or equal to user threads)
(T/F)

A

True

61
Q

In one-to-one model, OS creates a kernel thread per user thread (can burden performance)
(T/F)

A

True

62
Q

In ……………….., The thread is discarded once it has completed its work

A

explicit threading

63
Q

A …….. is the basic unit of CPU

A

thread

64
Q

In …………………, Too many threads that work concurrently can exhaust system resources

A

explicit threading

65
Q

…………. are supported and managed directly by the OS

A

Kernel threads

66
Q

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

A

True

67
Q

………….: divide program into tasks that can run in parallel
(Multi-core Programming
Challenges)

A

Identifying tasks

68
Q

Serving a request with an existing thread is faster than creating a thread is a benefit of …………..

A

Thread pool

69
Q

Does not suffer from the drawback of the one-to-one model is a disadvantage of Many-to-Many Model
(T/F)

A

False

70
Q

A thread comprises a thread ID, a PC, a register set, and a ………

A

stack

71
Q

Refers to terminating a thread before it has completed

A

Thread Cancellation

72
Q

In …………., One thread immediately terminates the target thread

A

Asynchronous cancellation

73
Q

In traditional ……………, the main parent thread join the threads, at which point it can retrieve and combine their results

A

Fork-Join

74
Q

Modern concurrency libraries use the ………….. model

A

many-to-many

75
Q

A …….. process can perform multiple tasks at a time

A

multi-threaded