r/retrocomputing • u/noborutkhs • Sep 26 '26
I found out that VRTX changed its scheduling behavior just after I used it as a reference in 1986 — does anyone know why?
I'm continuing to investigate an RTOS that I wrote in 1986 for a Motorola 68000-based system.
Recently I've been going through the old source code and trying to reconstruct not only what I did, but also why I made certain design decisions 40 years ago.
One detail led me down an unexpected path.
In my RTOS, when a task becomes ready, it is inserted before existing ready tasks of the same priority. So among equal-priority tasks, the behavior is effectively newest-first (LIFO-like).
I had completely forgotten why I designed it that way.
At the time, I wasn't actually a user of commercial RTOSes such as VRTX. I was developing my own RTOS and had obtained documentation for systems such as VRTX and pSOS as design references.
So I went back to the 1984 VRTX User's Guide.
And there it was.
VRTX used essentially the same rule: a newly inserted TCB was placed ahead of existing TCBs at the same priority, meaning that the most recently inserted task would run first.
That seems to explain a 40-year-old mystery in my own code.
But then I kept digging.
I found the VRTX32/68000 User's Guide from 1987, and by then the rule had changed.
It explicitly says that equal-priority tasks execute in the order in which they become ready:
FIFO / oldest-first.
So I now have this rather interesting little timeline:
1984 VRTX: newest-first among equal priorities
1986 my RTOS: newest-first
1987 VRTX32: FIFO / oldest-first
I had no idea this change had happened.
I wasn't following VRTX development after using its documentation as a reference, so there was no reason I would have encountered the 1987 change at the time.
And now, 40 years later, this has left me with a new question:
Why did VRTX change this behavior?
Was there a known problem with the earlier scheduling rule? Was FIFO considered more predictable or fair? Was it part of the VRTX32 redesign? Or was there some implementation reason behind it?
I've started looking at other RTOS designs from the period as well, including ITRON, but so far I haven't found a contemporary explanation for the change.
Of course, I don't actually need to know the answer in order to design an RTOS today.
But after finding that my 1986 design appears to reflect the 1984 VRTX behavior, I'm now simply curious about why the VRTX designers themselves changed their minds.
If anyone here used VRTX in the 1980s or early 1990s, or remembers discussions or documentation from that period, I'd love to hear what you know.
For context, here's my previous post about bringing this 1986 RTOS back to life on a Raspberry Pi Pico:
My 1986 RTOS is now fully preemptive on a Raspberry Pi Pico — and it changed how I think about the original design
7
u/Tabsels Sep 26 '26
I can’t speak about VRTX but in general a LIFO has the disadvantage of causing starvation in the case of processor overload.
5
u/HeyMerlin Sep 26 '26
Can’t add anything useful, but have to say… cool project, both from the 1986 and today’s perspective. Also enjoying the write up, keep posting your progress and descriptions.
2
u/Un_Ballerina_1952 Oct 04 '26
Wow, does this bring back memories. I got VRTX ROMs with S/Ns 1001 through 1009. Spent a couple of weeks sitting on my rowing machine studying the documentation to be sure I understood how the system calls worked and interacted, then wrapped our application (data acquisition and control of auto engines and dynamometers) architecture into the task structure and time slot arrangement. Worked a treat (except the ADC code I wrote wasn't reentrant and I had a bit of trouble when it got interrupted mid-conversion. (Original task control was simple round-robin calls and the inconsistent timing of data acquisition was problematic for the control side of the world.)
I never did look at LIFO vs FIFO task scheduling; it worked very well for my/our application.
Edit to add - that was a LOOOOONG time ago - just over 40 years, IIRC.
2
u/0-moon Oct 08 '26
it makes sense that among equal priority tasks they run on a fifo order when yielding or blocking and getting back to ready. but when they are preempted by a higher prio task they switch from running to ready and will run as soon as they are the highest ready again. thats posix SCH_FIFO on the real time extension
1
u/Kyle_2099 Oct 05 '26
Is there any of this that isn't AI slop?
Like, is this account even controlled by a human? The sloptext is very obvious.
0
u/Sneftel Sep 26 '26
Do you have an LLM chew your food too, or just your Reddit posts?
0
u/[deleted] Sep 26 '26
[deleted] — view deleted comment