Skip to content

refactor(scheduler): replace sorted PID registry - #33

Merged
MikiEEE merged 1 commit into
developfrom
refactor/oslist-pid-registry
Aug 22, 2026
Merged

refactor(scheduler): replace sorted PID registry#33
MikiEEE merged 1 commit into
developfrom
refactor/oslist-pid-registry

Conversation

@MikiEEE

@MikiEEE MikiEEE commented Aug 22, 2026

Copy link
Copy Markdown
Owner

Summary

  • replace the PID-sorted task list and duplicate used-PID set with one PID-to-task dictionary
  • use a bounded PID allocation cursor and keep deterministic PID-sorted snapshots
  • preserve priority FIFO queues, front resume behavior, the sleeping heap, and persistent has_ready checks
  • reject stale ready and sleep entries by task identity after PID reuse
  • use bounded ready deque construction compatible with the documented MicroPython constructor shape

Validation

  • python3 -m unittest discover -s tests -v (124 tests passed)
  • focused coverage for FIFO/front order, capacity exhaustion, PID reuse, invalid priority, queued deletion, stale sleeping entries, watcher accounting, and listing order
  • git diff --check origin/develop...HEAD

Follow-up

Real-device MicroPython heap and runtime measurements remain a separate validation item.

@MikiEEE
MikiEEE merged commit 734a36e into develop Aug 22, 2026
16 checks passed
@MikiEEE
MikiEEE deleted the refactor/oslist-pid-registry branch August 22, 2026 05:27
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.

1 participant