Processes and Threads Flashcards
(78 cards)
A program in execution has at least a ______ counter, ____, and ___section
program, stack, data
The stack in a process contains local _______ and function _______ ________
variables, return, addresses
The ______ in a process is dynamically allocated
heap
The data section in a process contains _______ variables
global
A ___ process was just created
new
A _____ process is waiting for CPU to become available
ready
A running process is having its ________ being executed by the CPU
instructions
A waiting process is waiting for ___ or an ______
I/O, event
A ________ process is done executing
finished
A ______ ______ ______ allows the OS to maintain info about a process
Process control block
A PCB contains info about…
- Process state
- Program counter
- CPU registers
- CPU scheduling info
- Memory-management info
- Accounting info
- I/O status info
A PCB is used to switch the _____ from one process to another
CPU
The PCB in linux the represented by the ________
task_struct
The processor _______ job is the switch between processes onto the CPU for time sharing
schedulers
What two scheduling queues are processes maintained in?
Ready queue and device queue
The _____ queue contains processes residing in main memory that are ready to execute
ready
The device queue contains processes waiting for an ___ _______
I/O device
What are the four reasons a process may be kicked out of been currently executed?
- I/O request
- Time slice expired
- Fork a child
- Wait for an interrupt
A _____ ______ is when the CPU core switches from one process to another
context switch
____ describes the values of the CPU register
state
When a context switch occurs, P0’s state is stored in _____ and P1’s ____ is loaded from PCB 1 into registers
PCB0, state
The time it takes for a context switch is pure ______
overhead
Some hardware supports very quick context switches by simply change the value of a ______
pointer
_____ processes can create children processes using the _____ syscall
parent, fork