Commit Graph

717 Commits

Author SHA1 Message Date
tchernobog 3968bc7cbd - Fix CPUPolicy.get_parameters() in Python with a simple yet effective hack
git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@835 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-08-09 14:01:46 +00:00
tchernobog 86308ca185 - Revert back to old behaviour. Still wrong, but at least understandable
git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@834 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-08-09 13:41:52 +00:00
tchernobog 72e562e803 - Try to make CPUPolicy.get_parameters() and RR-Priority work. Won't
run.


git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@833 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-08-09 13:37:42 +00:00
elvez addad6aa26 - Applied Matteo`s tips to the error handling code. Now all loading errors whould be handled. Don`t know about runtime errors, though
git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@832 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-08-09 13:24:42 +00:00
elvez 6911676b53 - Added some code for better error-reporting in case of malformed policies. Actually it`s commented because it doesn`t work...
git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@831 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-08-09 00:50:45 +00:00
tchernobog e975bfdd0b - Bugfix to call History::notify_change when reenabling notifications
git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@830 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-08-08 19:46:14 +00:00
elvez 0138387a7f - Added the LOAD command to TextSimulation, and the classic question made to user on replacing an unsaved simulation
- Changed the way syntactically incorrect python policies are handled, we no more exit abruptly

git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@829 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-08-08 00:20:56 +00:00
matrevis d72ce96508 - Corrected a bug in step forward, which was incorrectly assuming
that the size of the history was the coordinate of the instant
  to add.
- Corrected a bug in step forward, which was incorrectly assuming
  that all processes started at instant 0.
- Added a wizard to show a bug in step forward, which thinks that
  the simulation is terminated while it isn't since some processes
  are still future.
- Commented some unused code in step forward (extendThread()).
- Still to extract methods from Extender and provide them to 
  step forward in a more suitable (static) way.


git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@828 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-08-07 23:59:21 +00:00
tchernobog a7fc644043 - Fix compilation and loading of XmlSave plugin
- Fix throwing of exceptions from sgpem::Module
- **THOU SHALL ALWAYS UPDATE THY MAKEFILES, OR THE WRATH OF GOD
WILL DESCEND UPON THEE**


