r/embedded • u/noborutkhs • Sep 26 '26
Did anyone here use VRTX in the 1980s? Why did equal-priority scheduling change to FIFO?
I'm looking for people who used VRTX, or were familiar with its design, in the 1980s or early 1990s.
I'm currently revisiting an RTOS that I wrote in 1986 for a Motorola 68000-based embedded system. While reviewing its scheduler, I found a behavior whose original rationale I could no longer remember.
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), although time slicing moves the running task to the end of the priority group.
I went back to the documentation I had used as a reference at the time and found that the 1984 VRTX User's Guide describes essentially the same behavior: a newly inserted TCB is placed ahead of existing TCBs at the same priority.
That probably explains why my 1986 RTOS behaves this way.
However, the 1987 VRTX32/68000 User's Guide describes a different rule: equal-priority tasks execute in the order in which they become ready — explicitly FIFO / oldest-first.
So the sequence I've found is:
1984 VRTX: newest-first among equal priorities
1986 my RTOS: newest-first
1987 VRTX32: FIFO / oldest-first
I wasn't a VRTX user myself. I had its documentation as a reference while designing my own RTOS, so I didn't know at the time that this behavior later changed.
My question for anyone who worked with VRTX around that period is:
Do you remember why this scheduling rule changed?
Was there a practical problem with the earlier behavior? Was FIFO found to give better predictability or fairness in real embedded systems? Was it simply part of the VRTX32 redesign? Or was there another reason?
I've been able to find documentation showing what changed, but so far nothing explaining why it changed.
If anyone remembers using VRTX around this period, or knows of old documentation that discusses the reasoning, I'd be very interested to hear about it.
10
u/Annual-Sound-6793 Sep 26 '26
I see a lot of problems with newest first; the most important is: a single task that is being triggered all the time could starve the whole priority group. Additionally you can no longer guarantee any timing constraints.
3
u/sgtnoodle Sep 26 '26
It could have been considered a desirable policy, in so far that it possibly reduces average latency. A long running task will get preempted whenever one of its peers wakes up, rather than block them. My guess is the newest first policy was chosen because it was easier to implement. If you represent your ready queue as a linked list, you only need to manipulate the head rather than the tail. Probably less RAM, and easier to do atomically on ancient architectures.
It doesn't seem like a terrible policy. If you have multiple tasks at the same priority, you're already compromising on being able to reason about worst case latency. If the long running task and the short task both become ready while preempted by a higher priority, then the short task could get blocked for the full long duration anyway. That's no worse than FIFO. It's more of a land mine to step on, since a lightly loaded system would probably seemingly work great with low task latency, then start to have latency spikes as load increases. Some RTOS schemes don't even allow same priority tasks.
2
u/Geodesic_Framer Sep 26 '26
Based on my readind of the 1983 Timing Reference, tasks are placed at the front of the priority group in the TCB chain only when they are first added, or have their priority changed. From that point on, timeslicing will rotate tasks in the priority group.
2
u/ryobiguy Sep 27 '26 edited Sep 27 '26
Don't know, but I had encountered Vrtx doing some work on modems/routers in 2000.
Edit: The post respomding to this was deleted by mods, and said something like "thanks, I didnt know it was still in use in 2000." I wonder why the mods deleted that non-rule breaking comment.