A multi-channel program design system is equipped with a processor and two peripherals IO1, IO2, the existing 3 priority from high to low jobs J1, J2 and J3 have been loaded into main memory, their use of resources in the order and time to occupy are:
J1:io2 (MS), CPU (10ms), IO1 (30ms), CPU (10ms).
J2:io1 (ms), CPU (20ms), IO2 (40ms)
J3:CPU (30ms), IO1 (20ms)
Processor scheduling using a preemptive priority algorithm, ignoring other auxiliary operation time, answer the following questions:
(1) Calculate the time from start to completion of the J1, J2 and J3 of jobs respectively.
(2) CPU utilization when all 3 jobs are complete.
(3) The utilization of peripheral IO1 when all 3 jobs are completed.
Analysis
As stated previously, the three processes in the multi-channel system not only compete for the use of processors, but also compete for the use of peripherals, which makes the relationship between processes more complex. On the other hand, this is entitled to highlight the process of CPU and peripherals use, weakening the processing of job scheduling, so the title has been assumed that the three processes have been loaded into main memory, from this point of view, and reduce the difficulty of the subject. The parsing process is shown in Figure 4.2 (The horizontal arrows in the figure indicate the actual execution, and the horizontal dash indicates the wait process).
Answer:
(1) from Figure 4.2:
J1 from the beginning to the completion of the time is 0~80ms
J2 from the beginning to the completion of the time is 0~90ms
J3 from the beginning to the completion of the time is 0~90ms
(2) When all three jobs are complete, the CPU utilization is:
Up = (20 + 10 + 10 + 10 + 10 + 10)/90 = 70/90 = 77.8
(3) The utilization of peripheral IO1 when all three jobs are completed are:
Uio1 = (20 + 30 + 20)/90 = 70/90 = 77.8