1 /* Copyright (c) 2013-2020. The SimGrid Team. All rights reserved. */
3 /* This program is free software; you can redistribute it and/or modify it
4 * under the terms of the license (GNU LGPL) which comes with this package. */
8 #include "src/kernel/resource/DiskImpl.hpp"
21 class XBT_PRIVATE DiskS19Model;
22 class XBT_PRIVATE DiskS19;
23 class XBT_PRIVATE DiskS19Action;
29 class DiskS19Model : public DiskModel {
32 DiskImpl* createDisk(const std::string& id, double read_bw, double write_bw) override;
33 double next_occurring_event(double now) override;
34 void update_actions_state(double now, double delta) override;
41 class DiskS19 : public DiskImpl {
43 DiskS19(DiskModel* model, const std::string& name, kernel::lmm::System* maxminSystem, double read_bw,
45 ~DiskS19() override = default;
46 DiskAction* io_start(sg_size_t size, s4u::Io::OpType type) override;
47 DiskAction* read(sg_size_t size) override;
48 DiskAction* write(sg_size_t size) override;
55 class DiskS19Action : public DiskAction {
57 DiskS19Action(Model* model, double cost, bool failed, DiskImpl* disk, s4u::Io::OpType type);
58 void suspend() override;
59 void cancel() override;
60 void resume() override;
61 void set_max_duration(double duration) override;
62 void set_sharing_penalty(double sharing_penalty) override;
63 void update_remains_lazy(double now) override;
66 } // namespace resource
68 } // namespace simgrid
69 #endif /* DISK_S19_HPP_ */