CST:334 Week 2
Week 2:
Working through CPU scheduling problems helped me understand how to calculate turnaround time and response time using only arrival time and duration. At first, I mixed up how round-robin and first-come, first-served scheduling worked. I thought both followed the same execution pattern, where one job finishes completely before the next begins. After running through examples, I realized that round-robin splits CPU time between jobs in small slices, causing longer total wait times for larger jobs. This changed how I saw turnaround time. A job may only need four minutes of CPU time, but if it shares the processor evenly with another, it might not finish until eight minutes later. That explained why the average turnaround time was higher than I expected in round-robin.
I also learned how to use one job’s finish time to figure out when the next job starts in non-preemptive scheduling. In first-come, first-served, each job begins when the previous one ends, unless it hasn’t arrived yet. In that case, the CPU simply waits. Once I understood that, it became easy to simulate job execution in order and track start and finish times. From there, calculating turnaround time and response time became straightforward. I now know that turnaround time is the total time a job spends in the system, and response time is how long it waits before starting. This helped me catch earlier mistakes and made scheduling behavior much clearer.
Comments
Post a Comment