sgpemv2/src/builtin-policies/fcfs.py

33 lines
705 B
Python
Raw Normal View History

from Policy import Policy
##### Typical session : #######
###############################
# cd [...]/share/sgpemv2/policies
# python
# >>> import sys
# >>> sys.path[:0] = [ '../modules' ]
# >>> import fcfs
# >>> p = fcfs.fcfs_policy()
# >>> par = p.get_parameters()
# Segmentation fault
# (this makes sense...)
###############################
class fcfs(Policy) :
def __init__(self):
pass;
def configure(self):
print 'No options to configure for fcfs'
def is_preemptive(self):
return False
def get_time_slice(self):
return -1
def sort_queue(self, event, queue):
# How am I supposed to sort that mess??
# FIXME
return queue