Presentation is loading. Please wait.

Presentation is loading. Please wait.

Memory.

Similar presentations


Presentation on theme: "Memory."— Presentation transcript:

1 Memory

2 Introduction Memory is one of the three main units of the computer
Memory can be classified as Random Access (RAM) or Sequential As read/Write (RWM) or Read only (ROM) By whether it is volatile or nonvolatile Whether reading is destructive or not The two main forms of RAM are DRAM (Dynamic RAM) and SRAM (static RAM)

3 Introduction DRAM is the most common type of computer memory
It is called dynamic because it has to be refreshed hundreds of times each second in order to retain data Each bit in DRAM is designed around a tiny capacitor that can store an electric charge If the capacitor is charged, then it is storing a bit value of 1 If it is not charged, it is storing a bit value of 0 The capacitor losses its charge rapidly hence the reason why it must be recharged

4 Introduction SRAM is about five times faster than DRAM, twice as expensive, and twice as big It also requires much more power and dissipates much more heat It uses only transistors in it circuitry Either four transistors and 2 resistors or 6 transistors are need for each bit of data that an SRAM chip can store Each bit of SRAM is a flip-flop ( a circuit that has two stable states. Once placed in a given state, it stays in that state) Flips-flops are faster to read and write than capacitors

5 Introduction Because of its smaller size and lower costs, DRAM is mostly used for the main memory The faster, more expensive SRAM is used for cache memory Memory Location Internal memory is often equated with main memory Other memories that are considered internal are CPU registers Cache External memory consists of devices such as the Hard disk, optical storage devices etc are accessible via an I/O controller

6 Introduction Memory Capacity
For internal memory, usually expressed in terms of bytes or words. Common word lengths are 8, 16 and 32 bits External memory capacity is also commonly expressed in terms of bytes Unit of transfer For main memory, this is the number of bits that can be read or written from memory at once. Usually is equal to the number of data lines to and from main memory. For external memory, data are usually transferred in much larger units than words. These are usually referred to as blocks Word The natural unit of organization of memory. Typically equal to the number of bits used to represent an integer or an instruction

7 Introduction Method of Access Sequential access
The memory linearly in records. We can say we have record 1, 2, 3 and so on. To get to record say 5, we have to traverse record 1 to 4 Usually a shared read write mechanism is used Direct Access Blocks have addresses that can be directly addressed, but within the block, record must be accessed sequentially by the read/write mechanism Random access Every location in memory has a unique address which is directly wired to the read write mechanism. Hence all locations are accessed directly and in constant time

8 Introduction Method of Access Associative access
This enables comparison of part of the address with some stored values. Once we find the stored value that matches the portion of the address, we can be able to retrieve the actual address which we can access directly Performance Access Time (Latency) For Random access memory, it the time form when an address is presented to memory, to the time the data have been stored or made available for use For non random access memory, it is the time it takes to position the read write mechanism at the desire location

9 Introduction Performance Memory Cycle Time
This usually is applied to RAM and it refers to access time, plus any additional time before a second access can start This additional time may be for Transients to die from signal lines To regenerate data if they are read destructively Transfer Rate This is the rate at which data can be transferred into or out of a memory unit For RAM, this is 1/cycle time

10 Introduction For Non Random Access Memory the following relationship holds TN – Average time to read/Write N bits TA – Average Access time N – Number of bits R – Transfer rate in bits per second Physical Types This refers to the physical material used to construct memory RAM is usually made from semiconductor components Hard disk/ Tape are usually made from magnetic surface components Optical components are used e.g. for CDs

11 Introduction Other Physical Characteristics Volatility
Volatile memory loses it values when power is disconnected Non-volatile memory retain their values in the absence of power Erasability Some memories can have their values deleted. These are said to be erasable Other memories cannot have their values changed once written. The are said to be nonerasable Organization This refers to how bits are aranged to form words

12 Memory Hierarchy Construction of memory usually involves a tradeoff btn three factors Cost Speed Capacity The faster the access time, the greater the cost per bit The greater the capacity, the lower the cost per bit The greater the capacity, the slower the access time The design would like to use technologies that provide greater capacity to have more memory. Also be cause these technologies are cheaper To meet performance needs, the designer will have to use expensive technologies with fast access. But because of cost, not much memory can be used

13 Memory Hierarchy The way out of this dilemma is not to use a single memory technology but to employ a memory hierarchy. Figure 1: Memory Hierarchy

14 Memory Hierarchy As one goes down the hierarchy, the following occur
Decreasing cost per bit Increasing capacity Increasing access time Decreasing frequency of access of the memory by the processor The key to the success of this organization is the decreasing frequency of access as one goes down the hierarchy This is due to a principle referred to as locality of reference During execution of a program by the processor, memory references for both data and instruction by the processor tend to cluster. Over a short period of time, the processor repeatedly references the same cluster/clusters of instructions and data

