13,060 views
5 votes
5 votes

Consider a job scheduling problem with 4 jobs $J_1, J_2, J_3$ and $J_4$ with corresponding deadlines: $(d_1, d_2, d_3, d_4) = (4, 2, 4, 2)$. Which of the following is not a feasible schedule without violating any job schedule?

  1. $J_2, J_4, J_1, J_3$
  2. $J_4, J_1, J_2, J_3$
  3. $J_4, J_2, J_1, J_3$
  4. $J_4, J_2, J_3, J_1$

3 Answers

Best answer
11 votes
11 votes

TO OPTIMIZE AND TO GET A FEASIBLE SOLUTION WE HAVE TO FINISH ALL THE JOBS WITH IN THEIR DEAD LINE.

SINCE THE DEADLINE OF J2 AND J4 ARE 2.SO THEY MUST BE COMPLETED BY 2.SO WE CAN SCHEDULE ANY ONE 

THAT IS J2 OR J4..

IN OPTION C,D J4 IS SCHEDULED FIRST AND THEN J2 AND

IN OPTION A, FIRST J2 THEN J4             SO WE CAN ABLE TO SCHEDULE OTHER 2 JOBS

NOW CONSIDER OPTION B

J4 IS SCHEDULED AND NEED TO BE COMPLETED ....BY 2  ---NO PROBLEM

J1 IS SCHEDULED AND NEED TO BE COMPLETED ....BY 4     --NO PROBLEM

BUT NOW AS J2 SHOULD COME BEFORE TIME 2..BUT WE SCHEDULED J1....SO J2 CANT BE SCHEDULED

LEADS TO A UNFEASIBLE  SOL.

 

selected by
0 votes
0 votes

Option A: 2,2,4,4. No problem.

Option B: 2,4,2,4. The third job in this sequence had to be completed under 2 time units. But it took 3 time units. This isn't an optimal solution, hence the answer.

Option C: 2,2,4,4. No problem.

Option D: 2,2,4,4. No problem.

0 votes
0 votes
The answer is (B) because it violates the SJF algorithm. Rest all schedules are feasible with any algorithm.
Answer:

Related questions

8 votes
8 votes
3 answers
1
go_editor asked Jun 10, 2016
4,647 views
Feedback queuesare very simple to implementdispatch tasks according to execution characteristicsare used to favour real time tasksrequire manual intervention to implement...
8 votes
8 votes
2 answers
2
go_editor asked Jun 10, 2016
7,756 views
On a system using non-preemptive scheduling, processes with expected run times of 5, 18, 9 and 12 are in the ready queue. In what order should they be run to minimize wai...
5 votes
5 votes
1 answer
3
go_editor asked Jun 10, 2016
3,094 views
Round Robin schedule is essentially the pre-emptive version ofFIFOShortest job firstShortest remaining timeLongest remaining time
21 votes
21 votes
6 answers
4