P2L3 Flashcards

1
Q

PThreads are

A

POSIX Threads

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

POSIX is

A

Portable Operating System Interface

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

Birrell Thread Creation

A

fork(proc, args)

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

PThread Attributes

A
stack size
inheritance
joinable
scheduling policy
priority
system/process scope
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Zombie Thread

A

Parent thread dies

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

Data race

A

(aka race condition) thread tries to read a value while another thread modifies it

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

Mutex Safety Tips

A

Shared data should always be accessed through a single mutex
Mutex scope must be visible to all
Globally order locks
Always unlock the correct mutex

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

Condition Variable Safety Tips

A

Do not forget to notify waiting threads
When in doubt, broadcast
Yo do not need a mutex to signal/broadcast (unlock mutex first)

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