ALL > Computer and Education > courses > university courses > undergraduate courses > Operating System > zstu-(2021-2022)-1 > student homework directories > 2019329621196麻宣政 >
2019329621196麻宣政homework3 Version 0
👤 Author: by 1436830195qqcom 2021-09-25 14:19:02

  1. What is CPU scheduling criteria


Different CPU scheduling algorithms have different attributes, and choosing a specific algorithm will be more beneficial to certain processes. In order to select an algorithm for use in a specific situation, we must consider the properties of each algorithm.

In order to compare CPU scheduling algorithms, many comparison criteria can be used. Which features are selected for comparison is fundamentally different for determining which algorithm is the best. These guidelines include:

1)CPU usage: The CPU should be as busy as possible. Conceptually, CPU usage ranges from 0% to 100%. For an actual system, it should range from 40% (light-load system) to 90% (heavy-load system).

2)Throughput: If the CPU is busy executing the process, then the work is being completed. One method of measuring work is called throughput, which is the number of processes completed in a unit of time. For a long process, the amount of swallowed leaves may be one process per hour; for a short process, the throughput may be ten processes per second.

3)Turnaround time: From the perspective of a particular process, an important criterion is how long it takes to run the process. The time period from the submission of the process to the completion of the process is called the turnaround time. The turnaround time is the sum of all time periods, including waiting to enter the memory, waiting in the ready queue, executing on the CPU, and /O executing.

4)Waiting time: The CPU scheduling algorithm does not affect the time of the process running and executing I/O, it only affects the time required for the process to wait in the ready queue. The waiting time is the sum of the time spent waiting in the ready queue.

5)Response time: For interactive systems, turnaround time is not the best criterion. Usually, a process can produce output fairly early, and continue to calculate new results while outputting previous results to the user. Therefore, the other time is the time from when the request is submitted to when the first response is generated. This time is called response time, which is the time required to start the response, not the time required to output the response. Turnaround time is usually limited by the speed of the output device.

It is desirable to maximize the CPU usage and the amount of swallowed leaves, and minimize the turnaround time, waiting time and response time. In most cases, the average value is optimized. However, in some cases, the minimum or maximum value is optimized instead of the average value. For example, in order to ensure that all users can get good service, the maximum response time may be minimized.

  1. What is CPU burst time and I/O burst time


1)CPU burst time: It is the amount of time required by a process or can be said the amount of time required by the process to finish. We cannot estimate the time taken by the process before running it. Thus, most of the problem is related to the burst time.

Burst Time=Turn around Time(Completion Time)-Waiting Time.This is the time that a process spends on the CPU executing some code. CPU Burst deals with the running state of the process.

2)I/O burst time: While the process is in the running state, it may ask for I/O, thus the process goes to the block or wait state, where the I/O will be processed and then it will be sent back to the ready state. This is the time that a process spends in waiting for the completion of the I/O request. I/O Burst deals with the waiting state of the process.

Please login to reply. Login

Reversion History

Loading...
No reversions found.