Solved Problems on Machine Scheduling in Algorithms - Homework 4 | MATH 181, Assignments of Mathematics

Material Type: Assignment; Class: A Mathematical World; Subject: Mathematics; University: University of Illinois - Urbana-Champaign; Term: Unknown 1989;

Typology: Assignments

Pre 2010

Uploaded on 03/10/2009

koofers-user-o7z
koofers-user-o7z 🇺🇸

10 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
These comments are no replacement for coming to talk to me in office
hours. I am here to help!
Comments on Homework 4 and Quiz 4
How do we solve the machine-scheduling problem / apply the list processing
algorithm? It comes in two parts:
an order-requirement digraph. This tells me what is physically possible
at each moment in time. A task is not ready until all of the tasks
before it (on the order-requirement digraph) are completed. If T1must
be performed before T2, then it is not enough to assign T1before T2. I
must wait T1is finished, before I can assign T2.
a priority list. This tells me what order I would prefer to do things
in (if I did not have to worry about the order-requirement digraph).
Suppose my priority list starts T3,T4,T1, . . .. I start by looking at
the order-requirement digraph and asking ”Is T3ready?” If it is ready,
then I assign it to the first free processor. If T3is not ready, then I
move onto the next item on the list and ask ”Is T4ready?” I continue
in this way until I find a ready task. The only time a processor idles is
if NO tasks are ready. In particular, the priority list does NOT mean
”I must do T3before I do T4”. It means I ask ”Is T3ready?” before I
ask ”Is T4ready?”
If T3was not ready and T4was ready, I would assign T4to the first free
processor and cross T4off the priority list. When I next try to assign
a task, I start at the beginning of my priority list T3,T1, . . . , with T3
and not T1.
It is important to know what tasks are ready. In class, I have suggested
two things which may help.
Keep track of how much time has passed.
Cross tasks off the order-requirement digraph only when they have been
finished, not when they are assigned.
About Bin-Packing
1
pf2

Partial preview of the text

Download Solved Problems on Machine Scheduling in Algorithms - Homework 4 | MATH 181 and more Assignments Mathematics in PDF only on Docsity!

These comments are no replacement for coming to talk to me in office hours. I am here to help!

Comments on Homework 4 and Quiz 4

How do we solve the machine-scheduling problem / apply the list processing algorithm? It comes in two parts:

  • an order-requirement digraph. This tells me what is physically possible at each moment in time. A task is not ready until all of the tasks before it (on the order-requirement digraph) are completed. If T 1 must be performed before T 2 , then it is not enough to assign T 1 before T 2. I must wait T 1 is finished, before I can assign T 2.
  • a priority list. This tells me what order I would prefer to do things in (if I did not have to worry about the order-requirement digraph). Suppose my priority list starts T 3 , T 4 , T 1 ,.. .. I start by looking at the order-requirement digraph and asking ”Is T 3 ready?” If it is ready, then I assign it to the first free processor. If T 3 is not ready, then I move onto the next item on the list and ask ”Is T 4 ready?” I continue in this way until I find a ready task. The only time a processor idles is if NO tasks are ready. In particular, the priority list does NOT mean ”I must do T 3 before I do T 4 ”. It means I ask ”Is T 3 ready?” before I ask ”Is T 4 ready?”
  • If T 3 was not ready and T 4 was ready, I would assign T 4 to the first free processor and cross T 4 off the priority list. When I next try to assign a task, I start at the beginning of my priority list T 3 , T 1 ,... , with T 3 and not T 1.

It is important to know what tasks are ready. In class, I have suggested two things which may help.

  • Keep track of how much time has passed.
  • Cross tasks off the order-requirement digraph only when they have been finished, not when they are assigned.

About Bin-Packing

  • Sadly we did not talk about NFD and FFD on Wednesday. Without parts b) and d), Problem 46 was not a good example of the difference between NF and FF. I apologize for that.
  • It is a good idea to keep track of the total amount stored in each bin. If I put weights of size 3 and then 4 into a bin, I should write 7 to the side of the bin. This will help prevent me from overfilling bins and help me identify what bin I should use for the next object.