Previous | Next --- Slide 42 of 79
Back to Lecture Thumbnails

Question: What is an address space?


I think an address space can be seen as an interface provided by hardware or OS, where the user of this abstraction can access data by its address, or allocate space to store data (and get its address), etc.

In host device, a process uses the virtual address space provided by OS, which is then mapped to physical address space. GPU has its own memory, and cuda programs use a different address space.

An interesting or confusing thing is that in both host process and cuda program, an address is accessed by dereference a pointer. But if the memory it points to is allocated on one device, the pointer cannot be dereferenced on another device -- pointer is just a 8-byte value holding an address, and that address has to be used in the correct address space.


Just my thought: An address space is the range of discrete addresses which are available for either a device, processor or process. In this range, the corresponding device is able to save and retrieve data