4. The Abstraction: The process Flashcards
How does OS virtualize CPU? How is this technique called?
By running one process, then another, then another and so forth. This is called time-sharing of the CPU.
What makes decision on which process to run next?
Scheduling policy
What is an opposite of time-sharing?
Space-sharing.
What is a process? What are its parts?
An abstraction provided by an OS of a running program. Its parts are address space, registers, I/O information
What are the common registers used by process?
General purpose registers, program counter (or instruction pointer), stack pointer (used to store and remove data) and associated frame pointer (used to find where specific function starts in stack)
What is minimally expected from Process API?
Create, Destroy, Wait, Status, Miscellaneous Control functions.
How is process created?
OS loads program’s code and any static data into memory in address space of a process, memory is allocated for stack and heap; and I/O descriptors are set up. Then main() of program is started.
Which data structure does OS use to track state of the processes? What is a data structure with information about single process?
Process list. Process Control Block (sometimes called process descriptor)
Why it might be a good idea to run a process that issued an I/O immediately after I/O finishes?
Because it might issue another I/O operation and other processes will run while the first process is again blocked with I/O.