1.2.1h - multitasking (y12) Flashcards
What is multitasking?
Running multiple processes at the same time.
How does a single-core CPU multitask?
By switching rapidly between processes.
What allows multitasking to work?
The OS uses scheduling to share CPU time.
What is time slicing?
Giving each process a small time to run before switching.
What is a context switch?
Saving the state of a process and loading another.
Why is multitasking useful?
It improves CPU efficiency and user experience.
What is a process?
An instance of a running program.
What is a thread?
A smaller sequence of instructions within a process.
What does the scheduler do?
Decides which process runs next.
What is cooperative multitasking?
Processes voluntarily give up CPU control.
What is pre-emptive multitasking?
The OS decides when to switch processes.
Why must memory be managed during multitasking?
To prevent processes from interfering with each other.
What is process isolation?
Keeping processes separate in memory.
What happens if processes share memory?
Risk of crashes or security issues.
What happens if there’s not enough memory?
The OS uses virtual memory (swap).
What’s the role of interrupts in multitasking?
They allow the OS to take control and switch tasks.
What is a queue in scheduling?
List of processes waiting for CPU time.
What happens if a process never gets CPU time?
It’s called starvation.
What’s the benefit of process prioritisation?
Important tasks run before others.