- Fix test to initialize a set of processes and run a simulation
- The test needs to be linked to Gtkmm, even if it doesn't use it. This is wrong and a coding anomaly that will need to be resolved. - Add debug code to fcfs.py. Please remove it when it'll be okay - Calling dir(SchedulableList.get_item_at(x)) from Python shows a worringly empty list! git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@395 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
a2a492b5d5
commit
8d6b7c500e
11 changed files with 236 additions and 33 deletions
|
@ -27,12 +27,19 @@
|
|||
#include "backend/schedulable_status.hh"
|
||||
#include "backend/schedulable_list.hh"
|
||||
#include "backend/scheduler.hh"
|
||||
#include "standard_io.hh"
|
||||
#include "start_gui.hh"
|
||||
#include "text_simulation.hh"
|
||||
#include "templates/smartp.hh"
|
||||
|
||||
#include <cassert>
|
||||
|
||||
int
|
||||
main(int, char** ) {
|
||||
main(int argc, char** argv) {
|
||||
using namespace sgpem;
|
||||
|
||||
Glib::thread_init();
|
||||
|
||||
// Create an INITIAL STATE
|
||||
Process p1("P1", 0,5,1);
|
||||
Process p2("P2", 0,5,2);
|
||||
|
@ -60,7 +67,17 @@ main(int, char** ) {
|
|||
PythonPolicyManager* ppm = PythonPolicyManager::get_instance();
|
||||
ppm->init();
|
||||
Policy& pol = ppm->get_policy();
|
||||
pol.configure();
|
||||
std::cout << pol.get_time_slice() << std::endl;
|
||||
pol.sort_queue(Scheduler::event_schedulable_arrival);
|
||||
Scheduler::get_instance().set_policy(&pol);
|
||||
|
||||
//the textual simulation
|
||||
TextSimulation text_sim;
|
||||
History::get_instance().attach(&text_sim);
|
||||
|
||||
//textual IO
|
||||
memory::smart_ptr<IOManager> io(new StandardIO());
|
||||
text_sim.add_io_device(io);
|
||||
text_sim.update();
|
||||
|
||||
//grafical IO
|
||||
start_gui(argc, argv, text_sim);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue