4 ms·
I doubt it. Since this article predates the Microsoft-IBM split, I figured it was safe to consult my trusty Inside OS/2, by Microsoft’s Gordon Letwin: The sche
by twoodfin 6y ago
I doubt it. Since this article predates the Microsoft-IBM split, I figured it was safe to consult my trusty Inside OS/2, by Microsoft’s Gordon Letwin:
The scheduler's dispatch algorithm is very straightforward: It
executes the highest-priority runnable thread for as long as the thread wants the CPU. When that thread gives up the CPU--perhaps by waiting for an I/O operation--that thread is no longer runnable, and the scheduler executes the thread with the highest priority that is runnable. If a blocked thread becomes runnable and it has a higher priority than the thread currently running, the CPU is immediately preempted and assigned to the higher-priority thread. In summary, the CPU is always running the highest-priority runnable thread.
The scheduler's dispatcher is simplicity itself: It's blindly priority based.
That doesn’t sound like something that required bodily lifting from a mainframe OS.
- JdeBP 6y agoIt isn't. This is simple two-level scheduling that could be found in textbooks of the time. You've quoted a discussion of the low-level scheduler, a.k.a. dispatcher. If you read just 3 pages on from that quotation, you'll find a description of the mid-level scheduler that dynamically adjusts priorities (in two priority classes) according to whether threads consume their entire quanta; a rather simpler dynamic variation mechanism than those of some other contemporary operating systems, which did things like calculating decayed estimates of recent CPU usage over the past few seconds, and certainly not "magic". (Some operating systems have another level on top of those low-level and mid-level schedulers of high-level schedulers, that deal in things like scheduling jobs in batch, or performing whole-process swapping. OS/2 doesn't have that.)