FCFSBatchScheduler.h
1 
10 #ifndef WRENCH_FCFSBATCHSCHEDULER_H
11 #define WRENCH_FCFSBATCHSCHEDULER_H
12 
13 /***********************/
15 /***********************/
16 
17 #include <wrench/services/compute/batch/batch_schedulers/homegrown/HomegrownBatchScheduler.h>
18 #include <wrench/services/compute/batch/BatchComputeService.h>
19 
20 namespace wrench {
21 
26 
27  public:
28 
29  /*
30  * @brief Constructor
31  *
32  * @param cs: the batch compute service for which this scheduler is operating
33  */
35 
36  void processQueuedJobs() override;
37 
38  // TODO: is't the second arg just inside the first->id field?
39  void processJobSubmission(std::shared_ptr<BatchJob> batch_job) override;
40  void processJobFailure(std::shared_ptr<BatchJob> batch_job) override;
41  void processJobCompletion(std::shared_ptr<BatchJob> batch_job) override;
42  void processJobTermination(std::shared_ptr<BatchJob> batch_job) override;
43 
44  std::shared_ptr<BatchJob> pickNextJobToSchedule();
45 
46  std::map <std::string, std::tuple<unsigned long, double>> scheduleOnHosts(unsigned long, unsigned long, double) override;
47 
48  std::map<std::string, double> getStartTimeEstimates(std::set <std::tuple<std::string, unsigned long, unsigned long, double>> set_of_jobs) override;
49  };
50 
51 }
52 
53 /***********************/
55 /***********************/
56 
57 
58 
59 #endif //WRENCH_FCFSBATCHSCHEDULER_H
BatchComputeService * cs
Compute service for which this scheduler is operating.
Definition: BatchScheduler.h:106
A class that implements a FCFS batch scheduler.
Definition: FCFSBatchScheduler.h:25
void processQueuedJobs() override
Method to process queued jobs.
Definition: FCFSBatchScheduler.cpp:336
std::map< std::string, double > getStartTimeEstimates(std::set< std::tuple< std::string, unsigned long, unsigned long, double >> set_of_jobs) override
Method to get start time estimates.
Definition: FCFSBatchScheduler.cpp:162
A batch-scheduled compute service that manages a set of compute hosts and controls access to their re...
Definition: BatchComputeService.h:49
Definition: Alarm.cpp:20
std::shared_ptr< BatchJob > pickNextJobToSchedule()
Overriden Method to pick the next job to schedule.
Definition: FCFSBatchScheduler.cpp:24
std::map< std::string, std::tuple< unsigned long, double > > scheduleOnHosts(unsigned long, unsigned long, double) override
Override Method to find hosts on which to scheduled a job.
Definition: FCFSBatchScheduler.cpp:40
void processJobSubmission(std::shared_ptr< BatchJob > batch_job) override
Method to process a job submission.
Definition: FCFSBatchScheduler.cpp:382
An abstract class that defines a batch scheduler.
Definition: HomegrownBatchScheduler.h:25
void processJobCompletion(std::shared_ptr< BatchJob > batch_job) override
Method to process a job completion.
Definition: FCFSBatchScheduler.cpp:390
HomegrownBatchScheduler(BatchComputeService *cs)
Constructor.
Definition: HomegrownBatchScheduler.h:34
void processJobTermination(std::shared_ptr< BatchJob > batch_job) override
Method to process a job termination.
Definition: FCFSBatchScheduler.cpp:394
void processJobFailure(std::shared_ptr< BatchJob > batch_job) override
Method to process a job failure.
Definition: FCFSBatchScheduler.cpp:386