I gather that the main ways of the CPU addressing devices are "port" and "memory" mapped.
In both of these:
- How are devices dynamically assigned an address - who assigns it and how?
- How does the CPU then know a device exists, has been assigned and what the address is, particularly its running programs? (how does this work both if the computer is on and off)
- How do interrupts work with these devices?
- What's the distinction between what the OS and the hardware does?
- Is it fair to say that Memory Mapped is the dominant approach in modern systems?
Realise this might be a lot in one go but thanks in advance!