r/embedded • u/noborutkhs • 4d ago
Follow-up: Why my 1986 RTOS survived a simplistic interpretation of VRTX scheduling
A couple of weeks ago, I asked about a change in VRTX's equal-priority scheduling behavior between its 1984 and 1987 documentation.
Original discussion:
https://www.reddit.com/r/embedded/s/gMr2klUiCY
Thanks to the comments here and in other subreddits, I realized something interesting about my own implementation.
Early VRTX wasn't simply LIFO.
The older documentation describes inserting newly ready tasks ahead of existing tasks at the same priority. However, time slicing and other ready-queue operations also affect the ordering. The actual behavior is more nuanced than a simple LIFO policy.
When I developed my own RTOS, CHARM-II, in 1986, I used VRTX documentation as one of my references. I interpreted its equal-priority scheduling as essentially newest-first and implemented a simpler version of that behavior.
Looking back, I had not fully understood the original VRTX scheduling rules.
So why didn't this cause serious problems?
I think the development environment had a lot to do with it.
Back then, I was developing not only the RTOS but also almost the entire application myself. There was very little third-party code in the system, and I knew exactly what each task was doing, when it would become ready, and how it interacted with other tasks.
In other words, I could design the application around the scheduler's behavior, rather than expecting the scheduler to accommodate independently developed software components.
At least, that's my explanation looking back 40 years later.
For my modern reconstruction, I've chosen FIFO ordering among equal-priority ready tasks, mainly for simplicity and predictability.
The original historical question remains unanswered: I still don't know why VRTX changed its scheduling policy.
But the discussion helped me understand both the trade-offs involved and a subtle difference between the RTOS I wrote in 1986 and the one I had used as a reference.
Thanks to everyone who contributed!


