2006-02-21 08:39:39 +01:00
|
|
|
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...)
|
|
|
|
###############################
|
|
|
|
|
2006-02-21 23:57:14 +01:00
|
|
|
class fcfs(Policy) :
|
2006-02-21 08:39:39 +01:00
|
|
|
def __init__(self):
|
|
|
|
pass;
|
|
|
|
|
|
|
|
def configure(self):
|
2006-02-21 23:57:14 +01:00
|
|
|
print 'No options to configure for fcfs'
|
2006-02-21 08:39:39 +01:00
|
|
|
|
|
|
|
def is_preemptive(self):
|
|
|
|
return False
|
|
|
|
|
|
|
|
def is_time_sliced(self):
|
|
|
|
return False
|
|
|
|
|
|
|
|
def sort_queue(self, event, queue):
|
|
|
|
# How am I supposed to sort that mess??
|
|
|
|
# FIXME
|
|
|
|
return queue
|