Multilevel Memories
Computer Memory Overview The memory is that part of computer where programs and data are stored. The basical concept is the following: Bits The basic unit of memory is the binary digit called a bit. A ...
Computer Memory Overview
The memory is that part of computer where programs and data are stored. The basical concept is the following:
- Bits
The basic unit of memory is the binary digit called a bit. A bit may contain a 0 or 1. It is the simplest possible unit
- Memory addresses
- Memories consist of a number of cells or locations each of which can store a piece of information. Each location has a number called its address, by which program can refer to it. The cells is the smallest addressable
- If an address has m bits, the maximum number of cells addressable is 2m.
- Byte: 8-bits
- Bytes are grouped into words. The significance of word is that most instruction operate on entire word. A computer with a 32bit/word has 4 bytes/word
- Byte ordering
- The bytes in a word can be numbered from left-to-right or right-to-left.
- The former system, where the numbering begin at the “big” (i.e, high-order) end is called a big endian computer, such as the SPARC or the big IBM mainframes. In contras it is a little endian computer, such as the Intel family using right-to-left numbering for the representation of a 32 bit computer.
Characteristics of Memory System
- Capacity: the amount of information that can be contained in a memory unit -- usually in terms of words or bytes
- Memory word: the natural unit of organization in the memory, typically the number of bits used to represent a number
- Addressable unit: the fundamental data element size that can be addressed in the memory -- typically either the word size or individual bytes
- Unit of transfer: The number of data elements transferred at a time – usually bits in main memory and blocks in secondary memory
- Transfer rate: Rate at which data is transferred to/from the memory device
- Access time:
– For RAM, the time to address the unit and perform the transfer
– For non-random access memory, the time to position the R/W head over the desired location
- Memory cycle time: Access time plus any other time required before a second access can be started
- Access technique: how are memory contents accessed
– Random access:
» Each location has a unique physical address
» Locations can be accessed in any order and all access times are the same
» What we term “RAM” is more aptly called
read/write memory since this access technique also applies to ROMs as well
» Example: main memory
– Sequential access:
» Data does not have a unique address
» Must read all data items in sequence until the desired item is found
» Access times are highly variable
» Example: tape drive units
– Direct access:
» Data items have unique addresses
» Access is done using a combination of moving to a general memory “area” followed by a sequential access to reach the
desired data item
» Example: disk drives
– Associative access:
» A variation of random access memory
» Data items are accessed based on their contents rather than their actual location
» Search all data items in parallel for a match to a given search pattern
» All memory locations searched in parallel without regard to the size of the memory
» Extremely fast for large memory sizes
» Cost per bit is 5-10 times that of a “normal” RAM cell
» Example: some cache memory units.
Computer memory system consists a various types of memory. Manufactures produce a number of different types of memory devices having a variety of technologies. The technology affect not only the operating chracteristics but also the manufacturing cost. In the section following we present an overviews of types of memory. You can see the study in detail of memory in the modules 10, 11 and 12.
- Main Memory (“Internal” memory components)
- RAM (read-write memory): Static RAM, Dynamic RAM
- ROM (Read Only Memories) : ROMs, PROMs, EPROMs, EEPROMs, Flash Memory.
- Cache memory
The cache memories are high-speed buffers for holding recently accessed data and neighboring data in main memory. The organization and operations of cache provide an apparently fast memory system.
- External Memory
- Magnetic disks
- RAID technology disks
- Optical disks
- Magnetic tape
Memory System Organization
No matter how big the main memory, how we can organize effectively the memory system in order to store more information than it can hold. The traditional solution to storing a great deal of data is a memory hierarchy.
- Major design objective of any memory system:
– To provide adequate storage capacity at
– An acceptable level of performance
– At a reasonable cost
- Four interrelated ways to meet this goal
– Use a hierarchy of storage devices
– Develop automatic space allocation methods for efficient use of the memory
– Through the use of virtual memory techniques, free the user from memory management tasks
– Design the memory and its related interconnection structure so that the proces
Organization
Three key characteristics increase for a memory hierarchy. They are the access time, the storage capacity and the cost. The memory hierarchy is illustrated in figure 9.1.
The memory hierarchyWe can see the memory hierarchy with six levels. At the top there are CPU registers, which can be accessed at full CPU speed. Next commes the cache memory, which is currently on order of 32 KByte to a few Mbyte. The main memory is next, with size currently ranging from 16 MB for entry-level systems to tens of Gigabytes. After that come magnetic disks, the current work horse for permanent storage. Finally we have magnetic tape and optical disks for archival storage.
- Basis of the memory hierarchy
– Registers internal to the CPU for temporary data storage (small in number but very fast)
– External storage for data and programs (relatively large and fast)
– External permanent storage (much larger and much slower)
Typical Memory Parameters- Characteristics of the memory hierarchy
– Consists of distinct “levels” of memory components
– Each level characterized by its size, access time, and cost per bit
– Each increasing level in the hierarchy consists of modules of larger capacity, slower access time, and lower cost/bit
Goal of the memory hierarchy. Try to match the processor speed with the rate of information transfer from the lowest element in the hierarchy.
- The memory hierarchy speed up the memory performance
The memory hierarchy works because of locality of reference
– Memory references made by the processor, for both instructions and data, tend to cluster together
+ Instruction loops, subroutines
+ Data arrays, tables
– Keep these clusters in high speed memory to reduce the average delay in accessing data
– Over time, the clusters being referenced will change -- memory management must deal with this
- Performance of a two level memory
Example: Suppsose that the processor has access to two level of memory:
– Two-level memory system
– Level 1 access time of 1 us
– Level 2 access time of 10us
– Ave access time = H(1) + (1-H)(10) ns
where: H is a fraction of all memory access that are found in the faster memory (e.g cache)
Performance of a two level memory