COMPUTER MEMORY

4,349 views

Published on

Published in: Education, Technology, Business
1 Comment
3 Likes
Statistics
Notes
  • It is most usefull for me Thanks My frnd
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total views
4,349
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
247
Comments
1
Likes
3
Embeds 0
No embeds

No notes for slide

COMPUTER MEMORY

  1. 1. INTRODUCTIONIn computing, memory refers to the physical devices used to store programs(sequences of instructions) or data (e.g. program state information) on a temporaryor permanent basis for use in a computer or other digital electronic deviceThe term "memory" applies to any electronic component capable of temporarilystoring data. There are two main categories of memories: Internal memory that temporarily memorises data while programs are running.Internal memory uses microconductors, i.e. fast specialised electronic circuits.Internal memory corresponds to what we call random access memory (RAM). Auxiliary memory (also called physical memory or external memory) that storesinformation over the long term, including after the computer is turned off.Auxiliary memory corresponds to magnetic storage devices such as the hard drive,optical storage devices such as CD-ROMs and DVD-ROMs, as well as read-onlymemories.Technical CharacteristicsThe main characteristics of a memory are: Capacity, representing the global volume of information (in bits) that the memory can store Access time, corresponding to the time interval between the read/write request and the availability of the data Cycle time, representing the minimum time interval between two successive accesses Throughput, which defines the volume of information exchanged per unit of time, expressed in bits per second
  2. 2. Non-volatility, which characterises the ability of a memory to store data when it is not being supplied with electricity The term "memory" is often (but not always) associated with addressablesemiconductor memory, i.e. integrated circuits consisting of silicon-basedtransistors, used for example as primary memory but also other purposes incomputers and other digital electronic devices.There are two main types of semiconductor memory: Volatile Non-volatile. Examples of non-volatile memory are flash memory (sometimes used assecondary, sometimes primary computer memory) andROM/PROM/EPROM/EEPROM memory (used for firmware such as bootprograms). Examples of volatile memory are primary memory (typically dynamic RAM,DRAM), and fast CPU cache memory (typically static RAM, SRAM, which is fast butenergy-consuming and offer lower memory capacity per area unit than DRAM) .The semiconductor memory is organized into memory cells or bistable flip-flops,each storing one binary bit (0 or 1). The memory cells are grouped into words offix word length, for example 1, 2, 4, 8, 16, 32, 64 or 128 bit. Each word can beaccessed by a binary address of N bit, making it possible to store 2 raised by Nwords in the memory. This implies that processor registers normally are notconsidered as memory, since they only store one word and do not include anaddressing mechanism.Volatile memory
  3. 3. Volatile memory is computer memory that requires power to maintain the storedinformation. Most modern semiconductor volatile memory is either Static RAM(see SRAM) or dynamic RAM (see DRAM). SRAM retains its contents as long as thepower is connected and is easy to interface to but uses six transistors per bit.Dynamic RAM is more complicated to interface to and control and needs regularrefresh cycles to prevent its contents being lost. However, DRAM uses only onetransistor and a capacitor per bit, allowing it to reach much higher densities and,with more bits on a memory chip, be much cheaper per bit. SRAM is notworthwhile for desktop system memory, where DRAM dominates, but is used fortheir cache memories. SRAM is commonplace in small embedded systems, whichmight only need tens of kilobytes or less. Forthcoming volatile memorytechnologies that hope to replace or compete with SRAM and DRAM include Z-RAM, TTRAM, A-RAM and ETA RAM.Non-volatile memoryNon-volatile memory is computer memory that can retain the stored informationeven when not powered. Examples of non-volatile memory include read-onlymemory (see ROM), flash memory, most types of magnetic computer storagedevices (e.g. hard disks, floppy discs and magnetic tape), optical discs, and earlycomputer storage methods such as paper tape and punched cards. Forthcomingnon-volatile memory technologies include FeRAM, CBRAM, PRAM, SONOS, RRAM,Racetrack memory, NRAM and Millipede HOW MEMORY WORKS? Although memory is technically any form of electronic storage, it is used mostoften to identify fast, temporary forms of storage. If your computers CPU had toconstantly access the hard drive to retrieve every piece of data it needs, it wouldoperate very slowly. When the information is kept in memory, the CPU can accessit much more quickly. Most forms of memory are intended to store datatemporarily.As you can see in the diagram above, the CPU accesses memory according to adistinct hierarchy. Whether it comes from permanent storage (the hard drive) orinput (the keyboard), most data goes in random access memory (RAM) first. The
  4. 4. CPU then stores pieces of data it will need to access, often in a cache, andmaintains certain special instructions in the register. Well talk about cache andregisters later.All of the components in your computer, such as the CPU, the hard drive and theoperating system, work together as a team, and memory is one of the mostessential parts of this team. From the moment you turn your computer on untilthe time you shut it down, your CPU is constantly using memory. Lets take a lookat a typical scenario:• You turn the computer on.• The computer loads data from read-only memory (ROM) and performs apower-on self-test (POST) to make sure all the major components are functioningproperly. As part of this test, the memory controller checks all of the memoryaddresses with a quick read/write operation to ensure that there are no errors inthe memory chips. Read/write means that data is written to a bit and then readfrom that bit.• The computer loads the basic input/output system (BIOS) from ROM. TheBIOS provides the most basic information about storage devices, boot sequence,security, Plug and Play (auto device recognition) capability and a few other items.• The computer loads the operating system (OS) from the hard drive into thesystems RAM. Generally, the critical parts of the operating system are maintainedin RAM as long as the computer is on. This allows the CPU to have immediateaccess to the operating system, which enhances the performance andfunctionality of the overall system.• When you open an application, it is loaded into RAM. To conserve RAMusage, many applications load only the essential parts of the program initially andthen load other pieces as needed.• After an application is loaded, any files that are opened for use in thatapplication are loaded into RAM.• When you save a file and close the application, the file is written to thespecified storage device, and then it and the application are purged from RAM.
  5. 5. ¬In the list above, every time something is loaded or opened, it is placed intoRAM. This simply means that it has been put in the computers temporary storagearea so that the CPU can access that information more easily. The CPU requeststhe data it needs from RAM, processes it and writes new data back to RAM in acontinuous cycle. In most computers, this shuffling of data between the CPU andRAM happens millions of times every second. When an application is closed, itand any accompanying files are usually purged (deleted) from RAM to make roomfor new data. If the changed files are not saved to a permanent storage devicebefore being purged, they are lost.In the list above, every time something isloaded or opened, it is placed into RAM. This simply means that it has been put inthe computers temporary storage area so that the CPU can access thatinformation more easily. The CPU requests the data it needs from RAM, processesit and writes new data back to RAM in a continuous cycle. In most computers, thisshuffling of data between the CPU and RAM happens millions of times everysecond. When an application is closed, it and any accompanying files are usuallypurged (deleted) from RAM to make room for new data. If the changed files arenot saved to a permanent storage device before being purged, they are lost. RAM-RANDOM ACCESS MEMORYAs the name suggests, Random Access Memory can find and access the datarandomly. Sequential access is the opposite of Random access. In Sequentialaccess, to retrieve the data that is stored in the middle, all the data from thebeginning has to be read sequentially until the searched data is found. So it takestime. Where as in RAM, the data can be directly jumped to the middle ifnecessary without having to read the data sequentially. So the reading is faster. Incomputers and printers RAM is used. In fact, RAM is the most important memoryin computers and printers. Every file or application opened is placed in RAM. Anyinformation the computer needs or uses becomes part of a continuous cyclewhere the CPU requests data from RAM, processes it and then writes new databack to RAM. This can happen millions of times a second. However, this is usuallyjust for temporary file storage, so unless the data is saved somewhere, it isdeleted when the files or applications are closed. How RAM works???
  6. 6. Although memory is technically any form of electronic storage, it is used mostoften to identify fast, temporary forms of storage. If your computers CPU had toconstantly access the hard drive to retrieve every piece of data it needs, it wouldoperate very slowly. When the information is kept in memory, the CPU can accessit much more quickly. Most forms of memory are intended to store datatemporarily.As you can see in the diagram above, the CPU accesses memory according to adistinct hierarchy. Whether it comes from permanent storage (the hard drive) orinput (the keyboard), most data goes in random access memory (RAM) first. TheCPU then stores pieces of data it will need to access, often in a cache, andmaintains certain special instructions in the register. Well talk about cache andregisters later.All of the components in your computer, such as the CPU, the hard drive and theoperating system, work together as a team, and memory is one of the mostessential parts of this team. From the moment you turn your computer on untilthe time you shut it down, your CPU is constantly using memory. Lets take a lookat a typical scenario:• You turn the computer on.• The computer loads data from read-only memory (ROM) and performs apower-on self-test (POST) to make sure all the major components are functioningproperly. As part of this test, the memory controller checks all of the memoryaddresses with a quick read/write operation to ensure that there are no errors inthe memory chips. Read/write means that data is written to a bit and then readfrom that bit.• The computer loads the basic input/output system (BIOS) from ROM. TheBIOS provides the most basic information about storage devices, boot sequence,security, Plug and Play (auto device recognition) capability and a few other items.• The computer loads the operating system (OS) from the hard drive into thesystems RAM. Generally, the critical parts of the operating system are maintainedin RAM as long as the computer is on. This allows the CPU to have immediateaccess to the operating system, which enhances the performance andfunctionality of the overall system.
  7. 7. • When you open an application, it is loaded into RAM. To conserve RAMusage, many applications load only the essential parts of the program initially andthen load other pieces as needed.• After an application is loaded, any files that are opened for use in thatapplication are loaded into RAM.• When you save a file and close the application, the file is written to thespecified storage device, and then it and the application are purged from RAM.¬In the list above, every time something is loaded or opened, it is placed intoRAM. This simply means that it has been put in the computers temporary storagearea so that the CPU can access that information more easily. The CPU requeststhe data it needs from RAM, processes it and writes new data back to RAM in acontinuous cycle. In most computers, this shuffling of data between the CPU andRAM happens millions of times every second. When an application is closed, itand any accompanying files are usually purged (deleted) from RAM to make roomfor new data. If the changed files are not saved to a permanent storage devicebefore being purged, they are lost.automatically thousands of times per second. TYPES OF RAMRam is built by using two different techniques: 1. DRAM: DRAM stands for dynamic fandom access memory. It is a type of memory that is used in most computers. It is the least expensive kind of RAM. DRAM requires an electric current to maintain its electrical state. Theelectrical charge of DRAM decreases with time that may result in loss of data.DRAM is recharged or refreshed again and again to maintain its data. Theprocessor cannot access the data of DRAM when it is being refreshed. That is whyit is slow. 2. SRAM: SRAM stands for static random access memory. The memory cells are made from digital gates. Each cell can store data without any need of frequent recharging. CPU does not need to wait to access data from SRAM during processing. That is why it is faster than DRAM. It utilizes less power
  8. 8. than DRAM. SRAM is more expensive. It is normally used to build a very fast memory known as cache memory.RAM ROM-READ ONLY MEMORYROM stands for Read Only Memory. The instructions in ROM prepare thecomputer for use. These instructions can only be read but cannot be changed ordeleted. It is not possible to write new information or instructions into the ROM.ROM stores data and instructions permanently. When the power is switched off,the instructions stored in ROM are not lost. That is why ROM is known as non-volatile memory.
  9. 9. The information in ROM is stored by the manufacturer. When the computer isswitched on, the instructions in ROM are automatically loaded into the memoryof computer.Types of ROMDifferent types of ROM are as follows; 1. PROM: stands for programmable read only memory. This form of ROM is initially blank. The user or manufacturer can write data and programs on it using special devices. The user can write data and instruction on it only once. If there is any error in writing the instructions, the error cannot be removed from PROM. The chip becomes unusable. 1. EPROM: EPROM stands for erasable programmable read only memory. This form of ROM is initially blank. The user or manufacturer can write data and programs on it using special ultraviolet rays. The user then can write new program on it. 3. EEPROM: EEPROM stands for electronically erasable programmable read only memory. In this memory, user can erase and write instructions with the help of electrical pulses. It there is any error in writing the instructions, the user can erase the contents electronically. The contents of EEPROM can be modified easily.
  10. 10. VIRTUAL MEMORYVirtual memory typically comes into place when applications are too large for theRAM to handle. The operating System uses the hard drive to temporarily storeinformation and take it back when needed. This is normally a lot slower thanactual RAM and can possibly degrade performance if used to heavily. A part of thehard disk can be used as a Virtual Memory. Generally the size of the virtualmemory in a computer is 2 or 2.5 times greater than the RAM memory size in thatcomputer.Assume you are starting an application. But there are already many programsstarted previously that is occupying the RAM space. And the remaining space inRAM is not sufficient to use the new application that you are starting. Then thevirtual memory is used. Now the Operating System comes into play. It decideswhich are the applications that are not currently used and then moves them fromthe RAM memory to the Virtual memory in Hard Disk. Therefore the RAM is nowfree and the new application can occupy the space and be started. If the programthat is moved to the virtual memory is used again then the Operating Systembrings that application back from virtual memory to the RAM and some other idleapplication is moved to the virtual memory.Therefore the virtual memory is also referred to as Swap memory. HOW VIRTUAL MEMORY WORKS???
  11. 11. Virtual memory is a common part of most operating systems on desktopcomputers. It has become so common because it provides a big benefit for usersat a very low cost.Most computers today have something like 32 or 64 megabytes of RAM availablefor the CPU to use (see How RAM Works for details on RAM). Unfortunately, thatamount of RAM is not enough to run all of the programs that most users expectto run at once.For example, if you load the operating system, an e-mail program, a Web browserand word processor into RAM simultaneously, 32 megabytes is not enough tohold it all. If there were no such thing as virtual memory, then once you filled upthe available RAM your computer would have to say, "Sorry, you can not load anymore applications. Please close another application to load a new one." Withvirtual memory, what the computer can do is look at RAM for areas that have notbeen used recently and copy them onto the hard disk. This frees up space in RAMto load the new application.Because this copying happens automatically, you dont even know it is happening,and it makes your computer feel like is has unlimited RAM space even though itonly has 32 megabytes installed. Because hard disk space is so much cheaper thanRAM chips, it also has a nice economic benefit. The read/write speed of a hard drive is much slower than RAM, and thetechnology of a hard drive is not geared toward accessing small pieces of data at atime. If your system has to rely too heavily on virtual memory, you will notice asignificant performance drop. The key is to have enough RAM to handleeverything you tend to work on simultaneously -- then, the only time you "feel"the slowness of virtual memory is is when theres a slight pause when yourechanging tasks. When thats the case, virtual memory is perfect.When it is not the case, the operating system has to constantly swap informationback and forth between RAM and the hard disk. This is called thrashing, and it canmake your computer feel incredibly slow.The area of the hard disk that stores the RAM image is called a page file. It holdspages of RAM on the hard disk, and the operating system moves data back andforth between the page file and RAM. On a Windows machine, page files have a.SWP extension.
  12. 12. CACHE MEMORYA part of the main memory (RAM) can be used as Cache or it can be separatechip.The commands that are often used, or data often used will be kept in this staticRAM. This static RAM is called Cache memory.Cache Memory is used in-between the CPU and the RAM and holds the mostfrequently used data or instructions to be processed. Caching allows to do thecomputer tasks more rapidly.The main purpose of cache is to accelerate thecomputer while keeping the price of the computer low.Cache technology is theuse of faster but smaller memory type to accelerate a slower but larger typememory type.when using a cache , we must check the cache to see if an item is inthere .If it is there, it’s called a cache hit.If not it is called a cache miss and thecomputer must wait for a round trip from the larger,slower memory area.A cachehas some maximum size that is much smaller than the large storage area.It ispossible to have multiple layers of cache.There are three different grades of Cache. Some systems will only have level 1and level 2. More advanced systems will include the level 3 .  Level 1 (L1) - Is the primary and is on or very close to the processor. This is used for the most frequently used data and instructions.Memory accesses at full microprocessor speed ( 10 nanoseconds,4 kilobytes to 16 kilobytes in size)  Level 2 (L2) - Is second closest to the CPU and is more common to be on the motherboard. Depending on your motherboard it might be able to be updated. This is used for the most frequently used data and instructions.Memory access of type SRAM (around 20 to 30 nanoseconds,128 kilobytes to 512 kilobytes in size)
  13. 13.  Level 3 (L3) - This is the most advanced cache and will speed up the memory even further. This is used for the most frequently used data and instructions.But there are also Cache memory that comes independently from RAM. Level 1(L1) and Level 2 (L2) are types of cache memory. The cache integrated inside themicroprocessor is categorised as L1 cache. For example Pentium Processor comeswith 16KB cache. This is SRAM.The cache between the Microprocessor and the RAM is L2 Cache. This is alsoSRAM category

×