What is the Difference Between Memory Mapped IO and IO Mapped IO

The main difference between memory mapped IO and IO mapped IO is that the memory mapped IO uses the same address space for both memory and IO device while the IO mapped IO uses two separate address spaces for memory and IO device.

CPU uses two methods to perform input/output operations between the CPU and peripheral devices in the computer. These two methods are called memory mapped IO and IO mapped IO. Memory-mapped IO uses the same address space to address both memory and I/O devices. On the other hand, IO mapped IO uses separate address spaces to address memory and IO devices.

Key Areas Covered

1. What is Memory Mapped IO 
     – Definition, Features
2. What is IO Mapped IO
     – Definition, Features
3. What is the Difference Between Memory Mapped IO and IO Mapped IO
     – Comparison of Key Differences

Key Terms

Memory Mapped IO, IO Mapped IODifference Between Memory Mapped IO and IO Mapped IO - Comparison Summary

What is Memory Mapped IO

Memory mapped IO uses one address space for memory and input and output devices. In other words, some addresses are assigned to memory while others are assigned to store the addresses of IO devices. There is one set of read and write instruction lines. The same set of instructions work for both memory and IO operations. Therefore, the instructions used to manipulate memory can be used for IO devices too.  Hence, it can lessen the addressing capability of memory because some are occupied by the IO. 

Difference Between Memory Mapped IO and IO Mapped IO

Figure 1: IO Devices and Memory in Computer

What is IO Mapped IO

IO mapped IO uses two separate address spaces for memory locations and for IO devices. There are two separate control lines for both memory and IO transfer. In other words, there are different read-write instruction for both IO and memory. IO read and IO write are for IO transfer whereas memory read and memory write are for memory transfer. IO mapped IO is also called port-mapped IO or isolated IO.

Difference Between Memory Mapped IO and IO Mapped IO

Definition

Memory mapped IO is a method to perform input/output (I/O) operations between the central processing unit (CPU) and peripheral devices in a computer that uses one address space for memory and IO devices. IO mapped IO is a method to perform input/output (I/O) operations between the central processing unit (CPU) and peripheral devices in a computer that uses two separate address spaces for memory and IO devices. Thus, this definition explains the basis of the difference between memory mapped IO and IO mapped IO.

Address Spaces

The main difference between memory mapped IO and IO mapped IO is that the memory mapped IO uses the same address space for both memory and IO devices. IO mapped IO uses two separate address spaces for memory and IO device.

Addresses for Memory

Branching from the above, there is another difference between memory mapped IO and IO mapped IO. As the memory mapped IO uses one address space for both IO and memory, the available addresses for memory are minimum due to the additional addresses for IO.  In IO mapped IO, all the addresses can be used by the memory.

Instructions

While memory mapped IO uses the same instructions for both IO and memory operations, IO mapped IO uses separate instructions for read and write operations in IO and memory. We can say this as one other difference between memory mapped IO and IO mapped IO.

Efficiency

Moreover, memory mapped IO is less efficient while IO mapped IO is more efficient.

Conclusion

Memory mapped IO and IO mapped IO are two methods to perform input/output operations between the CPU and peripheral devices in the computer. The basic difference between memory mapped IO and IO mapped IO is that memory mapped IO uses the same address space for both memory and IO device while IO mapped IO uses two separate address spaces for memory and IO device.

Reference:

1. Memory Mapped i/o in Computer Organization | Part-1/2 | COA, Education 4u, 11 Dec. 2017, Available here.
2. “O.” Wikipedia, Wikimedia Foundation, 19 Sept. 2018, Available here.

Image Courtesy:

1. “Computer2” By Hr.hanafi – Own work (CC BY-SA 3.0) via Commons Wikimedia

About the Author: Lithmee

Lithmee holds a Bachelor of Science degree in Computer Systems Engineering and is reading for her Master’s degree in Computer Science. She is passionate about sharing her knowldge in the areas of programming, data science, and computer systems.

Leave a Reply