I can't remember how any of these work.
The two main types of computer memory is ROM and RAM. In today's computers memory is not accessed directly by the CPU, it is done with cache access.
Reference
What Every Programmer Should Know About Memory - 2007
Memory Barriers: a Hardware View for Software Hackers - 2009
http://www.puppetmastertrading.com/images/hwViewForSwHackers.pdf