Jelly, 7 bytes
÷Ċ⁵x"ZẎ
A full program that accepts timesTimes quantumQuantum processesProcessIds
and prints the schedule.
How?
÷Ċ⁵x"ZẎ - Main Link: Times, Quantum
÷ - {Times} divided by {Quantum}
Ċ - ceiling -> {SlotCounts}
⁵ - program's third argument -> ProcessIds
" - {ProcessIds} zip {SlotCounts} with:
x - {ProcessId} times {SlotCount}
Z - transpose
Ẏ - tighten
- implicit print