A SEMINAR ON COMPUTER MEMORY. Computer Memory. Introduction What is memory ? Classification of memory Speed of memory. Components of a Computer.
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
Computer Memory • Introduction • What is memory ? • Classification of memory • Speed of memory
Components of a Computer Considering the main function performed by a computer we can broadly classify the hardware components in to the following two types named as : 1.Central Processing Unit (CPU). 2.Peripheral Devices connected to and controlled by the CPU.
Central processing Unit (CPU) A central processing unit (CPU) controls the execution of programs and performs the calculations. The CPU is also called as the brain of the computer. This is because execution of any task by a computer is controlled by the CPU. The CPU activities includes ensuring – all instructions for a program are executed and in the proper sequence ,the calculations and logical operations are performed correctly and the instructions and data are available for successfully executing a task.
Central processing Unit (CPU) For executing its jobs the CPU mainly uses three main interactive components. These are : 1. Primary storage section. 2. Arithmetic and logic unit . 3.Control unit.
MEMORY UNIT CONTROL UNIT INPUT UNIT OUTPUTUNIT ARITHMETIC LOGIC UNIT ( FUNCTIONAL BLOCK DIAGRAM OF A COMPUTER )
Primary Storage Section Primary storage section is also called as main memory ,may be compared to that portion of the brain where data and instructions get stored ad when a program is begins executed. The main memory is used to : Temporarily hold data received from input devices and keep them ready for processing. Hold data being processed and the intermediate results being generated there after . Hold the finished results of processing units released to the output devices. Hold the system software and application software in use.
Main Memory Main memory is the storage place where data and instructions can be stored into , and retrieved from when ever required by other functional blocks of a computer. A computer memory is provided with a locations where the data can be stored. Each memory location is identified by a unique address. The location stores the data in the form of bits. Normally each location can keep or store 8 bits (i.e. a byte). The memory location addresses starts from 0. Thus 0th location is actually the first location of a memory . A group of 8 bits is called a byte . The total capacity of memory is expressed in terms of bytes.
Main Memory (continue…) For example a 256 byte memory would means a memory with 256 locations numbered from 0 to 255, and each location capable of storing a byte (8 bits). The memory inside a computer is normally very big , 655360 bytes or even more . To express such big numbers ,we use terms like Kilobytes, Megabytes, Gigabytes etc. 1 byte = 8 bits 1 kilobyte = 1024 bytes 1 megabyte = 1024 kilobytes =1024 * 1024 bytes 1 gigabyte= 1024 megabyte =1024 * 1024 * 1024 bytes The specification of a computer is often expressed by the size of the primary storage.
Main Memory (continue…) There are two operations involved with the memory. Storing operation is termed as write operation to writing in the memory ; and the retrieval operation is termed as the read operation or reading from the memory. Normally a memory location contains 8 bits or 1 byte. The reading or writing of memory is also one location at a time normally. Though there are machines in which two or more bytes are read or written from a memory in a single read or write. The number of bytes fetched or written in a single memory reference is called the word size of the machine.
Classification of Memory Memory is broadly classified in to two types : 1. Random Access Memory (RAM) 2. Read Only Memory (ROM)
Random Access Memory (RAM) The memory where both reading and writing can take place is known as Random Access Memory (RAM).Random access memory (RAM) is the best known form of computer memory. RAM is considered"random access" because you can access any memory cell directly if you know the row and column that intersect at that cell. It is also known as the primary memory or volatile memory. Since access time in RAM is independent of the address of the storage location inside the memory is as easy to reach any other location and takes the same amount of time.
Random Access Memory(continue…) The opposite of RAM is serial access memory (SAM). SAM stores data as a series of memory cells that can only be accessed sequentially (like a cassette tape). If the data is not in the current location, each memory cell is checked until the needed data is found. SAM works very well for memory buffers, where the data is normally stored in the order in which it will be used (a good example is the texture buffer memory on a video card). RAM data, on the other hand, can be accessed in any order. RAM may be of two types ,these are :- 1. Static RAM 2. Dynamic RAM
Static RAM Static RAM elements ,once set to their values ,do not loose them if the power supply does not go off. Once some values is stored ,it will remain in the main memory till the power is on.These elements are costly and have a fast access.
Dynamic RAM In dynamic RAM the memory elements have less retention period and lose its value unless it is refreshed .Refreshing is a process where the RAM is read and rewritten .This kind of RAM requires extra circuits for refreshing. These are relatively slow but less costly compared to Static RAMs.This kind of memory is therefore used in mass scale. Dynamic RAM similar to a microprocessors a memory chip is an integrated circuit (IC) made of millions of transistors and capacitors. In the most common form of computer memory, dynamic random access memory (DRAM), a transistor and a capacitor are paired to create a memory cell, which represents a single bit of data. The capacitor holds the bit of information -- a 0 or a 1 (see how bits and bytes work for information on bits). The transistor acts as a switch that lets the control circuitry on the memory chip read the capacitor or change its state. Both of these(static and dynamic) are volatile i.e. , the moments power goes off all contents of RAM are lost.
EXTENDED MEMORY RESIDENCE MEMORY ( RANDOM ACCESS MEMORY ) Random access memory is divided in to two parts , i.e. extended memory and residence memory .
EXTENDED MEMORY RESIDENCE MEMORY UPPER MEMORY CONVENTIONAL MEMORY ( RANDOM ACCESS MEMORY )
Residence memory is divided in to two parts –upper memory or reserved memory and conventional memory or lower memory or base memory. Residence memory is again divided in to 16 segments. Each segments capacity is 64 kilobytes . First ten segments are known as conventional memory or lower memory or base memory. Next six segments are known as upper memory or reserved memory.
F0000-FFFFF UPPER MEMORY E0000-EFFFF D0000-DFFFF C0000-CFFFF B0000-BFFFF A0000-AFFFF CONVENTIONAL 90000-9FFFF Data Segment 80000-8FFFF 70000-7FFFF MEMORY 60000-6FFFF 50000-5FFFF 40000-4FFFF 30000-3FFFF 20000-2FFFF 10000-1FFFF 00000-0FFFF ( DIVISION OF RANDOM ACCESS MEMORY IN TO SEGMENTS )
Conventional Memory The conventional memory area extended from 00000 to 9FFFF. The reserved memory area or upper memory area extended from A0000 to FFFFF. Every segment contain 64 KB of offset address which are similar to each segment but their segment number is different.
0FFFF 00000 ( DIVISION OF A SEGMENT IN TO MEMORY CELLS ) • Each memory cell has an address which is of 20 bits ,known as absolute address .The absolute address is divided in to two parts : • Segment address (or segment number) • Offset address (or logical address)
Conventional Memory (continue…) If the absolute address is 10000 ,the here 0X0 is the segment number and 0000 is the offset address. Segment number 0x8 is known as the data segment which is of 64 KB. Data segment is again divide into five parts :- Data area ,Text area , Code area , Heap area , and Stack area. * Data area is again divided in to two parts :- initialized data area and un-initialized data area. * All functions are treated in code area. * All automatic variables are treated in stack area in LIFO format. * All dynamic memory allocation is done in heap area. * All null pointers are treated in text area.
Text Area Initialized data area Data Area Un-initialized data area Code Area Heap Area Stack Area Data Segment
Read Only Memory (ROM) There are portions in the computer memory where no writing is allowed.The contents are pre-written and can only be read. Such memories are called Read Only Memory(ROM).It is used for microprograms not available to normal programs .The term read only means that the storage cannot be altered by regular program instructions.The information from the memory may be read out but fresh information cannot be written into it. The microprograms in read only memory may be used for a variety of purposes , but a common use is to hold a set of instructions that are needed frequently , for executing small, extremely basic operation ,which are not available in the computer circuitry. The computer will be designed to carry out the initial instructions by reading them from ROM whenever the power is put on.
Read Only Memory(continue…) ROM can be classified into two types : Programmable ROM Erasable Programmable ROM. Programmable ROM or PROM are those in which the user can insert the contents of choice only once. Once the PROM is written , it can only be read and never be rewritten. Erasable Programmable ROMs or EPROM is another kind . As the name of suggests, it can be written many times by a special process.These are very useful for design and development.
Speed of Memory The fastness of main memory is expressed by memory access time. It is the time taken by the memory to read from or write in a single location of the memory .Speed is ex pressed in nano or micro seconds. Other than the main memory ,there are different memory elements used in different parts of the computer. They are : Cache Register Secondary storage etc .
Cache Cache is the fastest memory placed between the main program and the CPU. We know that each instruction is to be fetched by CPU from main memory . Main memory is comparatively slower than CPU, so it holds CPU when ever CPU refers to memory. Cache memory acts as a buffer and fetches chunk of contents from main memory to be used by CPU. Cache memory is very fast and very expensive ,so amount of cache memory in any system is usually much smaller than the main memory.
Register Registers are temporary storage place and holds data ,addresses etc., for doing operations on them for data transfer .There are many registers spread through the computer . Some of the more important registers like Program counter (PC) for storing the address if the current instructions being executed , accumulator (AC) for storing one of the operands being used and also for storing the results of the operation . A group of registers is kept exclusively for hardware operation. Another group of registers is provided for the programmers for better performance and ease for programs.
Secondary Storage The main memory is volatile i.e. contents of memory are lost the moments power is off. For reusing data and program ,it is essential to store them . Presently there are certain input output devices used for this purpose. Some can store huger amount of data and can retrieved them at will. No program can be executed directly from them. Programs always need to be sent to the main memory for execution. The floppy , hard disc and magnetic tapes are kind of memory . They are larger ,cheaper and slower than the main memory but can keep data intact even after power goes off. They are called secondary memory.
SPEED Registers Cache Main memory Disks Tapes VOLUME Pyramid showing relative speed and volumes of different storage media