- Fixed some bugs in command processing, added the configure-cpu-policy command

git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@748 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
elvez 2006-07-10 22:28:51 +00:00
parent 1a6805afc4
commit 6150af3d30
8 changed files with 196 additions and 77 deletions

View file

@ -21,7 +21,7 @@
from Policy import Policy
import sys
from sgpem import policy_sorts_processes
#from sgpem import policy_sorts_processes
class fcfs(Policy) :
def __init__(self):
@ -36,6 +36,11 @@ class fcfs(Policy) :
def get_time_slice(self):
return -2
# FIXME incorrect, but must be implemented to allow
# loading from the policy manager
def wants(self):
return 0
def sort_queue(self, queue):
cmpf = lambda a, b: \
a.get_arrival_time() < \

View file

@ -21,7 +21,7 @@
from Policy import Policy
import sys
from sgpem import policy_sorts_processes
#from sgpem import policy_sorts_processes
class sjf(Policy) :
def __init__(self):
@ -36,6 +36,11 @@ class sjf(Policy) :
def get_time_slice(self):
return -1
# FIXME incorrect, but must be implemented to allow
# loading from the policy manager
def wants(self):
return 0
def sort_queue(self, queue):
cmpf = lambda a, b: \
a.get_remaining_time() < \