Lecture 7: Multiprogramming Flashcards
Define: Multiprogramming
Allows for the execution of multiple processes but only one process active at any time.
Define: Interleaved Execution
A single-core processor runs only 1 process at a time - however, one process’s instructions may be executed before the completion of the instructions from another process.
What is the objective of Interleaved Execution?
To have some process running at all times in order to maximize CPU utilization.
Define: Process Control Block
PCB characterizes each process. The block contains all info on a process’s/program’s state that is in execution.
What specific information does a PCB store for each process / program in execution?
1) Pointer to all Process Info (Text, Data, Stack, Heap)
2) Program Counter
3) Current values inside General-purpose registers
4) A set of operating system resources
5) PID
6) Process Priority for scheduling
7) Process State
8) A pointer to the next PCB in the Ready queue linked-list
What is the C Structure used to store the PCB?
A Struct called task_struct
How are all active process stored / represented in Linux?
- Double-Linked List of task_structs
- Kernel maintains a pointer, “current”, that points to the process currently executing on the system
How are Queues, used for the “ready” processes, implemented?
As a linked-list. A ready queue header contains pointers to the first and last final process control blocks in the list.
Define: Device Queue
List of processes waiting for a particular I/O device