Skip to main content

Scheduling assessment calibration

  • PS1: A(0,4), B(2,1), q=2 gives A[0,2), B[2,3), A[3,5). A passing explanation admits B before requeueing A. Alphabetical sorting of same-time arrivals violates this contract.
  • PS2: A(0,8), B(0,2), q=2 has completions 10,4, responses 0,2 and waits 2,2. A job arriving at 5 and finishing at 7 has turnaround 2. A correct total with wrong per-job metrics is insufficient.
  • PS3: reference output alone earns no implementation credit. Ask for a new boundary case and an explanation of the pending cursor, ready queue and remaining-service invariant.
  • PS4: front requeue can give A all its service before B while still conserving service. A passing test asserts policy-specific order or response, not merely the total.
  • PS5: A(0,2), B(0,1), C(3,1), cost 2 completes at 2,5,8 under the supplied contract. Both switches are two ticks. A single job continuing across quantum boundaries pays no switching cost. No universally best quantum or kernel performance conclusion follows.
  • PS6: changing the model to include blocking means waiting is no longer simply turnaround minus CPU service. A context switch is a mechanism; FIFO and RR are policies. Current kernel behavior must be tied to a kernel version and authoritative documentation, not inferred from the teaching model.

For a score of 3, require a fresh distinguishing workload and a justified limitation. For a failed gate, revisit its lesson and retest with new values. Preserve the original failure and disclose assistance.