• Planning Strategies - Displacement And Non- Displacement Multitasking
  • Linux: This Book Includes 4 Manuscripts. The Underground Bible to the unix operating System with Tools On Security and Kali Hacking to Understand Computer Programming, Data Science and Command Line




    Download 6,34 Mb.
    Pdf ko'rish
    bet43/203
    Sana10.01.2024
    Hajmi6,34 Mb.
    #134102
    1   ...   39   40   41   42   43   44   45   46   ...   203
    Bog'liq
    Linux This Book Includes 4 Manuscripts The Underground Bible

    Short-Term Planning
    Short-term planning or scheduling processor ( CPU scheduling ) is the
    most important type of planning. It answers two basic questions:
    ❖ 
    When to interrupt a stream?
    ❖ 
    Which of the ready-to-execute threads should the processor transfer
    at this point?
    A short-term scheduler is  an OS subsystem that interrupts the active flow
    in the event of a need and chooses the one that should be executed from the
    queue. Its performance is top-notch because it receives control very
    often. There is also a controller ( dispatcher ), which directly controls pre-
    selected streams (context switches) .
    The format of the queue of ready flows depends on the implementation of
    short-term planning. This stage can be organized on the principle of FIFO,


    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).

    Download 6,34 Mb.
    1   ...   39   40   41   42   43   44   45   46   ...   203




    Download 6,34 Mb.
    Pdf ko'rish

    Bosh sahifa
    Aloqalar

        Bosh sahifa



    Linux: This Book Includes 4 Manuscripts. The Underground Bible to the unix operating System with Tools On Security and Kali Hacking to Understand Computer Programming, Data Science and Command Line

    Download 6,34 Mb.
    Pdf ko'rish