Q1 Interrupts and traps, differencies.
A1 An interrupt is caused by an external event
asynchronous
unpredictable
A trap is caused by the program, an internal event
synchronous
predictable
reproducible
Q2 What is Process Control Block?
The collection of process information is represented in the operating system by a data structure element called process control block (PCB) . Consists of:
An executable program (code)
Associated data needed by the program (global data, stack)
Execution context (or state) of the program;
Q3 What is Context Switch?
Switching between processes is termed as context switch. When the CPU switches to another process, the system must save the state of the old process and load the saved state for the new process;
Context-switch time is overhead
Context switching can be critical to performance