操作系统期中考试复习(Review of mid-term examination of operating system)

1. 中断:

如任务A需要用到打印机,打印的时间相对于cpu来说会很长,如果在打印期间死等打印机太浪费资源,所以出现了中断,cpu会先放弃该任务的执行,然后转去执行其他任务,当打印机打印好后就会发出中断信号给cpu,cpu就暂停当前任务的执行,继续运行任务A。

————————

1. Interruption:

If the printer is needed for task a, the printing time will be very long compared with the CPU. If the printer wastes too much resources during printing, so there is an interrupt, the CPU will first give up the execution of the task, and then turn to other tasks. When the printer prints, it will send an interrupt signal to the CPU, and the CPU will suspend the execution of the current task and continue to run task a.