Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is the difference between memory mapped io and io mapped io

Pls explain the difference between memory mapped IO and IO mapped IO

like image 924
kabhay Avatar asked Oct 08 '10 12:10

kabhay


2 Answers

Uhm,... unless I misunderstood, you're talking about two completely different things. I'll give you two very short explanations so you can google up what you need to now.

Memory-mapped I/O means mapping I/O hardware devices' memory into the main memory map. That is, there will be addresses in the computer's memory that won't actually correspond to your RAM, but to internal registers and memory of peripheral devices. This is the machine architecture Pointy was talking about.

There's also mapped I/O, which means taking (say) a file, and having the OS load portions of it in memory for faster access later on. In Unix, this can be accomplished through mmap().

I hope this helped.

like image 195
slezica Avatar answered Oct 14 '22 07:10

slezica


Memory mapped I/O is mapped into the same address space as program memory and/or user memory, and is accessed in the same way.

Port mapped I/O uses a separate, dedicated address space and is accessed via a dedicated set of microprocessor instructions.

As 16-bit processors will slowly become obsolete and replaced with 32-bit and 64-bit in general use, reserving ranges of memory address space for I/O is less of a problem, as the memory address space of the processor is usually much larger than the required space for all memory and I/O devices in a system.

Therefore, it has become more frequently practical to take advantage of the benefits of memory-mapped I/O.

The disadvantage to this method is that the entire address bus must be fully decoded for every device. For example, a machine with a 32-bit address bus would require logic gates to resolve the state of all 32 address lines to properly decode the specific address of any device. This increases the cost of adding hardware to the machine.

The advantage of IO Mapped IO system is that less logic is needed to decode a discrete address and therefore less cost to add hardware devices to a machine. However more instructions could be needed.

Ref:- Check This link

like image 32
RootPhoenix Avatar answered Oct 14 '22 07:10

RootPhoenix