Implement in-thunk `wait()` with task continuations

Đang mở
#391 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
julia
Lĩnh vực
distributed-systems

Hướng nghiên cứu

Bắt đầu bằng cách lần theo các đường đi của scheduler, việc xử lý mức sử dụng bộ xử lý và quá trình thực thi task được mô tả trong issue. Xác định cách một task đang chạy hiện nhường quyền thực thi và cách một task khác được chọn. Hoàn tất khi một wait bên trong thunk có thể tạm dừng quá trình thực thi, lập lịch một continuation sau khi task khác hoàn tất và giữ nguyên hành vi scheduling dự kiến.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

eager api scheduler speculative

In order for a running Dagger task to wait on another task (such as when a task spawns a DAG dynamically and waits on its completion), we need to communicate to the scheduler that our task is going to temporarily sleep until a certain condition is met (namely that another task has completed). We currently hack around this by forcibly decreasing the current processor's pressure/occupancy by the amount that the yielding task consumes, which effectively allows another task to be run. This is generally the behavior that we want, but is not a very clean way to do it, and can introduce more bugs when the functionality needs to be tweaked.

A better approach would be to treat the yielding task as temporarily completed, and scheduling its continuation (the rest of its execution) as another task to be scheduled once a condition is reached. This would remove the task from view of the processor it was running on, which simplifies per-processor scheduling. This yielding mechanism would also be beneficial for increasing the number of low-occupancy tasks that can be scheduled at once, since we then have the ability to run another task while we wait for a waiting task to meet its condition.

The condition based-scheduling required for this feature would also be quite useful for other cases where we want to intentionally pause execution of a new or yielding task until same important constraint is loosened (such as waiting until more memory becomes available, waiting for data to become available on a Channel, etc.).

Ngôn ngữ chính
Julia
Star
734
Fork
94
Merge trung bình
4 ngày 18 giờ
Pull request đã merge (30 ngày)
2

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của JuliaParallel/Dagger.jl

Tất cả issue của JuliaParallel/Dagger.jl

Issue tương tự

Thêm issue về Julia

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.