Skip to content

Commit

Permalink
[RPC] Support FIFO scheduler in the RPC backend.
Browse files Browse the repository at this point in the history
  • Loading branch information
sukritkalra committed Feb 21, 2024
1 parent d19536b commit 79d6259
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions rpc/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import grpc
from absl import app, flags

from schedulers import EDFScheduler
from schedulers import EDFScheduler, FIFOScheduler
from utils import EventTime, setup_logging
from workers import Worker, WorkerPool, WorkerPools
from workload import (
Expand Down Expand Up @@ -61,6 +61,9 @@
"The amount of virtualized memory (in GB) that must be created in each Worker on "
"the framework. Refer to the `virtualized_cores` flag for more information.",
)
flags.DEFINE_enum(
"scheduler", "EDF", ["FIFO", "EDF"], "The scheduler to use for this execution."
)


# Implement the service.
Expand All @@ -83,7 +86,12 @@ def __init__(self) -> None:
self._scheduler_running_lock = asyncio.Lock()
self._scheduler_running = False
self._rerun_scheduler = False
self._scheduler = EDFScheduler()
if FLAGS.scheduler == "EDF":
self._scheduler = EDFScheduler()
elif FLAGS.scheduler == "FIFO":
self._scheduler = FIFOScheduler()
else:
raise ValueError(f"Unknown scheduler {FLAGS.scheduler}.")

# Placement information maintained by the servicer.
# The placements map the application IDs to the Placement retrieved from the
Expand Down

0 comments on commit 79d6259

Please sign in to comment.