Q1. Consider the following jobs: Job # | Arrival time | Run time ---|---|--- A | 0 | 2 B | 2 | 3 C | 3 | 1 D | 5 | 6
- CPU scheduling optimizes system performance by allocating CPU to processes.
- First-Come, First-Served (FCFS) executes jobs in arrival order, non-preemptively.
- Shortest Remaining Time First (SRTF) is a preemptive algorithm prioritizing shortest remaining job.
- Turnaround Time (TT) = Completion Time - Arrival Time, measuring total time in system.
Answer: CPU scheduling is a fundamental operating system function that determines which process in the ready queue is allocated the CPU. Its primary goal is to maximize CPU utilization and throughput while minimizing turnaround time, waiting time, and response time. The provided jobs will be analyzed using two common scheduling algorithms: First-Come, First-Served (FCFS) and Shortest Remaining Time First (SRTF), to illustrate their performance metrics. Key performance metrics for evaluating CPU schedul...