JuliaCon 2025

Task scheduling and fairness
2025-07-25 , Main Room 3

Julia tasks are lightweight threads that Julia schedules MxN on OS threads. Tasks are cooperatively scheduled: there is no preemption; switches typically occur when waiting for events. In such a system, fairness is difficult to achieve--tasks can hog CPU time and starve other tasks.

We will describe the consequences of a lack of fairness in a real world system--RAI's knowledge graph system. We show how we were able to improve and discuss the implications for future work on Julia's scheduler.


In RAI's Julia build, we carry, among other patches, a one line patch that has a dramatic effect on scheduling fairness. In this talk, we will describe both the positives and the negatives of this patch. We will also discuss the fairness implications of a work-stealing scheduler, glance at where other languages have gone, and speculate on alternatives.

Kiran has contributed to Julia in a number of ways for over 10 years. He is currently a Principal Software Engineer at RelationalAI.

This speaker also appears in: