Skip to content
Snippets Groups Projects
Commit 0f7faca0 authored by Maël Madon's avatar Maël Madon
Browse files

readme for session2

parent 8a5a364b
Branches
No related tags found
No related merge requests found
out/* out/*
!out/example_jobs.csv !out/example_jobs.csv
*__pycache__* *__pycache__*
*_perso/* *_perso/*
\ No newline at end of file correction
\ No newline at end of file
...@@ -154,7 +154,44 @@ Visualize the outputs with the visualization script to see if it worked correctl ...@@ -154,7 +154,44 @@ Visualize the outputs with the visualization script to see if it worked correctl
## Session 2: monomachine schedulers ## Session 2: monomachine schedulers
**Objective for this session:** **Objective for this session:**
- implement another monomachine scheduler: EDF - implement another monomachine scheduler: EDF
- compare FCFS and EDF in terms of mean waiting time and tardiness - compare FCFS and EDF in terms of waiting time and lateness
### Exercise 1: EDF monomachine
Implement an EDF scheduler monomachine.
The file name will be called `edfMono.py` and the class `EdfMono`.
**Hints:** remember that we use Batsim `walltime` field to store the deadline.
In pybatsim, this information is stored in `job.requested_time`.
Test your scheduler by running it on different workload inputs.
**Do not hesitate to create your own inputs to see how it behaves in different situations!**
Upload your file `edfMono.py` on Moodle.
### Exercise 2: compare FCFS and EDF
#### 2.1 Gantt chart
Produce the Gatt-chart visualization of the simulation with the workload of session1-exercise1, for both FCFS and EDF schedulers.
Save the image as a PDF file (we remind that we can use the option `-o` of the visualization script, for example:
`python util/plot.py out/edf_jobs.csv --noDisplay -o out/edf_ex1.pdf`).
Upload the 2 PDFs on Moodle.
#### 2.2 Scheduling metrics
Batsim output `schedule.csv` ([see documentation](https://batsim.readthedocs.io/en/latest/output-schedule.html)) provides us with some scheduling metrics.
For example, we can read the mean and max **waiting time**, which is the time that elapsed between the submission of the job and the beginning of its execution.
Unfortunately, Batsim do not compute the **lateness** for us.
We will have to calculate this information form the `jobs.csv`.
Create a script that computes the mean and max lateness from a `jobs.csv` given as input.
You can use any programming language that you like, for example python with the library [pandas](https://pandas.pydata.org/docs/index.html).
Ask for help from your lab's teacher if you don't know where to start.
Fill in the file [expe/metrics.txt](./expe/metrics.txt) for your two schedulers, and upload it on Moodle.
Do you find the same results as when you did it in class?
Which algorithm is better in terms of waiting time on this input?
In terms of lateness?
......
## Workload ex1, schedulers monos
FCFS:
- max w_time:
- mean w_time:
- max lateness:
- mean lateness:
EDF:
- max w_time:
- mean w_time:
- max lateness:
- mean lateness:
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment