Chapter 3 - Processes Flashcards
What does a process contain?
1) Program Counter
2) Stack
3) Data Section
What are the four aspects of a process?
1) Text Section
2) Stack
3) Data section
4) Heap
What is in the text section of a process?
Program code itself
What is in a process’s stack?
Temporary data such as function parameters, return addresses, and local variables
What is in a process’ data section?
Global variables
What is in a process’ heap?
Memory dynamically allocated during run-time
What is in the Process Control Block?
Information associated with each process
What information does the PCB contain on each process? (6 total)
process state, PC, CPU registers, scheduling information, accounting information, and I/O status information
What are the two types of processes and what do they mean?
I/O Bound: spends more time doing I/O (many short CPU bursts)
CPU Bound: spends more time doing computations (few long CPU bursts)
What does a context switch do?
When the CPU switches to another process, it saves the state of the old and loads the saved state of the new (from PCB)
What is the timing of a context switch depend on?
Hardware
How are child processes created?
When a parent process uses the fork() system call
What does the PID do?
Allow for process management
True or False: Parents and children can share all/some/none resources
True
True/False: Parents always wait until children terminate to execute
False