4. Processes Flashcards
What is a process?
A running program.
What is time sharing of CPU?
Allowing users to run as many concurrent processes at the same time. This is possible because of virtualising CPU.
What is space sharing?
Allowing users to run as many concurrent processes at the same time that access a common memory resource. This is possible because of virtualising memory.
What is a mechanism?
It is the way of implementing a functionality.
What is a policy?
It is the set of rules of guidelines that govern how something should be done.
What is the difference between code and data in memory?
Code refers to the instructions that the program has, data refers to the local variables.
What is machine state?
The state of a running process
What is part of a machine state?
Memory (instructions and data), stack pointers, registers, program counter, I/O status
How are programs transformed into processes?
- The OS loads the code and data into memory
- Initialise memory for heap and stack
- Setup I/O
- Start the program by running the main() function
What are the different process states?
Running, Ready and Blocked
What data structure does the OS use to keep track of all running processes?
Process List
What is the process control block?
An individual data structure that stores information about a process.