- Add initial layout for further builtin policies (needs
to be expanded / fixed) git-svn-id: svn://svn.gna.org/svn/sgpemv2/trunk@363 3ecf2c5c-341e-0410-92b4-d18e462d057c
This commit is contained in:
parent
b788ebab4b
commit
7d58c965ff
6 changed files with 92 additions and 63 deletions
32
src/builtin-policies/fcfs.py
Normal file
32
src/builtin-policies/fcfs.py
Normal file
|
@ -0,0 +1,32 @@
|
|||
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(Policy) :
|
||||
def __init__(self):
|
||||
pass;
|
||||
|
||||
def configure(self):
|
||||
pass;
|
||||
|
||||
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
|
Loading…
Add table
Add a link
Reference in a new issue