What is a process?
It is a program/application in execution
What is a thread?
It is the unit of execution within a process. A process has at least one thread.
What is a PCB?
PCB stands for a Process Control Block. It is a block of memory which represents a process/task within OS. Some items in the PCB: - PID - Process state - CPU registers - Program counter - Memory limits - List of opened files - Kernel stack - Trap frame
What is a context switch in terms of OS?
It is a process of saving a state of currently executing process and restoring state of another process which is chosen to be executed on CPU.
What are the some benefits of using threads?
What data an OS kernel keeps for each process in the system?
What is CPU burst and I/O burst?
CPU burst is the time of execution of the process on CPU.
I/O burst is the time when a process is waiting for I/O for further execution
What is a short-term CPU scheduler?
It is a kernel service which selects a process from the processes in the READY queue and allocates the CPU for that process.
What is a dispatcher in the context of CPU scheduling?
Dispatcher is a module that gives a control over CPU to the process selected by the short-term scheduler.
The time it takes for the dispatcher to stop one process and start another process is known as dispatch latency.
What are criteria of a CPU scheduling algorithm?
What are states in a process lifecycle?
What is an interrupt and what its purpose?
An interrupt is a type of event in a computer system produced by a hardware to notify about change in its state or about an error.
Classify general events in a computer system?
Event types:
What happens when there is an interrupt?
What is a state of CPU?
The state of CPU is a current content of all its registers
What is a process kernel stack and why it is needed?
A process kernel stack is a special block of memory in the process memory space which is used during system calls (kernel routines).
It is necessary to have a separate kernel stack for each process in the system so the system call can be resumed if context switch happens during its execution.
What is preemptive scheduling of processes?
Preemptive scheduling is a type of scheduling when the system allocates CPU to a process for a limited time and then takes it away to another process.
Examples: Round Robin, Shortest Remaining Time First (SRTF), Priority (preemptive version)
What is non-preemptive scheduling of processes?
In non-preemptive (cooperative) systems a process gets executed on CPU until its termination or transitioning to WAIT state due to I/O. In other words, a running process completely owns the CPU and the system doesn’t interrupt its execution.
Examples: Shortest Job First (SJF), Priority (non-preemptive version)
When context switch occurs in OS?
What are two types of multi-tasking?
2. Cooperative
What is virtual memory?
VM is one of the two major abstractions in the modern computer systems which helps to solve several problems of the memory management.
What are two major abstractions used in the computer systems?
What problems Virtual Memory solves?
What is a Page Table?
PT is an array of page table entries (PTEs) that maps virtual pages to physical frames.