For example,

in al, 8 

If the device at port 8 is very slow, then does CPU have to wait for completion of the instruction in?

Thanks!

有帮助吗?

解决方案

It depends on what part of the device is being "really slow". If it takes a lot of time to answer a PIO requests (like in and out), then yes, it will stall the execution unit (and everything that depends on it). The same would happen with "really slow" memory.

However, if the device takes a long time to complete its tasks (whatever they may be), but responds really quickly to PIO requests (e.g. indicating that it hasn't finished a task yet), then it doesn't really stall the CPU.

Properly designed hardware does the latter.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top