git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@827 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-08-07 15:16:27 +00:00
elvez 96728edfce - Fixed compilation errors caused by latest changes to serialization code
- Setup makefile for xmlsave plugin. It still can`t be activated. why?
- Added a temporary command SAVE to commandline interface to try serialization

git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@826 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-08-07 00:54:43 +00:00
matrevis 574723a35b - Added full request support, altough still not working
at all. Compiles and runs, but the output is not
  correct. Anyway, now it is just a matter of logics :P
- Corrected some minor bugs in step forward.
- Step forward is now rather messy, but still better than
  four hours ago.. altough this can be hard to believe.
- Added some wizards that help finding bugs.
- Rewritten dyn process get_state as it was guilty of
  premature optimization :)


git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@825 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-08-06 01:47:02 +00:00
matrevis efe7dedd61 - Request queues are now correctly managed by the ConcreteEnvironment
copy constructor and by the add_resource and remove_resource methods
  found in ConcreteHistory.
- Scheduler now adds the requests in the queue when appropriate, and
  removes them when exhausted.
- Still to implement the management of the state of requests depending
  on their position in the queue
- Still to implement the way threads block depending on the state of
  their requests
- step_forward now reuses some bunch of code taken from the prototype


git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@824 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-08-05 17:09:45 +00:00
tchernobog 132db18b8c - Split between abstract base class (sgpem::CairoWidget) and
derived widget
- Add History::set_notify_enabled() for usage by the frontend 
(for example, when loading from file, you'll want to call
set_notify_enabled(false) before starting)


git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@823 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-08-04 20:08:55 +00:00
tchernobog 2174c25f74 - Fix drawing of widget background. Now I'll move the code to
an abstract base class, and I'll start working out the 
adjustement / resizing problems (they're not easy to work out 
correctly).


git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@822 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-08-04 19:12:17 +00:00
elvez 974702af3e - Added other two dialogs for the gui
- Added exception specifications to the methods of the serializer interface and xml plugin

git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@821 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-08-04 00:29:37 +00:00
matrevis 56d7ddbc5a - Widgets now will be shown. Still some problem with their background
git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@820 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-08-03 15:43:21 +00:00
tchernobog b76756c2a8 - Add untested code to SchedulableWidget, manually inheriting from a raw Gtk::Widget
and doing things by hand


git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@819 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-08-03 11:16:16 +00:00
elvez 82289edc14 - Corrected a potentially disastrous automatic int->uint conversion in TextSimulation
- Make test-history run by commenting some "dangerous" lines
- Added a couple of comments to SchedulablesWidget::update() in the hope the may be useful to others in finding where the bug resides...

git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@818 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-08-03 01:34:49 +00:00
matrevis 9f4415a835 - Sorry, I forgot to remove a debug printf statement.
git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@817 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-08-03 00:42:28 +00:00
matrevis 96055b4cf1 - minor bugfix: scheduler was terminating subrequests before decreasing
their elapsed time
- requests are now behaving nicely, since they are raised at the correct
  instant, and terminated at the right instant
- the ready queues are still not ready, tough :(, anyway, now there is
  really nothing else to do before them.
- stepforward is looking much more uglier (if possible).


git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@816 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-08-03 00:30:36 +00:00
elvez 10091d7a16 - Added ResourcePolicyManager
- Removed obsolete files

git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@815 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-08-02 23:38:52 +00:00
matrevis 56a7ce1221 fixed a bug involving scheduler keeping a running thread in the ready queue
when that thread had just been given the cpu.
fixed a bug involving text-simulation displaying the wrong timestamp for
each snaphot. Now the first snapshot printed is correctly tagged "-1".

added (for the sake of lazyness) a method to readyqueue letting anyone
delete the first element on the queue. Not having this would imply
rebuilding the whole queue each time a thread was selected to run.

Small commits avoid complex mergings.


git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@814 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-08-02 23:12:32 +00:00
elvez 01490e24ac - Added the ResourcePoliciesGatekeeper class, still not tried to compile it
git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@813 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-08-02 22:21:42 +00:00
tchernobog 1961283f85 - Use strictier naming scheme for pyloader
git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@812 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-08-02 22:06:20 +00:00
tchernobog 43b817aaed - Rename Policy to CPUPolicy where appropriate
git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@811 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-08-02 21:57:36 +00:00
tchernobog 5b577c5979 - Start working on double-buffering on cairo widgets. The system
will SIGSEGV. I will fix this asap, in the meantime use the cmdline
interface.


git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@810 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-08-02 13:48:26 +00:00
elvez 6969d5b2c2 - Written what I suppose might be HoltGraph
git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@809 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-08-02 00:28:31 +00:00
elvez b9cbbacd10 - Added ResourcePolicy class. I need to clear some doubts before writing the remaining part of resource policy management...
git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@808 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-08-01 22:57:40 +00:00
tchernobog c6ebe792e4 - Make Scheduler::step_forward return a bool representing if
the step went okay or otherwise if the simulation ended
- Fix simulation states in concrete_simulation.cc
- Manage end of input (now CTRL+D exits the program, and 
you can redirect a file in input knowing that at EOF
sgpemv2 will terminate)
- Fix a bug in Scheduler that didn't add the newly created
environment to History when the simulation ended, thus leading
both to a memory leak and an inconsistency in representing
the simulation


git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@807 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-08-01 09:19:26 +00:00
matrevis 6f8625d308 Just printing resource name along with ID in subrequest (1 line commit!)
git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@806 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-07-31 23:35:27 +00:00
elvez 504311a390 - Made more clear and complete output from TextSimulation
- Added the "continuous" attribute for the SET and GET commands
- Now resource ids are checked for validity

git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@805 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-07-31 23:18:51 +00:00
tchernobog 1d34e1f592 - Draft first version of rr_priority (incomplete, will need some more
exported interface)
- Add to the Makefile the glade files


git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@804 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-07-31 22:29:42 +00:00
tchernobog 96e8198d83 - Fix SJF to use the new exported interface. Maybe we could
add a convenience function "get_remaining_time()" for the user
commodity.


git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@803 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-07-31 21:56:46 +00:00
elvez 58b35916c6 - Added another couple of dialogs, I`m not sure of what other dialogs we`ll need, so for the moment I`m done with it
git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@802 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-07-30 21:43:35 +00:00
elvez 1508c179e6 - Added the dialog which asks the questions needed to create a process
git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@801 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-07-29 17:18:52 +00:00
elvez 8b20c7d30a - Completed code for visualization of the simulation, there`s still the part for the visualization of the request queue commented
git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@800 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-07-29 15:48:24 +00:00
elvez d64051279f - Fixed bug in copy construction of DynamicProcess
- Fixed bug in get_parameter<bool> in TextSimulation
- Written some new code for visualization of the simulation

git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@799 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-07-29 00:24:48 +00:00
tchernobog 25e5a7319b - Add CairoElements
- Start code for double buffering in custom widgets, using
an off-screen pixmap. Problem: we don't know the height from the 
beginning


git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@798 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-07-28 15:24:56 +00:00
tchernobog 5b22b503a5 - Do the assignment before using the variable...
git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@797 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-07-28 12:34:13 +00:00
tchernobog 6c79bc361c - Fix deadlock that blocked PythonPolicy::sort_queue
git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@796 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-07-28 12:21:49 +00:00
tchernobog ebeda15359 - Add DLLEXPORT directive to sgpem::Module
git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@795 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-07-25 11:08:05 +00:00
elvez 6a88e3d85e - Added NullPolicyException to scheduler
- Started code for printing the state of the scheduling
- Fixed a bug in the copy constructor of DynamicThread

git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@794 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-07-23 22:27:33 +00:00
tchernobog f26b80f76b - Keep a map to hold request queues into a concrete_environment
- TODO: fix test-history consequentially (request queues should be prepared
by Scheduler or by Environment?)


git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@793 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-07-23 13:38:13 +00:00
tchernobog 508ce4d86b - Aestethics when printing license
git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@792 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-07-23 11:19:39 +00:00
elvez 66a2d414f2 - Fixed test-pyloader
git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@791 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-07-22 14:47:39 +00:00
elvez 5e40f9a8c1 - Fixed a problem with test-pyloader, now it starts, but it segfaults in no time
git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@790 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-07-21 23:41:06 +00:00
elvez 0dd711657f - Added the "set cpu-policy" command. It`s still not useful until we initialize the pyloader plugin...
git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@789 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-07-21 13:10:31 +00:00
tchernobog ddb0d99aca - Add note about indentation in Emacs (how to get it right)
- Add deletor.tcc to Makefile.am


git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@788 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-07-20 22:12:08 +00:00
tchernobog 19ee5c1884 - Fix deletion using an ad-hoc functor to avoid memory leaks, instead that ptr_fun(operator delete). Valgrind says we're doing well with History\!
git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@787 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-07-20 21:50:28 +00:00
tchernobog 69a7ee03eb - Fix visibility support into string_utils
git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@786 3ecf2c5c-341e-0410-92b4-d18e462d057c
2006-07-20 11:11:37 +00:00