Chapter 4 - Threads Flashcards

1
Q

What is a thread?

A

A fundamental unit of CPU utilization that forms the basis of multi-threaded computer systems

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

How does process creation compare to thread creation?

A

Process creation is heavy-weight while thread creation is light-weight

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

What are the specific advantages of thread creation vs process creation?

A

It can simplify code and increase efficiency

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

Are kernels generally single-threaded or multi-threaded?

A

Multi-threaded

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

What are the three multi-threading models?

A

1) Many-to-One
2) One-to-One
3) Many-to-Many

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

What is the Many-to-One multi-threading model?

A

Many user-level threads mapped to a single kernel thread

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

What is the One-to-One multi-threading model?

A

Each user-level thread maps to a kernel thread

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

What does the thread library provide?

A

Provided programmer with API for creating and managing threads

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

What are the four issues faced when using threads?

A

1) Thread cancellation
2) Signal Handling
3) Thread-Specific Data Handling
4) Scheduler Activations

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

What are the types thread cancellation?

A

Asynchronous and deferred cancellation

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

What is asynchronous thread cancellation?

A

Terminating the target thread immediately

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

What is deferred thread cancellation?

A

Allowing the target thread to periodically check if it should be cancelled

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

What is the signal handler?

A

Processes signals generated by a particular event, delivers to a process, where it is handled

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