Remove scheduler_info. (#84)

This commit is contained in:
Robert Nishihara
2016-12-04 15:51:03 -08:00
committed by Philipp Moritz
parent 2a3e9267f8
commit 35b9dedb48
7 changed files with 152 additions and 152 deletions
+24 -27
View File
@@ -4,6 +4,11 @@
#include "photon.h"
#include "common/task.h"
/* The duration that the local scheduler will wait before reinitiating a fetch
* request for a missing task dependency. TODO(rkn): We may want this to be
* adaptable based on the load on the local scheduler. */
#define LOCAL_SCHEDULER_FETCH_TIMEOUT_MILLISECONDS 1000
/* ==== The scheduling algorithm ====
*
* This file contains declaration for all functions and data structures
@@ -12,77 +17,69 @@
*
*/
/** Internal state of the scheduling algorithm. */
typedef struct scheduler_state scheduler_state;
/**
* Initialize the scheduler state.
*
* @return Internal state of the scheduling algorithm.
* @return State managed by the scheduling algorithm.
*/
scheduler_state *make_scheduler_state(void);
scheduling_algorithm_state *make_scheduling_algorithm_state(void);
/**
* Free the scheduler state.
*
* @param state Internal state of the scheduling algorithm.
* @param algorithm_state State maintained by the scheduling algorithm.
* @return Void.
*/
void free_scheduler_state(scheduler_state *state);
void free_scheduling_algorithm_state(
scheduling_algorithm_state *algorithm_state);
/**
* This function will be called when a new task is submitted by a worker for
* execution.
*
* @param info Info about resources exposed by photon to the scheduling
* algorithm.
* @param state State of the scheduling algorithm.
* @param task Task that is submitted by the worker.
* @return Void.
*/
void handle_task_submitted(scheduler_info *info,
scheduler_state *state,
void handle_task_submitted(local_scheduler_state *state,
scheduling_algorithm_state *algorithm_state,
task_spec *spec);
/**
* This function will be called when a task is assigned by the global scheduler
* for execution on this local scheduler.
*
* @param info Info about resources exposed by photon to the scheduling
* algorithm.
* @param state State of the scheduling algorithm.
* @param state The state of the local scheduler.
* @param algorithm_state State maintained by the scheduling algorithm.
* @param task Task that is assigned by the global scheduler.
* @return Void.
*/
void handle_task_scheduled(scheduler_info *info,
scheduler_state *state,
void handle_task_scheduled(local_scheduler_state *state,
scheduling_algorithm_state *algorithm_state,
task_spec *spec);
/**
* This function is called if a new object becomes available in the local
* plasma store.
*
* @param info Info about resources exposed by photon to the scheduling
* algorithm.
* @param state State of the scheduling algorithm.
* @param state The state of the local scheduler.
* @param algorithm_state State maintained by the scheduling algorithm.
* @param object_id ID of the object that became available.
* @return Void.
*/
void handle_object_available(scheduler_info *info,
scheduler_state *state,
void handle_object_available(local_scheduler_state *state,
scheduling_algorithm_state *algorithm_state,
object_id object_id);
/**
* This function is called when a new worker becomes available
*
* @param info Info about resources exposed by photon to the scheduling
* algorithm.
* @param state State of the scheduling algorithm.
* @param state The state of the local scheduler.
* @param algorithm_state State maintained by the scheduling algorithm.
* @param worker_index The index of the worker that becomes available.
* @return Void.
*/
void handle_worker_available(scheduler_info *info,
scheduler_state *state,
void handle_worker_available(local_scheduler_state *state,
scheduling_algorithm_state *algorithm_state,
int worker_index);
#endif /* PHOTON_ALGORITHM_H */