Zybook Ch2: Processes, Threads, and Resources Flashcards
What is a process?
an instance of a program being executed by an OS
Ex: the OS creates a new process when a user opens a new application
What is the OS organized as?
The OS is organized as a collection of processes
How does the OS keep track of each process?
Process Control Blocks (PCB)
What is a process control block (PCB)?
A data structure that holds information for a process, including the current instruction address, the execution stack, the set of resources used by the process, and the program being executed. The PCB is the concrete representation of a process.
What are the 3 basic states that are implemented by most OSs for a process?
Running state (running)
Ready state (ready)
Blocked state (blocked)
What is the running state?
When the process has all necessary resources and the CPU is actively executing the program’s instructions.
What is the ready state?
When the process has all necessary resources to run but the CPU is currently unavailable.
What is the blocked state?
When the process is waiting on a currently unavailable resource.
What is the new state?
State a newly created process is placed into before the process is allowed to compete for the CPU
What is the terminated state?
The state the process is placed into when execution can no longer continue but the PCB has not been deleted.
What is the suspended state?
The state the process is placed into even though the CPU and all resources are available?
What is a context switch?
The transfer of control from one process to another?
What is the CPU state?
All of the intermediate values held in any CPU registers and hardware flags at the time of interruption.
What is a physical CPU?
The real hardware instance of a CPU
What is a virtual CPU?
A CPU the process thinks is available only to itself. Occurs when multiple processes run on one physical CPU using time sharing
What is a virtual CPU in relation to the physical CPU?
it can be an abstraction of the physical CPU or it can be a software that emulates the behavior of a different CPU