diff --git a/Makefile.am b/Makefile.am index 624ab53..d5d46c6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -578,10 +578,12 @@ noinst_DATA += \ src/testsuite/scheduling-wizards/wizard-block-fail examples_DATA = \ + src/testsuite/scheduling-wizards/environments/Colori_rr_prio_1_2.xgp \ + src/testsuite/scheduling-wizards/environments/DiscWorld_unblock.xgp \ src/testsuite/scheduling-wizards/environments/Ducks_rr_2.xgp \ src/testsuite/scheduling-wizards/environments/FruitsBasket_complex.xgp \ src/testsuite/scheduling-wizards/environments/Fantozzi_lifo_requests.xgp \ - src/testsuite/scheduling-wizards/environments/Colori_rr_prio_1_2.xgp \ + src/testsuite/scheduling-wizards/environments/Pensieri_fcfs.xgp \ src/testsuite/scheduling-wizards/environments/ScuolaDiMileto_block_fail.xgp \ src/testsuite/scheduling-wizards/environments/ScuolaDiMileto_gap_blocked.xgp \ src/testsuite/scheduling-wizards/environments/ScuolaDiMileto_assert_fail.xgp \ @@ -590,7 +592,6 @@ examples_DATA = \ src/testsuite/scheduling-wizards/environments/Matteo_preemption_fail.xgp \ src/testsuite/scheduling-wizards/environments/Porno_priority_inversion.xgp \ src/testsuite/scheduling-wizards/environments/ScuolaDiMileto_gap_fail.xgp \ - src/testsuite/scheduling-wizards/environments/DiscWorld_unblock.xgp \ src/testsuite/scheduling-wizards/environments/TheSecretOfMonkeyIsland.xgp EXTRA_DIST += $(noinst_DATA) $(examples_DATA) diff --git a/doc/sgpem2uman.texi b/doc/sgpem2uman.texi index ea27b93..41deea8 100644 --- a/doc/sgpem2uman.texi +++ b/doc/sgpem2uman.texi @@ -809,7 +809,7 @@ It represent the processes status at each instant from the simulation beginning to the actual one.@* Into the graph is possible to view the processes only or both processes and threads. -@strong{Note:} this graph illustrates the @emph{past}. After each simulation +@strong{Watch out:} this graph illustrates the @emph{past}. After each simulation step is gone, the corresponding processes'/threads' states are drawn. The graph is divided in three areas: @@ -1197,8 +1197,10 @@ that the name of the class have to be the same of the name of the file 11 def sort_queue(self, event, queue): @strong{12 cmpf = lambda a, b: \ - a.get_schedulable().get_arrival_time() <= \ - b.get_schedulable().get_arrival_time() + a.get_schedulable().get_arrival_time() + \ + a.get_process().get_arrival_time <= \ + b.get_schedulable().get_arrival_time() + \ + b.get_process().get_arrival_time 13 self.sort(queue,cmpf)} @end example @sp 2 @@ -1255,7 +1257,7 @@ parameter via @code{Policy.configure()} if the policy is time-sliced, to ensure greater flexibility. @sp 1 -@item body of @code{ def sort_queue(self, event, queue):} line 12,13 +@item body of @code{def sort_queue(self, event, queue):} line 12,13 Sort the queue of ready threads. This method is called by the scheduler at each step of the simulation to sort the ready threads diff --git a/plugins/pyloader/src/builtin-policies/fcfs.py b/plugins/pyloader/src/builtin-policies/fcfs.py index 7355dce..156549f 100644 --- a/plugins/pyloader/src/builtin-policies/fcfs.py +++ b/plugins/pyloader/src/builtin-policies/fcfs.py @@ -42,6 +42,6 @@ the simplest of them all.""" def sort_queue(self, queue): cmpf = lambda a, b: \ - a.get_arrival_time() <= \ - b.get_arrival_time() + a.get_arrival_time() + a.get_process().get_arrival_time() <= \ + b.get_arrival_time() + b.get_process().get_arrival_time() self.sort(queue,cmpf) diff --git a/src/testsuite/scheduling-wizards/environments/pensieri.xgp b/src/testsuite/scheduling-wizards/environments/Pensieri_fcfs.xgp similarity index 100% rename from src/testsuite/scheduling-wizards/environments/pensieri.xgp rename to src/testsuite/scheduling-wizards/environments/Pensieri_fcfs.xgp