The journey time is split into two parts: time actually running on the CPU (BTi) and time not running (waiting in queue). So:
TATi=BTi+WTi⇒WTi=TATi−BTi
(For preemptive schedulers WT still equals "time in system minus time spent on CPU"; if the process is preempted, the queued gaps just add up inside WT.)
Time in system = burst + waiting, so WTi=TATi−BTi.
Define response time.
RTi=STi−ATi: arrival to first time the process gets the CPU.
Why can RT differ from WT?
With preemption a process starts early (low RT) but is interrupted and waits more later, so RT≤WT in general.
Formula for CPU utilization?
U=Tbusy/Ttotal×100% = fraction of wall-clock time doing useful work.
Formula for throughput?
Ncompleted/Ttotal — completed processes per unit time.
Which scheduler provably minimizes average waiting time?
Shortest Job First (SJF) for a given set of jobs.
A CPU idle 2 of 10 units — utilization?
8/10=80%.
Why isn't 100% utilization automatically good?
It can hide backlog/thrashing with awful response and turnaround for users.
Which metrics matter to the user vs the system owner?
User: response & turnaround; System owner: utilization & throughput.
Recall Feynman: explain to a 12-year-old
Imagine a single checkout counter (the CPU) and customers (processes). Turnaround = how long you were in the shop, door to door. Waiting = time standing in line, not being served. Response = how long until the cashier first says "hi" to you. Utilization = how much of the day the cashier was actually scanning items instead of idle. Throughput = how many customers got served per hour. A good manager wants the cashier always busy AND customers happy — but rushing some customers makes others wait. You have to choose what "fair" means.
Dekho, CPU scheduler ek referee jaisa hai jo decide karta hai ki ready queue me se kaunsa process ab CPU lega. Lekin "achha scheduling" har kisi ke liye alag matlab rakhta hai. System ka owner chahta hai CPU hamesha busy rahe (utilization) aur zyada se zyada kaam khatam ho (throughput). User chahta hai uska kaam jaldi ho (turnaround) aur screen turant react kare (response). Yeh sab cheezein hum numbers me measure karte hain, taaki do schedulers ko compare kar saken.
Sabse important relation yaad rakho: TAT = WT + BT. Yaani total time jo process system me bitata hai = uska actual CPU kaam (burst) + line me wait. Isi se WT = TAT − BT nikalta hai. TAT = CT − AT (jab process khatam hua minus jab aaya). RT = Start − AT yaani pehli baar CPU milne tak ka time. In char timestamps (AT, BT, ST, CT) se baaki sab derive ho jaata hai — Gantt chart bana ke nikaal lo.
Ek important baat: aap saari cheezein ek saath maximize nahi kar sakte. Agar response time kam karna hai to Round Robin se baar-baar switch karna padta hai, jisse context-switch overhead badhta hai aur average turnaround badh sakta hai. Yeh trade-off hi pura chapter ka dil hai. Aur 100% utilization hamesha achhi baat nahi — andar backlog ho sakta hai jisme users ko bura response mil raha ho.
Exam tip (80/20): bas yeh 5 metrics aur unke formula clear kar lo, ek Gantt chart practice kar lo (FCFS, SJF, Round Robin), aur common galti — WT ko TAT samajhna — avoid karo. Itne me hi 80% questions aaram se nikal jaayenge.