• Recounting A Quantum When Creating A New Process
  • 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
    bet51/203
    Sana10.01.2024
    Hajmi6,34 Mb.
    #134102
    1   ...   47   48   49   50   51   52   53   54   ...   203
    Bog'liq
    Linux This Book Includes 4 Manuscripts The Underground Bible

    Dynamic Priority Calculation
    Let us return to the calculation of dynamic priority. To do this, use the
    goodness () function. Consider the possible values that it can return.
    ❖ 
    0 - when the process has run out of time. This process will not be
    selected for execution. Except when it is in the queue of finished
    processes first, and all other processes in the queue have also
    exhausted their quantum

    0 to 1000 - if the process has not exhausted its quantum of
    time. This value is calculated based on the value of the base quantum
    of the process and the portion of the current quantum remaining in
    it. This can be summarized as follows:
    c = p.counter + p.nice; where p is a pointer to the control block of the
    process.
    This implies that the longer the process takes to complete and the longer it's
    base quantum, the higher its priority. In addition, further increasing the


    value per unit for processes that use the same memory as ancestors (for
    example, if the process shows the flow created by using the clone () ) .
    Recounting A Quantum When Creating A New
    Process
    Consider what happens when you create a new process. The simplest
    solution (to copy the counter value to the descendant data structure) can
    cause processes to artificially extend their quant by creating new
    descendants that execute the same code. In order to prevent this, after
    the fork () function, the values of the counter are split in half: one half goes
    to descendants, the other remains ancestral.
    List the disadvantages of the algorithm.
    ❖ 
    The choice of process to execute is due to the calculation of the
    dynamic priority for all processes in the queue of finished
    processes. With the increasing number of ready processes in the
    system, it is unprofitable to view the queue from start to finish during
    each call of the scheduling procedure
    ❖ 
    If the number of processes is very large, it will take a long time to
    list all the dynamic priorities at the beginning of a new era. On the
    other hand, epochs change less often with more processes in the
    system
    ❖ 
    The algorithm is designed to reduce response time for processes
    with limited I / O capabilities, even if they are not interactive (eg,
    background search engine indexing) and do not require a short
    response time
    ❖ 
    With the increase in the number of processors, maintaining common
    queues that do not take into account the presence of different
    processors becomes unprofitable

    Download 6,34 Mb.
    1   ...   47   48   49   50   51   52   53   54   ...   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