Skip to content

Scheduler utility re-organization and JobStatus renaming#129

Merged
AlexJones0 merged 5 commits intolowRISC:masterfrom
AlexJones0:prepatory_refactors
Apr 1, 2026
Merged

Scheduler utility re-organization and JobStatus renaming#129
AlexJones0 merged 5 commits intolowRISC:masterfrom
AlexJones0:prepatory_refactors

Conversation

@AlexJones0
Copy link
Copy Markdown
Contributor

This PR is the tenth of a series of PRs to rewrite DVSim's core scheduling functionality (Scheduler, status display, launchers / runtime backends) to use an async design, with key goals of long term maintainability and extensibility.

This PR contains a set of refactors in preparation for introducing the async scheduler and runtime backends (i.e. launchers). It re-organizes the core functionality and utilities related to the scheduler to better reflect the structural dependencies within DVSim. It also performs some renaming - changing the Dispatched job status to a more comprehensible Running, and changing the JobStatus.ended property to be JobStatus.is_terminal.

See the commit messages for more information.

This doesn't make much sense living with the rest of the status printer
utilities which are core to the scheduler. As part of the scheduler
refactor, the status printers will be moved to be located within a
separate scheduler directory - so it makes sense to move this extra
unrelated utility function out here.

Signed-off-by: Alex Jones <alex.jones@lowrisc.org>
The functionality of both of these components is related to DVSim's
scheduling capability, and in the future more such components will be
added. As such, for readability and maintainability, move these
components under a separate `src/dvsim/scheduler` directory.

Signed-off-by: Alex Jones <alex.jones@lowrisc.org>
This is somewhat subjective, but "Dispatched" indicates that the job has
been assigned to some worker, and may not be actively executing yet.
This could be true for more complicated launchers (e.g. SGE, LSF, NC),
but the scheduler has no need to distinguish between the two states of
"handed off but not yet executing" and "actively executing". From a user
perspective, it makes more sense to see that the job is "running" - this
has a bit less ambiguity and more closely aligns with other similar
scheduler systems.

Signed-off-by: Alex Jones <alex.jones@lowrisc.org>
A small refactor - rather than hardcode each of these paths, dynamically
create them from the status names. Make sure we have a directory for
each terminal status and for running jobs.

Ideally these would be typed as `Path` objects but this is left to
future refactoring efforts.

Signed-off-by: Alex Jones <alex.jones@lowrisc.org>
Naming nit - make it more clear that this is referring to some terminal
state in the possible job state transition graph.

Signed-off-by: Alex Jones <alex.jones@lowrisc.org>
@AlexJones0 AlexJones0 added this pull request to the merge queue Apr 1, 2026
Merged via the queue into lowRISC:master with commit 25aab7f Apr 1, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants