Tuesday, 10 December 2013

Memory Organization (Memory Hierarchy/Cache Memory/Cache Analogy/Cache Example) by CHEAH SIEW KWAN B031310163

Memory Hierarchy

Memory is categorized into volatile and nonvolatile memories, with the former requiring constant power ON of the system to maintain data storage.Furthermore, a typical computer system provides a hierarchy of different times of memories for data storage.

Memory hierarchy can exploit in 2 approach:

Approach 1 :Expose
Registers, Main Memory, Disk each available as explicit storage alternatives

Approach 2 :Hide

Machine automatic assigns locations, depending on runtime usage patterns of single kind of memory, single address space.


Now to exploit the memory hierarchy, there are two technique that depend on CPU speed. The CPU speed is dominated by the memory performance. They are caching and virtual memory. Caching make slow main memory appear faster and virtual memory make small main memory appear bigger.

CACHE Memory

Cache memory is random access memory (RAM) that a computer microprocessor can access faster than it can access regular RAM.Cache is a small high-speed memory. Stores data from some frequently used addresses of main memory.Cache memory also is The level of the memory hierarchy closest to the CPU.

CACHE Analogy

You are writing notes in a notepad in llibrary.
-In your work, youneed take a reference book to table.
-Sit down and write.
-Suddenly stop writing and take a book on the table to reference.
-You are not  return the book to the shelve immediately, you just put on the table.
-Then you need another book to refer, go take another book for your work.
-Soon, your table have a few books that you need to refer.
-Now you can do your work smoothly without get the reference book from the shelve.
-You see, the table where you use is the cache for the library.

Cache  Example

Here is the example of cache.
Now, we need:
-8-blocks(1 word per block)
-direct mapped

-initial state









No comments:

Post a Comment