Finals Flashcards
1
Q
thread_fork(func, args)
A
Create a new thread to run func(args)
2
Q
thread_yield()
A
relinquish (to give up) processor voluntarily
3
Q
thread_join(thread)
A
in parent, wait for forked thread to exit, then return
4
Q
thread_exit
A
quit thread and clean up, wake up joiner if any
5
Q
how do I run a thread
A
- Load its state (regs, PC, stack pointer) into CPU
- Load environment (address space, etc)
- Jump to the PC
6
Q
yield()
A
Thread volunteers to give up CPU
7
Q
Internal events that allow the dispatcher to get control back
A