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

Aperta
#391 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
julia

Direzione di ricerca

Inizia tracciando i percorsi dello scheduler, della gestione dell’occupazione del processore e dell’esecuzione dei task descritti nell’issue. Determina in che modo un task in esecuzione cede attualmente l’esecuzione e come viene selezionato un altro task. Il lavoro è completato quando un wait all’interno di un thunk può sospendere l’esecuzione, pianificare una continuazione dopo il completamento di un altro task e preservare il comportamento di scheduling previsto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.).

Lingua principale
Julia
Stelle
734
Fork
94
Merge medio
4g 18h
PR unite (30g)
2

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di JuliaParallel/Dagger.jl

Tutte le issue di JuliaParallel/Dagger.jl

Issue simili

Altre issue su Julia

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.