CH3 (Summarized) Flashcards
(12 cards)
________ space contains a program counter, text (code), heap, stack, and data sections.
Process memory
Process memory space contains a program counter, text (code), heap, stack, and data sections.
1) _______ section: program code itself
2) _______: temporary data (function parameters, return addresses, local variables)
3) ______ section: global variables
4) _______ : contains memory dynamically allocated during run-time
1) Text
2) Stack
3) Data
4) Heap
_________ contains information associated with each process: process state, PC, CPU
registers, scheduling information, accounting information, I/O status information
Process Control Block (PCB)
Types of processes:
________: spends more time doing I/O than computations, many short CPU bursts.
_______: spends more time doing computations, few very long CPU bursts.
I/O Bound, CPU Bound.
When CPU switches to another process, the system must save the state of the old process (to PCB) and load the saved state (from PCB) for the new process via a _____________.
context switch
T/F: Time of a context switch is dependent on hardware.
True, Context switch time is hardware-dependent because factors like CPU design, registers, cache, and memory speed impact how fast process state transitions occur.
T/F: PID allows for process management.
True.
T/F: Parents and children can share all, some or none of the resources.
True.
_______ system call creates new process.
fork()
T/F: Parents cannot execute concurrently with children.
F, Parents can execute concurrently with children or wait until
children terminate
________ system call used after a fork to replace the processes’ memory space with a new program.
exec()
Cooperating processes need _____________ through shared memory or message passing.
interprocess communication (IPC)