Tip:
Highlight text to annotate it
X
(male narrator) So now that we have our priority list,
let's go ahead and schedule this on two processors.
So we start by identifying the ready tasks,
which it looks like are gonna be this...these four here,
which are Task 1, Task 2, uh...Task 3, and Task 4.
Uh...and of course, we assign
the first two ready tasks on the priority list,
so we assign T3, uh...and T1 to Processor 1 and Processor 2.
So Processor 1, uh...sorry... that's not right.
[laughs] So Processor 1 is gonna be working on Task 3,
uh...so we'll go ahead and assign Task 3 here
with a time of-of-of 7 units.
And we'll go ahead and assign, uh...Task 1 to Processor 2,
and Task 1 has a time of-of 6 units.
And so, uh...this task...
Task 3 and Task 1 have been started.
So now we're gonna fast-forward in time to Time 6.
Uh...we're gonna call that our "now."
And at Time 6, Task 1 gets completed.
So Task 1 is now completed.
This order requirement is done.
And we ask, is anything new ready?
And the answer is, no,
because this task still has another requirement.
And so we go ahead and assign
the next task on the priority list,
which is Task 4.
So we'll go ahead and assign Task 4
to Processor 2 here.
And Task 4 has a time of 4 units,
so this is gonna take us out to 10 units of time.
Uh...I apologize if my skill's a little off here,
but...uh...hopefully you can follow along okay.
So Task 4 is started.
So now we're gonna fast-forward...again
to Time 7...now,
uh...and...when our next change happens.
So at Time 7, Task 3 completes.
And we look and say, are there any new ready tasks?
Well, no, this task also has a prerequisite,
uh...and so there are no new ready tasks.
So we look and say, okay, what's next on the priority list
that hasn't already been started?
And the next thing is Task 2,
so we'll go ahead and start Task 2,
assigning it to...Processor 1.
So Task 2 gets assigned to Processor 1.
And it has a completion time of 3 units,
and so that's gonna take us out to Time 10.
So...our next interesting moment of time is at Time 10,
when both Task 4 and Task 2 get completed.
And so now this order requirement is done,
and we update our ready list.
Are there any ready tasks?
And the answer is, yes, Task 6 is ready.
Uh...but nothing else is ready, only Task 6.
And so Processor 1 is gonna get assigned...oops...Task 6,
uh...which is gonna take 10 units of time.
Uh...and during the... all that time
that Processor 1 is working on that task,
uh...Processor 2 is going to be idle.
Processor 2's not gonna have anything to work on.
So Task 6 has been assigned,
and now we fast-forward in time to Time 20.
And at Time 20, Task 6 gets completed.
And now this requirement
and this order requirement are done,
and Task 5 and Task 7 both become ready.
And now we can go ahead and assign those
to Processor 1 and 2.
So Processor's 1's gonna get Task 5,
bringing us out to 25 units of time.
And Processor 2 is gonna get Task 7,
which takes only 4 units of time.
Uh...and so now we again fast-forward
our-our now out to Time 24, when Task 7 completes.
And when Task 7 completes,
does anything, uh...become ready?
And the answer is, no, because Task 8 still has
a pre...uh...uh... another requirement.
And so once again,
Processor 2 is gonna be sitting idle for a little while
until we move forward to Time...to Time...
oops, I lost my 2 there... to-to Time 25.
So now here at Time 25, uh...Task 5 gets completed,
so Task 5 is now completed.
And with that completed... those requirements go away,
and Task 8 and Task 9 become...become ready.
Right?
Both of their...
all of their requirements have been completed.
So we can go ahead and start on 8 and 9.
Uh...we'll assign Task 8-- the first on the list--
to Processor 1,
which will bring us out to Time 28.
And we'll assign Task 9-- the second one there--
to Processor 2, which will take us out to...
so that's Task 9, and that's gonna...
that was supposed to be Task 8, I'm sorry.
This is Task 8.
Uh... [laughs] Task 9,
which will take us out to Time 27,
'cause this was Time 25, and task time is 2 there.
So fast-forwarding again at Time 27,
Task 9 gets completed.
But that...nothing new becomes ready,
so Processor 2 is again going to idle.
And now at Time 28... at Time 28,
Task 8 gets completed... Task 9 was already completed.
Task 8 becomes completed, which makes Task 10 ready.
And now we can go ahead and assign Task 10
to Processor 1.
So we're assigning Task 10 to Processor 1,
and that's gonna bring us out to a time of 35 units.
And 35 units then, uh...
is our finishing time for this schedule.
Notice that Processor 2 is also gonna be idle
during all of that time.
And so we have a fair amount of idle time in this schedule--
uh...largely because of this big, huge block here,
where we were waiting for-for Task 6 to get done
before we could get on to the rest of these.