Question

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!

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top