have quanta of different lengths. When the process has exhausted its
quantum, it is displaced and during the current era, it will no longer be
performed. Management is given to another process. If, however, the
process is paused for I / O or due to synchronization, its quantum is not
considered exhausted and it may be exhausted by the scheduler during the
current era. The era ends when all ready-to-complete processes have
exhausted their quanta. In this case, the scheduling algorithm recalculates
the quanta for all processes and begins a new era.
The quantum, which is set at the beginning of the era, is called the
basic
quantum of the processing time. Its values can be dynamically modified by
the nice () and setpriority () system calls. The descendant process always
inherits the basic quantum of its ancestor.
There are two types of process priority: fixed, for real-time processes that
are set only during the process creation, and dynamic, for normal processes,
which depend on the basic priority and the time remaining until the
quantum is exhausted. Dynamic priority to any conventional process is
always lower than the priority of any real process for the first time.
We describe the most important fields of the process data structure for
planning:
❖
Policy - determines to which group the process belongs (normal,
real-time FIFO algorithm, etc.)
❖
Nice - specifies the value on which the base quantum of the
processing time is based (in the future, for simplicity, we will
consider nice to be equal to the base quantum; in fact, this is not quite
so)
❖
Counter - Contains the number of timer interrupts left before the
process quantum is exhausted. At the beginning of the era of a
counter, the values of the base quantum are reduced and reduced by
one in the timer interrupt handler