pr7.2
This commit is contained in:
@@ -1,41 +1,3 @@
|
||||
# PR-7.2 — Deterministic Scheduler Core
|
||||
|
||||
## Briefing
|
||||
|
||||
Implement a cooperative deterministic scheduler.
|
||||
|
||||
## Target
|
||||
|
||||
Scheduler structure inside VM:
|
||||
|
||||
* `ready_queue: VecDeque<HeapRef>`
|
||||
* `sleeping: Vec<HeapRef>` (sorted or scanned by wake_tick)
|
||||
* `current: Option<HeapRef>`
|
||||
|
||||
Policy:
|
||||
|
||||
* FIFO for ready coroutines.
|
||||
* Sleeping coroutines move to ready when `wake_tick <= current_tick`.
|
||||
|
||||
No execution switching yet.
|
||||
|
||||
## Checklist
|
||||
|
||||
* [ ] Scheduler struct exists.
|
||||
* [ ] Deterministic FIFO behavior.
|
||||
* [ ] No randomness.
|
||||
|
||||
## Tests
|
||||
|
||||
* Enqueue 3 coroutines and ensure dequeue order stable.
|
||||
|
||||
## Junie Rules
|
||||
|
||||
You MAY add scheduler struct.
|
||||
You MUST NOT implement SPAWN/YIELD/SLEEP yet.
|
||||
|
||||
---
|
||||
|
||||
# PR-7.3 — SPAWN Instruction
|
||||
|
||||
## Briefing
|
||||
|
||||
Reference in New Issue
Block a user