Processes and Threads Flashcards
System initialization, execution of creation syscall, user requesting
Process creation
normal exit, program exit, fatal error, or killed by another process
Process termination
blocked, running or ready
Process state
Cannot transition from ready to ______ or blocked to _______
blocked, running
Processes that remain in the background
Daemon
Stores information about the process, including PC, stack pointer, process state
Process table
U=1-p^n
CPU utilization formula
Enable parallelism with blocking syscalls
Threads
Faster to create and destroy
Threads
Natural for multiple cores
Threads
Easier programming model
Threads
Memory is shared
Threads
Better for I-O bound tasks
Threads
Thread table contains information so runtime system can manage. If thread blocks, rts stores thread info in table and finds new thread
Threads in userspace - the good
State save and scheduling are invoked faster than in kernel
Threads in userspace - the good
Cannot execute blocking system calls
Threads in userspace - the bad
Do not voluntarily give up CPU
Threads in userspace - the bad
Kernel keeps same thread table as user table
Threads in kernelspace - the good
If thread blocks, can just choose another
Threads in kernel space - the good