W3 - Processes (Part II) Flashcards
(81 cards)
What two problems does process scheduling solve?
- When to switch to another process
- Which process to choose next from among the ones that are ready to run.
What is the goal of response time in process scheduling?
Minimise average and maximum wait time to make programs responsive.
What is throughput in process scheduling?
Maximising the number of processes completed in a given time.
What is turnaround time in process scheduling?
The total time from when a process is submitted to when it finishes execution.
How is turnaround time related to throughput?
Minimising turnaround time (the time from submission to completion) improves throughput.
What does efficiency/utilisation aim to achieve in scheduling?
Efficient use of resources by avoiding CPU idle time.
What is process starvation, and how should scheduling address it?
A process being denied execution or resources for too long; scheduling should prevent it.
How should time be shared among processes?
Fairly, depending on the type of process (batch jobs vs interactive).
In scheduling, when is throughput more important?
For batch jobs with lots of computations.
In scheduling, when is response time more important?
For interactive programs.
What are the main aims of process scheduling?
Minimise response time (programs must be responsive)
Maximise throughput (more processes finished by reducing turnaround time)
Maximise efficiency/utilisation (avoid idle time for CPU)
Prevent starvation
Share time fairly, prioritising throughput for batch jobs and response time for interactive jobs.
For batch (CPU-intensive) processes, what matters most in scheduling?
Throughput — completing as many processes as possible.
For interactive (I/O-intensive) processes, what matters most in scheduling?
Response time — quick reactions to user or I/O events.
Can a process change characteristics over time?
Yes, processes can shift between CPU-intensive and I/O-intensive behavior.
What is real-time scheduling concerned with?
Guaranteeing deadlines are met (e.g., braking before hitting a wall).
How does First-Come-First-Served (FCFS) scheduling assign the CPU?
Processes are assigned the CPU in the order they request it.
What happens when a new process arrives in FCFS?
It is added to the end of the Ready queue.
How does FCFS scheduling track processes?
It uses a single ready queue. Newly arrived processes are placed at the end of the queue.
Can a running process be preempted in FCFS because it runs too long?
No, FCFS is non-preemptive — a process keeps the CPU until it finishes or is interrupted by I/O.
Which type of process does FCFS favor?
CPU-intensive processes (because they hold the CPU longer).
What is a major problem with FCFS scheduling?
Short processes can get stuck waiting behind long processes.
Why is FCFS simple to implement?
It just needs a simple linked list queue.
When does FCFS work better?
When all processes are the same (or similar) length.
What are the key points of First-Come-First-Served (FCFS) scheduling?
Processes served in request order
No forced interruption for long-running processes
Favors CPU-intensive processes
Short processes can suffer delays
Simple linked list queue implementation
Best if process lengths are similar