Skip to content

Commit 829b436

Browse files
lgirdwoodCopilot
andauthored
Update src/schedule/README.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Liam Girdwood <lgirdwood@gmail.com>
1 parent ad9e078 commit 829b436

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/schedule/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,9 @@ The TWB scheduler (`zephyr_twb_schedule.c`) provides execution budget limits for
137137
### Architecture
138138

139139
- **Separate Threads**: Similar to DP, each TWB task executes in its own Zephyr thread.
140-
- **Time Slicing**: When scheduled, the thread's granted cycle budget is translated to OS ticks (`k_thread_time_slice_set()`).
141-
- **Budget Exhaustion**: If the thread consumes its budget before completing its work for the tick, a callback (`scheduler_twb_task_cb()`) is invoked by the Zephyr kernel. This callback immediately drops the thread's priority to a background level (`CONFIG_TWB_THREAD_LOW_PRIORITY`), preventing starvation of other threads.
142-
- **Replenishment**: On the next LL tick (`scheduler_twb_ll_tick()`), the consumed cycles are reset, and the thread's original priority and time slice are restored, granting it a fresh budget.
140+
- **Time Slicing**: When scheduled, the thread's execution budget is configured in OS ticks via `k_thread_time_slice_set()`. This tick-based budget is internally converted to hardware cycles for accounting against the CPU cycles actually consumed.
141+
- **Budget Exhaustion**: If the thread consumes its budget (as measured in hardware cycles derived from the tick budget) before completing its work for the tick, a callback (`scheduler_twb_task_cb()`) is invoked by the Zephyr kernel. This callback immediately drops the thread's priority to a background level (`CONFIG_TWB_THREAD_LOW_PRIORITY`), preventing starvation of other threads.
142+
- **Replenishment**: On the next LL tick (`scheduler_twb_ll_tick()`), the consumed hardware cycles are reset, and the thread's original priority and time slice are restored, granting it a fresh tick-based budget.
143143

144144
### Task State Diagram
145145

0 commit comments

Comments
 (0)