That sounds nice and simple. I'll go with that. The primitive can check
for a runnable process simply:
the active process has no myList
a quiescent process (runnable but not the running one) has as its myList
the list in the quiescentProcesseLists array indexed by its priority.
So if neither of these is true the primitive can fail, and the fall-through
code can set the inst var.
I'd prefer if the primitive would not fail (meaning it should set the var itself), and the fallback code gets executed only on VMs that do not have the prim. It should purely be an optimization, if possible.
This is a pretty infrequent operation for the active process so the fallback code doesn't have to be highly efficient. I'd imagine waiting on an already signaled semaphore would do it? Or is that a no-op?