set
the priorities, wood or disordered, which is called the related list.
All of the planning strategies and algorithms that we will look at below are
short-term planning.
Planning Strategies - Displacement And Non-
Displacement Multitasking
Before considering basic planning strategies, let's
list the options for
transferring controls from one thread to another:
❖
After the flow has entered a standby state (for example, during
input-output or connection)
❖
After completion of the flow
❖
Explicit (the thread itself gives the processor other threads for a
while until it is busy)
❖
Interrupts (for example, a timer interrupt can interrupt a stream that
is running longer than allowed)
The latter option differs from the others in
that the flow cannot control
when the control transfer time has come, which is the responsibility of the
operating system scheduler. Depending on this variant of control
transmission, there are two main strategies for flow planning - displacement
and non-displacement multitasking.
In pre-emptive multitasking, logical flows may
be temporarily interrupted
without the need for them to transfer control to other flows. Interrupting the
flow and transfer control to another stream often done in the interrupt
handler of the system (and also the mayor). This strategy is implemented in
all modern operating systems.
In multitasking, flows may be performed
during an unlimited time and
cannot be used in interrupted OSes. For non-redundant multitasking, the
latter control transmission is not implemented, and the streams themselves
must give control of the OS for transmission to other threads or at least go
to standby. If a thread forgets or fails to do so, for example, it will take the
processor an endless loop, other threads will not be able to continue their
work. This strategy was implemented in Nowell Net Ware.
Naturally, the implementation of non-redundant multitasking in the general
case makes the system quite unstable (any incorrectly written application of
the user can cause a "hang" of the whole system). The practice has shown
that non-redundant multitasking in systems with user applications cannot be
implemented. Such a strategy, however, can
be used in systems where all
applications are executed in kernel mode and are actually system
drivers. The development of such applications requires high skills of
programmers, requirements for reliability of applications can be compared
with the requirements for the OS itself.
With the simplicity of
implementation and absence of external interruptions of flows from the OS,
the scheduler can increase system productivity for the limited range of tasks
(for example, in the case of Net Ware OS it was to use the system as a file
server).