DOC PREVIEW
SJSU CS 147 - MemoryHeirarchy

This preview shows page 1-2-3-4-5-6 out of 18 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 18 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 18 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 18 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 18 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 18 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 18 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 18 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Memory HierarchyMemory HierarchyLevels ContinuedPurpose of the HierarchyLocalityTypes of LocalityCache ArchitectureCache Architecture ContinuedDirect-MapFully-Associate CacheSet-Associative CacheCache Hit/MissVirtual MemorySlide 14How does Virtual Memory Work?Slide 16ExampleAcknowledgmentsMemory HierarchyRamya KandasamyCS 147Section 3Memory HierarchyRegistersLevel One CacheLevel Two CacheMain MemoryNUMAVirtual MemoryFile StorageNetwork StorageNear-Line StorageOff-Line StorageHard CopyIncreasing Cost,IncreasingSpeed,Decrease SizeDecreasing Cost,Decreasing Speed,Increasing SizeLevels Continued-The top level CPU registers provide the fastest memory but also is the smallest memory object (with only 8 registers)-As the diagram shows, the more we move down the hierarchy, the slower and larger the memory objects getPurpose of the HierarchyThree questions which are asked when creating memory are:How fastHow muchHow expensive•The purpose of the hierarchy is to allow fast access to large amounts of memory at a reasonable costLocalityHierarchal memory makes use of locality to create an organized and efficient structureWhat is locality? Locality is the phenomenon, that the collection of the data locations referenced in a short period of time in a running computer, often consists of relatively well predictable clustersTypes of LocalityTemporal localitySpatial localityEquidistant localityBranch localityCache ArchitectureCache memory is memory that is very fast and is built into the CPU or located next to it on a chipIt stores information based on the principles of locality and allows the computer to avoid the bottleneck caused by the system busHow does cache work to efficiently store data?Cache Architecture ContinuedCache can often be organized as a set of cache lines. For example, a cache of 8kb can be organized as 512 lines with 16 bytes eachThe idea behind cache is to have each line be attached to certain memory region. So for the above example, cache line #0 could correspond to addresses $10000..$1000FDirect-MapOne way that the lines can correspond to addresses is called direct-mappingDirect mapping essentially means that a block of main memory is always loaded into the same cache line in the cache.Fully-Associate CacheFully-Associative caches makes it so that the cache lines are not dependent on memory addressesAlthough this allows for great deal of flexibility, it can be expensive and slow down the memory processSet-Associative CacheSet Associative Cache is much like a compromiseWe group together a few cache lines to create a set and a block in memory can map to any one of the lines of a specific setThus, each block can only map to one set but can be in any of the linesCache Hit/MissIf an item is found in cache, it is called a hitIf an item is not found, it is called a miss, and the information must be loaded from main memoryThere are three replacement algorithms we went over in class:-First in, First out -Least Recently Used-Least Frequently UsedVirtual MemoryVirtual memory is not really physical memoryIt is a technique which gives programs the idea that it has working memory even if physically it may overflow to disk storageIt makes programming large applications easier and efficiently uses real physical memoryHow does Virtual Memory Work?Executable program is divided into pages, some of which are loaded into main memory, some loaded into disk areaWhen program runs and requires an instruction not stored in memory, a page fault occursThe operating system then loads the next page from disk onto main memory (least used frames on main memory freed up)ExampleSo say you have loaded an operating system, web browser, word processor, and several other applications into RAM (or Random Access Memory) If RAM does not have enough space to hold all these applications (RAM usually has 32 megabytes or 64), virtual memory is put into playIt takes the overflow pages and saves it onto disk and then room is made on the RAMAcknowledgmentsSome of the sites I used for diagrams


View Full Document

SJSU CS 147 - MemoryHeirarchy

Documents in this Course
Cache

Cache

24 pages

Memory

Memory

54 pages

Memory

Memory

70 pages

Lecture 1

Lecture 1

53 pages

Cisc

Cisc

18 pages

Quiz 1

Quiz 1

4 pages

LECTURE 2

LECTURE 2

66 pages

RISC

RISC

40 pages

LECTURE 2

LECTURE 2

66 pages

Lecture 2

Lecture 2

67 pages

Lecture1

Lecture1

53 pages

Chapter 5

Chapter 5

14 pages

Memory

Memory

27 pages

Counters

Counters

62 pages

Load more
Download MemoryHeirarchy
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view MemoryHeirarchy and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view MemoryHeirarchy 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?