1 / 17

Memory

Memory. and stuff. l e well drawn pyramid. Features. Name. Description. Data is lost quickly after powering down Data can be overwritten CPU can directly access data in memory. Volatile Mutable Accessibility. Cache Memory - features. Top level of memory Is volatile Mutable

jonny
Télécharger la présentation

Memory

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Memory and stuff.

  2. le well drawn pyramid

  3. Features Name Description Data is lost quickly after powering down Data can be overwritten CPU can directly access data in memory • Volatile • Mutable • Accessibility

  4. Cache Memory - features • Top level of memory • Is volatile • Mutable • Accessible

  5. Cache Memory - description • Copies data from other places • Commonly has two levels. • The first level (L1 cache) is directly ‘in’ the CPU • Smallest size (2-64kB) • Fastest speed (lowest distance to CPU) • L2 cache was formerly near the CPU on the motherboard • Relatively larger than L1 • Pretty fast too!

  6. Cache Memory - purpose • When the CPU reaches for data, it first looks in the cache. • If it finds what it wants, it’s called a ‘cache hit’ • Else, it will reach to the other levels of memory, and this is a ‘cache miss’ • Roughly 95% cache hits [citation needed]

  7. Cache Memory - analogy • Librarian (CPU) looks for things from book storage room • Cache is like a pouch storing most commonly borrowed books, saving the time needed to • Walk to room and back (data transfer round trip) • Search for the book in the room • Instead, Librarian first searches inside pouch containing 5 books • Smaller volume => easier to search • Virtually 0 distance

  8. Cache Memory (tl;dr) • Top level • Volatile, mutable, directly accessible • Small, fast • Stores copies of most commonly used data

  9. Primary Storage - features • Next level after cache. Most common example is RAM (random access memory) • Is volatile • Mutable • Accessible through memory bus

  10. Primary Storage - description • DRAM (dynamic) • Data is stored in capacitors that act as bits • Charged = 1, no charge =0 • Capacitors leak over time • => data leaks over time too • Data has to be periodically rewritten into DRAM • ‘refresh cycle’ • Most common form (cheapest)

  11. Primary Storage - description • SRAM (static) • Uses 4-6 transistors/bit than DRAM • DRAM uses 1 transistor + 1 capacitor/bit • Thus, costs more to make • Because of how it works, data is remanent (‘stays’) • But it is still volatile (when it loses power, data eventually vanishes) • Significantly less powerhungry • No need for data refresh • As little as a few microwattsH in idle state

  12. Secondary storage - features • Non-volatile • Stored on tape/metallic discs • Read/write with magnetic heads (think turntable) • May be mutable or not • Not directly accessible • Uses either primary (RAM) or I/O channels

  13. Secondary storage - purpose • Storing data permanently • Completely mutable (hard disk drive) • This type is mutable; stored on disk but can be rewritten • Partially mutable (flash memory) • Electronically rewritable • Used by USBs, cameras, PDAs, phones… • Completely unmutable (ROM) • Used to store information permanently (CDs, for example)

  14. Secondary storage - purpose • Difference in mutability, from HDD to ROM • Speed goes up • Flash memory is about as fast as DRAM • pure ROM is as fast as SRAM • Portability goes up

  15. Secondary storage - BIOS • The computer boots up through this • BIOS is ROM that primary memory reads from • Primary memory passes this info to CPU

  16. Virtual Memory • Virtualization of different types of storage • Creates a virtual version of memory • The OS (and other programs) treat the computer as if there is only one type of memory – “Virtual” memory • Space is borrowed from secondary storage, speed from primary storage

  17. Virtual Memory • “Page file” is a block of memory • Its size is the size of space borrowed from secondary storage • Thrashing occurs when you use up your virtual memory, and the computer repeatedly swaps between virtual and actual memory

More Related