محاضرة 7
CPU Scheduling Basics and Criteria
Schedulers types and performance measurement criteria.
يلا نشوف الملخص
Lecture 7 Summary: Scheduling Essentials
1. The Concept of Scheduling
- CPU Scheduling: The process by which the OS decides which process in the "Ready Queue" gets the CPU next.
- Goal: Maximum CPU utilization (keeping the CPU busy all the time).
2. Schedulers Types
- Long-term Scheduler (Job Scheduler): Decides which processes are brought from the disk into memory (Ready Queue). Controls the degree of multiprogramming.
- Short-term Scheduler (CPU Scheduler): Selects from the processes in memory that are ready to execute and allocates the CPU to one of them. It must be very fast.
- Medium-term Scheduler (Swapper): Temporarily removes processes from memory (swapping them to disk) to reduce the degree of multiprogramming or free up memory.
3. Process Behavior
- I/O-Bound Process: Spends more time doing I/O than computations (many short CPU bursts).
- CPU-Bound Process: Spends more time doing computations (few very long CPU bursts).
4. Scheduling Criteria (How to measure performance)
- CPU Utilization: Keep the CPU as busy as possible (Ideally 40% to 90%).
- Throughput: Number of processes that complete their execution per time unit.
- Turnaround Time (TAT): Total time from submission to completion ($TAT = Completion\ Time - Arrival\ Time$).
- Waiting Time (WT): Total time a process spends waiting in the ready queue ($WT = TAT - Burst\ Time$).
- Response Time (RT): Time from submission until the first response is produced (important in interactive systems).
في نقطة مش واضحة؟ بطبط موجود!
اسأل بطبط عنها