6
ICC Module 3 Lesson 2 – Memory Hierarchies 1 / 6 © 2015 Ph. Janson Information, Computing & Communication Memory Hierarchies – Clip 2 – Concept School of Computer Science & Communications B. Falsafi (charts), Ph. Janson (commentary)

ICC Module 3 Lesson 2 – Memory Hierarchies 1 / 6 © 2015 Ph. Janson Information, Computing & Communication Memory Hierarchies – Clip 2 – Concept School

Embed Size (px)

Citation preview

PowerPoint Presentation

Memory Hierarchies Clip 2 ConceptSchool of Computer Science & CommunicationsB. Falsafi (charts), Ph. Janson (commentary)

Information, Computing & CommunicationICC Module 3 Lesson 2 Memory Hierarchies# / 6 2015 Ph. JansonThis video clip is part of the E.P.F.L. introductory course on Information, Computing, and Communication.It is the second in a set of video clips on memory hierarchies and management.

1OutlineClip 1 TechnologiesClip 2 ConceptClip 3 PrincipleClip 4 ImplementationClip 5 Reading memoryClip 6 Writing memoryClip 7 Cache management the Least Recently Used algorithmClip 8 A simulated exampleClip 9 Locality

First clipPrevious clipNext clip

ICC Module 3 Lesson 2 Memory Hierarchies# / 6 2015 Ph. JansonIt introduces the fundamental concept of memory hierarchies.2Problem !RAM is the only media whose throughput and latency match processor performanceBUT it presents a prohibitive cost and thus a limited sizenot to mention that it forgets everything when it is powered off !PerformanceRAMFlashMagnetic tapeCapacityDisk

ICC Module 3 Lesson 2 Memory Hierarchies# / 6 2015 Ph. JansonAs shown on this graphic plotting storage device capacity against performance, the larger capacity a device offers the slower it tends to be in terms of latency.As also underlined on the slide, RAM technology is the only one that is capable of approaching the performance requirements of modern processors.Yet RAM technology comes at a prohibitive cost and thus the amount of it one can typically afford is limited.Furthermore, RAM technology is volatile so that all information it contains is erased when powered off.3Solution: hierarchical memoryKeeping in fast memory only what is currently in useProcFLASHStorageMemoryInformation in usemanaged automatically(user / programnot involved)Transient Informations archivedmanaged manually(by user or program)PerennialOn-chip memoryOff-chip memoryHard diskMagnetic tapeNext lessonThis lesson

ICC Module 3 Lesson 2 Memory Hierarchies# / 6 2015 Ph. JansonThese cost, size, and volatility limitations are a major hurdle that must be overcome to build computers that are fast enough and offer enough storage capacity, yet are affordable and retain all information when powered off.

The trick to get around this challenge is to design computers at sitting at the top of memory hierarchies.Such hierarchies typically include 3 to 5 levels below the processor, where the higher levels provide limited amounts of expensive but fast memory while the lower levels provide unlimited amounts of inexpensive but slower storage.The hierarchy is then managed to always keep in the higher memory layers information that is currently in use while leaving in the lower layers information that is not currently needed.

At the top of the memory hierarchy, every modern computer provides some small amount of very fast RAM, called cache memory on the processor chip.Just below that level, the memory hierarchy always includes still limited-size and volatile but larger, somewhat slower, and less expensive main memory (RAM) off the processor chip.Then comes non-volatile storage (no longer called memory) in the form of SSD, flash, and / or hard disks.Some computers then come with an additional slower, cheaper, sometimes larger, non-volatile, removable storage layer using technologies such as flash, CDs, DVDs, or magnetic tapes.

The present set of video clips focuses on implementing the volatile part of the memory hierarchy,(in red on this picture) which is automatically managed by the computer hardware.The set of video clips in the next lesson will focus on the implementation of the non-volatile storage part of the hierarchy,(in blue on this picture) which requires more explicit management actions on the part of users and their software.4A real life analogy

Clothes in a suitcaseLimited spaceTemporary usageFor a tripDepending on climateAssorted colorsCarry with youbut in your cupboardAll your clothesPermanentlyOnly at home

ICC Module 3 Lesson 2 Memory Hierarchies# / 6 2015 Ph. JansonTo understand the basic concept of how a memory hierarchy operates compare it to what happens when you go on a trip.At home you have a house full or a room full or at least a cupboard full of your clothes and other belongings.But you never take all that with you on a trip. You take along only what you know you will need for the trip.And when you come back to empty your suitcase and put things back in the cupboards where they belong over the long term.5Another real life analogy

Music / photos on your smartphoneLimited spaceTemporary useClose , in your pocket but on your laptop Unlimited capacity All your songs/photos/films Distant, at home

ICC Module 3 Lesson 2 Memory Hierarchies# / 6 2015 Ph. JansonSimilarly with respect to information, you may have at home a powerful desktop or laptop computer containing all your files, music, photos, and films.Yet when you leave home for the day there is no room to put all that in your mobile phone.Thus on your phone, you take along only what you plan to use, listen to, or watch during the day,(knowing you can download more underway if you need to).

Inside computers or your tablet or phone, hierarchical memory is managed in exactly the same way.The computer and its software manage to import into main memory and cache only what it currently needs.The rest of the information remains in the lower levels of slower but larger, cheaper, and especially non-volatile storage.That way information is not lost if and when the computer, tablet, or phone is powered off.6