Finals Flashcards

1
Q

thread_fork(func, args)

A

Create a new thread to run func(args)

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

thread_yield()

A

relinquish (to give up) processor voluntarily

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

thread_join(thread)

A

in parent, wait for forked thread to exit, then return

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

thread_exit

A

quit thread and clean up, wake up joiner if any

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

how do I run a thread

A
  1. Load its state (regs, PC, stack pointer) into CPU
  2. Load environment (address space, etc)
  3. Jump to the PC
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

yield()

A

Thread volunteers to give up CPU

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

Internal events that allow the dispatcher to get control back

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