Tirgul 4 Flashcards

1
Q

Do threads share a heap?

A

Yes

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

Do threads share a stack?

A

No, every thread has its own stack

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

In kernel level threads, where are the thread descriptors stored?

A

In the PCB. The PCB has holds pointers to all of the thread descriptions that the process has.

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

In user level threads, where are the thread descriptors stored?

A

Inside the heap.

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

Processes vs. Kernel Threads vs. User Threads:

Interactions between instances

A

Processes: protected from each other, require the OS to communicate

Kernel and User Threads: Share address space, simple communication

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

Processes vs. Kernel Threads vs. User Threads:

Context switch overhead

A

Processes: High overhead, since all operations require a kernel trap, significant work.
Kernel Threads: medium overhead. Operations require kernel trap but little work.

User Threads: Low overhead, everything is done at user level

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