lower priority (and with a longer quantum). As a result, flows with shorter
intervals (such as limited I / O) remain with high priority, and flows with
longer intervals extend their time. You can also automatically move non-
managed streams from the lower tier to the tier in and out.
Lottery Planning
Planning lottery ( lottery scheduling ) - algorithm, easy to understand and
easy to implement and it has great potential. The idea of lottery planning is
that:
❖
The stream receives an insane amount of lottery tickets, each of
which entitles the processor
to use T for a time
❖
The scheduler selects one lottery ticket at random over a period of
time T
❖
The winnable stream gets control to the next dra w
Lottery planning allows you to:
❖
Emulate circular scheduling, giving each stream the same number
of tickets
❖
Emulate priority scheduling, distributing tickets according to
stream
priorities
❖
Emulate SRTCF - give short streams more tickets than long ones (if
the stream received at least one ticket, it would not starve)
❖
Ensure that the processing time is split between threads - give each
thread a number of tickets proportional to the fraction of processor
time it needs to allocate (for example, if there are three threads, and it
is necessary for thread A to occupy 50% of the processor and
threads B and C, 25 each %, it is possible to give stream A two tickets
and flows B and C one each)
❖
To
change priorities, selecting and adding tickets on the go
Although most of these tasks can be solved by lottery planning, only
approximately, with some likelihood,
in practice, they are quite
satisfactory. The longer the system works, the closer the results will be to
the theoretical values (by the law of large numbers). In fact, lottery
planning takes advantage of the fact that all planning ideology is largely
heuristic since one cannot accurately predict the nature of flow behavior in
the system .