12.07.2015 Views

COPYRIGHT 2008, PRINCETON UNIVERSITY PRESS

COPYRIGHT 2008, PRINCETON UNIVERSITY PRESS

COPYRIGHT 2008, PRINCETON UNIVERSITY PRESS

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

high-performance computing hardware 355CPU6GB/scacheRAMcacheMain Store32 KB2 GB2 MB32 TB@111Mb/sFigure 14.3 Typical memory hierarchy for a single-processor, high-performance computer(B = bytes, K, M, G, T = kilo, mega, giga, tera).RAM: Random-access memory or central memory is in the middle memory inthe hierarchy in Figure 14.3. RAM can be accessed directly, that is, in randomorder, and it can be accessed quickly, that is, without mechanical devices. It iswhere your program resides while it is being processed.Pages: Central memory is organized into pages, which are blocks of memoryof fixed length. The operating system labels and organizes its memory pagesmuch like we do the pages of a book; they are numbered and kept track ofwith a table of contents. Typical page sizes are from 4 to 16 kB.Hard disk: Finally, at the bottom of the memory pyramid is permanent storageon magnetic disks or optical devices. Although disks are very slow comparedto RAM, they can store vast amounts of data and sometimes compensate fortheir slower speeds by using a cache of their own, the paging storage controller.Virtual memory: True to its name, this is a part of memory you will not find inour figures because it is virtual. It acts like RAM but resides on the disk.When we speak of fast and slow memory we are using a time scale set by the clockin the CPU. To be specific, if your computer has a clock speed or cycle time of 1 ns,this means that it could perform a billion operations per second if it could get itshands on the needed data quickly enough (typically, more than 10 cycles are neededto execute a single instruction). While it usually takes 1 cycle to transfer data fromthe cache to the CPU, the other memories are much slower, and so you can speedyour program up by not having the CPU wait for transfers among different levelsof memory. Compilers try to do this for you, but their success is affected by yourprogramming style.−101<strong>COPYRIGHT</strong> <strong>2008</strong>, PRINCET O N UNIVE R S I T Y P R E S SEVALUATION COPY ONLY. NOT FOR USE IN COURSES.ALLpup_06.04 — <strong>2008</strong>/2/15 — Page 355

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!