Four processes p1, p2, p3 and p4 are running in the memory of a single-processor system. They form a cyclic queue with no priorities. Before the launch of the computing system, p1 was the first in the queue, p2 was the second, p3 was the third and p4 was the fourth. We know the number of conditional processor clock cycles needed to calculate each of these processes completely in the case of continuous calculation: for p1 - 18, for p2 - 24, for p3 - 48, for p4 - 42, and also the time quantum is known (K = 6) , representing the number of processor cycles allocated for the continuous calculation of the next process. After passing the next time slice, the calculated process is placed at the end of the queue, and the next process is taken from the head of the queue for the calculation. If only one single process is left incomplete in the queue, then all processor time is allocated to it.

The execution time of one process is equal to the number of processor cycles that have passed since the start of the calculation of this process (the first hit of this process on the calculation to the processor) until the end of the process calculation.

Determine the average computation time of all processes in the queue, dividing the sum of the execution time of all processes by the number of processes that were in the queue before the computing system was started. In the answer, specify the number accurate to the second decimal.

Note: when solving a task, the time for the operating system to perform planning and changing the calculated process should be ignored.

  • @ Eugene536, According to the rules of the forum, questions should not be limited to solving or completing student assignments. Please clarify what you have done yourself and what did not work out. - Nicolas Chabanovsky

1 answer 1

такты-> 6 12 18 24 30 36 42 48 54 60 ------|------|------|------|------|------|------|------|------|------|------| p1 [work] [work] [work](завершился) p2 [work] [work] [work] p3 [work] [work] [work] p4 [work] [work] и т.д. 

like that

  • and did not realize that when the process is placed in the queue, it still works! - Eugene536