Module IV Memory Organization
Classification of Memory Memory is the component of computer which stores instruction and data in binary form It is divided into 2 types: Primary Memory Secondary Memory
Primary Memory It allows CPU to access data and instructions as quickly as possible. Program or data is kept here when CPU needs them. In practice, it is required to store only a portion of program or data needed by CPU
Secondary Memory It stores programs and data not immediately needed by CPU It provides a cost-effective system. It brings portions of programs and data into primary memory as needed : virtual memory scheme. Operating system manages the movement of portions of program and data.
Primary Memory Mostly semiconductor memories They are of 2 types: Random Access Memory (RAM) Read Only Memory (ROM)
RAM Transfer data of memory in terms of memory word. Each of the 2n words in the memory has m bits. It is a (2nxm)-bit memory. MBR store the data to be written into or read from memory
RAM
RAM To read from memory, To write into memory Address is provided in MAR Read signal is set to 1 A copy of contents of the addressed memory is brought into MBR. To write into memory Data is placed in MBR Address is placed in MAR Write signal is set to 1. MBR content is transferred into addressed location.
RAM Two types of RAMs are : Static Dynamic
Static RAM(SRAM) Each memory cell is built out of a flip-flop. The content of the memory cell (either 1 or 0) remains intact as long as the power is on. They are used in speed-critical applications. E.g. Cache Memory
Dynamic RAM (DRAM) It is built out of a capacitor. Charge level of capacitor determines 1 or 0 state. Because the charge decays with time , these cells must be refreshed to retain the content. They require complex refresh circuits
Dynamic RAM (DRAM) Because of refresh time , they are slower than static. More DRAM cells can be fabricated on the same area of silicon than static cells. They are used when large memories are needed and speed is not a critical design parameter. E.g. Main Memory
Types of ROM Masked ROM PROM EPROM EEPROM
Masked ROM Its contents are programmed by the IC manufacturer They are hard-wired It contains a pre-programmed set of data or instructions. It is less expensive
Masked ROM : Example Consider a 4 byte diode ROM. Address line A0 and A1 are decoded by 2:4 decoder and is used to select one of the four rows The decoder output is active low. Each output line goes to logic 0 if the diode connects the output data column to the selected row. Data is availed at output lines when OE signal is low
Programmable Read Only Memory (PROM) In this chip data can be written only once. Once a program is written onto it,it remains there forever. PROM is manufactured as blank memory To write data onto a chip, a special device called a PROM programmer or PROM burner is needed. The process of programming a PROM is called burning the PROM.
PROM Example
EPROM (Erasable PROM) It retains its contents until it is exposed to ultraviolet light. The uv light clears its contents, making it possible to reprogram the memory. To write to and erase on EPROM, a special device called a PROM programmer or PROM burner is needed.
EEPROM Electrically Erasable PROM It can be programmed and erased electrically. It can be reprogrammed about 10,000 times. Both erasing and programming take about 4 to 10 ms Any location can be selectively erased and programmed (one byte at a time, rather than erasing the entire chip)
Memory Hierarchy To implement memory systems, the following relationships hold: • Faster access time, greater cost per bit • Greater capacity, smaller cost per bit • Greater capacity, slower access time Dilemma: Designer would prefer large-capacity memory but to improve performance he needs to use faster low capacity memories. Solution : Do not rely on a single memory type but to employ a memory hierarchy
Memory Hierarchy
Memory Hierarchy As one goes down the hierarchy: a. Decrease in cost per bit b. Increase in capacity c. Increase in access time d. Decrease in frequency of access of the memory by the processor Thus, smaller, more expensive, faster memories are supplemented by larger, cheaper, slower memories.