Consider a job scheduling problem with 4 jobs J1, J2, J3, J4 and with…

2007

Consider a job scheduling problem with 4 jobs J1, J2, J3, J4 and with corresponding deadlines: ( d1, d2, d3, d4) = (4, 2, 4, 2). Which of the following is not a feasible schedule without violating any job's deadline?

Answer: B. J4, J1, J2, J3In job sequencing with unit processing time on a single processor, a schedule is a permutation (ordering) of the jobs; the job placed at position k…

  1. A.

    J2, J4, J1, J3

  2. B.

    J4, J1, J2, J3

  3. C.

    J4, J2, J1, J3

  4. D.

    J4, J2, J3, J1

Attempted by 264 students.

Show answer & explanation

Correct answer: B

In job sequencing with unit processing time on a single processor, a schedule is a permutation (ordering) of the jobs; the job placed at position k (1-indexed, counting from the start) finishes at time k. A schedule is feasible only when every job's completion time is less than or equal to its own deadline — a single job finishing even one time unit late makes the whole schedule infeasible.

  1. J4 is scheduled first, so it finishes at time 1; its deadline is 2, so 1 ≤ 2 holds.

  2. J1 is scheduled second, so it finishes at time 2; its deadline is 4, so 2 ≤ 4 holds.

  3. J2 is scheduled third, so it finishes at time 3; its deadline is 2, so 3 ≤ 2 fails — J2 misses its deadline by one time unit.

  4. Because J2 already violates its deadline, the schedule (J4, J1, J2, J3) is infeasible regardless of when J3 finishes.

Cross-check against the other three orders: in each of them, the two deadline-2 jobs (J2 and J4) occupy positions 1 and 2 in some order, so both finish by time 2; the two deadline-4 jobs (J1 and J3) then occupy positions 3 and 4, comfortably finishing by time 4. Only the order that pushes a deadline-2 job to position 3 — as this schedule does with J2 — breaks feasibility, confirming that (J4, J1, J2, J3) is the one infeasible schedule among the four.

Explore the full course: Iocl Engineers Officers Grade A Paper 2

Loading lesson…