Memory Organization Computer Organization and Architecture by Ravinder Nath Rajotiya - January 4, 20230 Share on Facebook Share Send email Mail Print Print Table of Contents Toggle Memory OrganizationMemory Hierarchy:Internal or the primary memory:External memory:Difference between cache, main memory and auxiliary memoryDifference between RAM and ROMMemory Organization:Memory Address Map:Example: Memory Organization Every computer system has following types of memory devices. The different types of memory can be explained as the memory hierarchy. Memory Hierarchy: The total capacity of the memory in a system can be visualized as a hierarchy of memory devices. It includes all memory devices employed in a computer from large size but very slow-speed to small size but very-high speed devices. The memory hierarchy can be represented as shown in figure below. Figure : Memory Heirarchy IOP is used to communication between main memory and the auxiliary memory. Cache is used to communicate between CPU and the main memory. Internal or the primary memory: The internal memory consists of random access memory (RAM), read only memory (ROM) and some high-speed memory such as cache memory. Random access memory (RAM): It is also known as the main memory and used to communicate with the CPU for all data and instructions. Read only memory (ROM): ROM is used to store permanent information and routines such the basic input-output services (BIOS) program and other interrupt service routines(ISR) etc. Caches memory : It is used to increase the processing speed of a system. It helps in compensating the speed difference between the main memory access and processor logic External memory: external storage devices are large capacity but slow-speed devices. They are used for storing very large programs such as the operating systems, media files and as a back-up device. Difference between cache, main memory and auxiliary memory Cache Memory RAM/Main memory External/Auxiliary storage Costliest Costlier Cheaper Very High Speed High Speed Slow Speed CPU has direct access to cache CPU has direct access to main memory CPU does not have direct access to auxiliary memory Typical access time is close to CPU logic speed may be 100ns Access time is close to 700 ns Access time is approximately 1000 times the main memory Block size is typically 1 to 16 words Block size is typically 16 to 64 words Block size is typically ranges from 256 to 2K words Used to store segments of programs currently being executed by CPU and temporary data that is most frequently used in present calculation by the processor (CPU) Communicates directly with CPU and stores programs and data currently and less frequently needed by the processor Used as back up for storing information that is not currently used. Difference between RAM and ROM Both RAM and ROM are the primary storage devices however there are following difference between them RAM ROM It is a relatively large and fast memory It is relatively small but fast memory Used to store programs and data during the processing by CPU RAM is used to store bulk of the program and data that is subject to change ROM is used for storing program that are permanently resident in the computer and for tables of constants that do not change in values once the production of the computer is complete. RAM is used for programs during computer operation ROM is needed for storing an initial program called as the bootstrap loader RAM is volatile ROM is non volatile Internal memory cell in a RAM occupy more space so for same-size chip RAM has less capacity Internal binary cell in ROM occupy less space so same size of ROM as of RAM will occupy more capacity Memory Organization: If the memory needed in a computer is larger than the capacity of one chip than the capacity of one chip, it is necessary to combine more than one chip. Both RAM and ROM can be organized in a similar way. Memory Address Map: The interconnection between memory and CPU is established from the knowledge of size of the total memory needed and the type of RAM and Rom used. The addressing of the memory can be established by means of a table that specifies the memory address assigned to each chip. This table is called as the memory address map, and is a pictorial representation of address space. Example: Construct the memory map for a system having the total 1KB memory size of 512 bytes of RAM and 512 byte of RAM. Assume that the RAM chips are 128 byte and ROM chips is 512 bye size. Solution: From the basic knowledge it can be easily found that we need four 128byyte RAMs to build 512 byte RAM and a single ROM chip. Total memory capacity of the system 512 byte RAM + 512 byte ROM = 1024 byte i.e. 1KB Address line needed: 9 address lines to address total of 512 byte RAM of which 7 address lines required for addressing RAM chips of 128 byte size and 02 lines for chip select. 9 address lines required for addressing ROM chip is of 512 byte size. Additional 1 line will be used to distinguish between a RAM or ROM address. Table below shows the memory address map for the total memory capacity for this system with 512 byte RAM and 512 byte ROM Memory Address map Here address lines A6 – A0 are the address of RAM chips of 128 byte size Address A8-A7 are used to select of four RAM chips Address line A9 is used to select RAM or Rom address space. Share on Facebook Share Send email Mail Print Print