You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

task.go 1.3 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. Copyright (c) [2023] [pcm]
  3. [pcm-coordinator] is licensed under Mulan PSL v2.
  4. You can use this software according to the terms and conditions of the Mulan PSL v2.
  5. You may obtain a copy of Mulan PSL v2 at:
  6. http://license.coscl.org.cn/MulanPSL2
  7. THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  8. EITHER EXPaRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  9. MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  10. See the Mulan PSL v2 for more details.
  11. */
  12. package providerPricing
  13. type Task struct {
  14. Tid int
  15. Replicas int //副本数
  16. Cpu float64
  17. Mem float64
  18. Disk float64
  19. Time int //单个副本的运行时间
  20. T0 int
  21. T1 int
  22. Pr float64 //延迟最低,用户满意度为1时用户的支付价格
  23. B int
  24. MaxscoreStrategy *Strategy
  25. ResourcePerTask [][]int //存储调度后每个云厂商的具体占用资源剩余执行时间
  26. }
  27. func NewTask(id int, replicas int, cpu float64, mem float64, disk float64, time int, t0 int, t1 int, Pr float64) *Task {
  28. return &Task{
  29. Tid: id,
  30. Replicas: replicas,
  31. Cpu: cpu,
  32. Mem: mem,
  33. Disk: disk,
  34. Time: time,
  35. T0: t0,
  36. T1: t1,
  37. Pr: Pr,
  38. B: 5,
  39. }
  40. }

PCM is positioned as Software stack over Cloud, aiming to build the standards and ecology of heterogeneous cloud collaboration for JCC in a non intrusive and autonomous peer-to-peer manner.