15 Memory Hierarchy Memory hierarchy exploits this principle to move the currently most frequently accessed clusters in the memories higher in the hierarchy so that their access takes as little time as possible When another cluster becomes the most frequently accessed, it is moved up in the hierarchy, probably replacing one of the clusters in the higher levels.

16 Cache Memory Cache memory is intended to give memory speed approaching that of the fastest memories available Also to enable provision of large memories at the price of the less expensive semiconductor memories The cache is much faster than the main memory It usually contains blocks of the most recently assessed portions of memory Figure 2: Data Transfer between CPU, memory and Cache

17 Cache Memory When the processor attempts to read a word of memory
A check is made to determine if the word is in the cache If it is, it is returned (this is referred to as a cache hit) If it is not (cache Miss) , the block containing the word is transferred from main memory to the cache This might necessitate replacement of a block that was originally in the cache The word is then delivered to the processor Because of the principle of locality of reference, it is very likely that other words in the same block will be reference by the CPU They can now be quickly retrieved from the cache

18 Cache Memory For this procedure to work, memory is usually divided into blocks The cache is much smaller than memory hence only a few blocks of memory can be in the cache at any particular time A block of memory consisting of several words occupies one cache line For instance if we have w words in memory, and a line of cache can be occupied by k words, then the number of blocks in memory is w/k, i.e. each block has k words.

19 Cache Memory Issues that must be addressed in cache design include
Mapping of memory blacks to cache lines Replacement policy Cache size Write policy Line size Multilevel caches Unified vs split caches

20 Main Memory The basic element of the semiconductor memory is the memory cell All semiconductor memories share certain characteristics They exhibit two stable states which can be used to represent 1 or 0 They are capable of being written into at least once to set the state There are capable of being sensed to read the data Figure 3: Memory Cell

21 Main Memory The cell usually has three terminals capable of carrying an electrical signal The select terminal selects the cell for either read or write i.e. at any particular time, only cells that are selected can be read from or written into The control terminal determines the type of operation E.g. this could be 0 of read and 1 for write The data line is used to transmit a signal either into or out of the cell The main memory is often referred to as RAM RAM is volatile, meaning that it has to be constantly supplied with power else it losses its data The two main technologies used to construct RAM are SRAM and DRAM

22 Main Memory Figure 4: one dimensional Random access memory unit

23 Main Memory Figure 5: 2 dimensional RAM addressing Scheme

24 Main Memory Figure 4 and 5 show two ways that memory can be addressed
In figure 4, the address in the address buffer us used to select one of the lines a0 to a2m -1. The w cells in the line that is activated can then be read or written to. This means that each row of cells in the storage cells unit correspond to one word or w bits (where each word has w bits) In figure 5, each of the cells shown can store one word i.e. it is a cell of w bits To select a given cell, we have to select both its row and its column Some of the address lines are used to specify the row, and others to specify the column Once a cell is selected, then data can be read or written into the cell The data and control lines are wired in a similar way

25 Main Memory Read only Memory (ROM)
This is a type of memory that is not volatile (nonvolatile) It contains a permanent pattern of data that cannot be changed The advantage of ROM is that data is permanently in main memory and need not be loaded from external storage It contains the same organization as RAM, but for the cells that are set to zero the bit line cannot be connected to the data line inside the cell, the lines that supply data are referred to as bit lines A switch connects this line to a voltage source to supply a value of 1. If this switch is always of, then only a zero can be supplied

26 Main Memory Read only Memory (ROM)
Every type of stored program computer needs some type of ROM i.e. storage that retains its data when data is lost This is used to store the initial program that runs when the computer is powered on in a process known as bootstrapping or booting Data is written into ROMS during fabrication This presents several problems ROMS are only economical if they are purchased in large quantities (economies of scale), since producing a single chip is expensive If an error is made, it cannot be collected It cannot be used in R&D work since designers frequently need to modify the contents of memory as they refine a design

27 Main Memory Programmable Read only Memory (PROM)
PROM chips are usually manufacture with all their bits set to one Each cell contains a small fuse that can be blown by applying a current that is larger than that used in normal operation When this fuse is blown, this cell can only generate a 0 The cells that still contain their fuses generate a value of 1 This is called programming the chip and is usually done with a device called a burner

28 Main Memory Erasable Programmable Read only Memory (EPROM)
Is read and written electrically like PROM Before a write operation, all the storage cells must be erased to the same initial state by exposure of the chip to ultraviolet radiation Erasure is performed by shining an intense ultraviolet light via a window that is designed into the chip It is more expensive than PROM but has the advantage of multiple update capability

29 Main Memory Electrically Erasable Programmable Read only Memory (EPROM) This is a read mostly memory that can be written into any time without erasing the prior contents The write operation takes considerable longer than the read operation It can be read/erased at the byte level

30 Main Memory Flash Memory Uses electronic erasing technology
It can be erased or programmed in blocks instead of one byte at a time It does not provide for byte level erasure Uses only one transistor per bit hence achieves high densities


Download ppt "Memory."

Similar presentations


Ads by Google