Training
×

Priority Based Scheduling

What thread is selected for execution when there is more than one in the ready state? Some OSs implement a first-in-first-out (FIFO) algorithm, also known as a round-robin, which gives all threads an equal chance. But there are also situations where one thread must get service before another (think of handling an incoming network message versus updating a disk file from the cache). In such a case the programmer can assign a priority to each thread and the OS uses the priority to choose from the list of ready threads.
Some OSs use a high-is-important priority, others (including INtime) have a zero-is-most-important mechanism. In this text we use the terms high (numerically low) and low (numerically high) priority.