difference between static ram and dynamic ram

Upload: fahimafridi

Post on 02-Jun-2018

221 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/11/2019 Difference Between Static RAM and Dynamic RAM

    1/8

    What is the difference between static RAM anddynamic RAM in my computer?

    Your computer probably uses both static RAM and dynamic RAM at

    the same time, but it uses them for different reasons because of thecost difference between the two types. If you understand howdynamic RAM and static RAM chips work inside, it is easy to see whythe cost difference is there, and you can also understand the names.

    Dynamic RAM is the most common type of memory in use today.Inside a dynamic RAM chip, each memory cell holds one bit ofinformation and is made up of two parts a transistor and a capacitor.!hese are, of course, e"tremely small transistors and capacitors sothat millions of them can fit on a sin#le memory chip. !he capacitorholds the bit of information $$ a % or a & 'see (ow )its and )ytesWork for information on bits*. !he transistor acts as a switch that letsthe control circuitry on the memory chip read the capacitor or chan#eits state.

    A capacitor is like a small bucket that is able to store electrons. !ostore a & in the memory cell, the bucket is filled with electrons. !ostore a %, it is emptied. !he problem with the capacitor+s bucket is thatit has a leak. In a matter of a few milliseconds a full bucket becomesempty. !herefore, for dynamic memory to work, either the - or thememory controller has to come alon# and rechar#e all of thecapacitors holdin# a & before they dischar#e. !o do this, the memorycontroller reads the memory and then writes it ri#ht back. !his refreshoperation happens automatically thousands of times per second.

    !his refresh operation is where dynamic RAM #ets its name.Dynamic RAM has to be dynamically refreshed all of the time or itfor#ets what it is holdin#. !he downside of all of this refreshin# is thatit takes time and slows down the memory.

    /tatic RAM uses a completely different technolo#y. In static RAM, aform of flip$flop holds each bit of memory 'see (ow )oolean 0atesWork for detail on flip$flops*. A flip$flop for a memory cell takes 1 or 2transistors alon# with some wirin#, but ne3er has to be refreshed.!his makes static RAM si#nificantly faster than dynamic RAM.(owe3er, because it has more parts, a static memory cell takes a lotmore space on a chip than a dynamic memory cell. !herefore you #et

    http://computer.howstuffworks.com/bytes.htmhttp://computer.howstuffworks.com/bytes.htmhttp://computer.howstuffworks.com/bytes.htmhttp://computer.howstuffworks.com/boolean.htmhttp://computer.howstuffworks.com/boolean.htmhttp://computer.howstuffworks.com/bytes.htmhttp://computer.howstuffworks.com/bytes.htmhttp://computer.howstuffworks.com/boolean.htmhttp://computer.howstuffworks.com/boolean.htmhttp://computer.howstuffworks.com/bytes.htm
  • 8/11/2019 Difference Between Static RAM and Dynamic RAM

    2/8

    less memory per chip, and that makes static RAM a lot moree"pensi3e.

    /o static RAM is fast and e"pensi3e, and dynamic RAM is lesse"pensi3e and slower. !herefore static RAM is used to create the

    - +s speed$sensiti3e cache , while dynamic RAM forms the lar#ersystem RAM space

    Inside This Article&.Introduction to How Caching Works

    4.

    A /imple 5"ample )efore ache

    6. A /imple 5"ample After ache

    1.omputer aches

    7.achin# /ubsystems

    2.ache !echnolo#y

    8.9ocality of Reference

    :.9ots More Information

    If you ha3e been shoppin# for a computer ,then you ha3e heard the word ;cache.;

    http://computer.howstuffworks.com/cache.htmhttp://www.howstuffworks.com/cache1.htmhttp://www.howstuffworks.com/cache2.htmhttp://www.howstuffworks.com/cache3.htmhttp://www.howstuffworks.com/cache4.htmhttp://www.howstuffworks.com/cache5.htmhttp://www.howstuffworks.com/cache6.htmhttp://www.howstuffworks.com/cache7.htmhttp://www.howstuffworks.com/pc.htmhttp://computer.howstuffworks.com/cache.htmhttp://www.howstuffworks.com/cache1.htmhttp://www.howstuffworks.com/cache2.htmhttp://www.howstuffworks.com/cache3.htmhttp://www.howstuffworks.com/cache4.htmhttp://www.howstuffworks.com/cache5.htmhttp://www.howstuffworks.com/cache6.htmhttp://www.howstuffworks.com/cache7.htmhttp://www.howstuffworks.com/pc.htm
  • 8/11/2019 Difference Between Static RAM and Dynamic RAM

    3/8

    Modern computers ha3e both 9& and 94 caches, and many now alsoha3e 96 cache. You may also ha3e #otten ad3ice on the topic fromwell$meanin# friends, perhaps somethin# like ;Don+t buy that eleronchip, it doesn+t ha3e any cache in itor the sake of simplicity, let+s sayyou can+t #et the books yourself $$ you ha3e to ask the librarian forany book you want to read, and he fetches it for you from a set ofstacks in a storeroom 'the library of con#ress in Washin#ton, D. ., isset up this way*. >irst, let+s start with a librarian without cache.

    !he first customer arri3es. (e asks for the book Moby Dick . !helibrarian #oes into the storeroom, #ets the book, returns to thecounter and #i3es the book to the customer. 9ater, the client comesback to return the book. !he librarian takes the book and returns it tothe storeroom. (e then returns to his counter waitin# for anothercustomer. 9et+s say the ne"t customer asks for Moby Dick 'you saw itcomin#...*. !he librarian then has to return to the storeroom to #et thebook he recently handled and #i3e it to the client. nder this model,the librarian has to make a complete round trip to fetch e3ery book $$e3en 3ery popular ones that are re uested fre uently. Is there a wayto impro3e the performance of the librarian?

    http://www.howstuffworks.com/virtual-memory.htmhttp://www.howstuffworks.com/pc.htmhttp://www.howstuffworks.com/bookstore-gateway.htm?isbn=0393972836http://www.howstuffworks.com/virtual-memory.htmhttp://www.howstuffworks.com/pc.htmhttp://www.howstuffworks.com/bookstore-gateway.htm?isbn=0393972836
  • 8/11/2019 Difference Between Static RAM and Dynamic RAM

    4/8

    Yes, there+s a way $$ we can put a cache on the librarian. In the ne"tsection, we+ll look at this same e"ample but this time, the librarian willuse a cachin# system.

    A Simple Example: A ter Cache9et+s #i3e the librarian a backpack into which he will be able to store&% books 'in computer terms, the librarian now has a &%$book cache*.In this backpack, he will put the books the clients return to him, up toa ma"imum of &%. 9et+s use the prior e"ample, but now with our new$and$impro3ed cachin# librarian.

    !he day starts. !he backpack of the librarian is empty. @ur first clientarri3es and asks for Moby Dick . o ma#ic here $$ the librarian has to

    #o to the storeroom to #et the book. (e #i3es it to the client. 9ater,the client returns and #i3es the book back to the librarian. Instead ofreturnin# to the storeroom to return the book, the librarian puts thebook in his backpack and stands there 'he checks first to see if theba# is full $$ more on that later*. Another client arri3es and asks forMoby Dick . )efore #oin# to the storeroom, the librarian checks to seeif this title is in his backpack. (e finds it< All he has to do is take thebook from the backpack and #i3e it to the client. !here+s no Bourneyinto the storeroom, so the client is ser3ed more efficiently.

    What if the client asked for a title not in the cache 'the backpack*? Inthis case, the librarian is less efficient with a cache than without one,because the librarian takes the time to look for the book in hisbackpack first. @ne of the challen#es of cache desi#n is to minimiCethe impact of cache searches, and modern hardware has reducedthis time delay to practically Cero. 53en in our simple librariane"ample, the latency time 'the waitin# time* of searchin# the cache isso small compared to the time to walk back to the storeroom that it isirrele3ant. !he cache is small '&% books*, and the time it takes to

    notice a miss is only a tiny fraction of the time that a Bourney to thestoreroom takes.

    >rom this e"ample you can see se3eral important facts aboutcachin#

    ache technolo#y is the use of a faster but smaller memorytype to accelerate a slower but lar#er memory type.

  • 8/11/2019 Difference Between Static RAM and Dynamic RAM

    5/8

    When usin# a cache, you must check the cache to see if anitem is in there. If it is there, it+s called a cache hit . If not, itis called a cache miss and the computer must wait for around trip from the lar#er, slower memory area.

    A cache has some ma"imum siCe that is much

    Computer Caches A computer is a machine in which we measure time in 3ery smallincrements. When the microprocessor accesses the main memory' RAM*, it does it in about 2% nanoseconds '2% billionths of a second*.!hat+s pretty fast, but it is much slower than the typicalmicroprocessor. Microprocessors can ha3e cycle times as short as 4nanoseconds, so to a microprocessor 2% nanoseconds seems like aneternity.

    What if we build a special memory bank in the motherboard, small but3ery fast 'around 6% nanoseconds*? !hat+s already two times fasterthan the main memory access. !hat+s called a le3el 4 cache or an !"cache . What if we build an e3en smaller but faster memory systemdirectly into the microprocessor+s chip? !hat way, this memory will beaccessed at the speed of the microprocessor and not the speed ofthe memory bus. !hat+s an !# cache , which on a 466$me#ahertC

    'M(C* -entium is 6.7 times faster than the 94 cache, which is twotimes faster than the access to main memory.

    /ome microprocessors ha3e two le3els of cache built ri#ht into thechip. In this case, the motherboard cache $$ the cache that e"istsbetween the microprocessor and main system memory $$ becomesle3el 6, or !$ cache .

    !here are a lot of subsystems in a computer you can put cachebetween many of them to impro3e performance. (ere+s an e"ample.We ha3e the microprocessor 'the fastest thin# in the computer*. !henthere+s the 9& cache that caches the 94 cache that caches the mainmemory which can be used 'and is often used* as a cache for e3enslower peripherals like hard disks and D$R@Ms . !he hard disks arealso used to cache an e3en slower medium $$ your Internetconnection

    http://www.howstuffworks.com/microprocessor.htmhttp://www.howstuffworks.com/ram.htmhttp://www.howstuffworks.com/microprocessor.htmhttp://www.howstuffworks.com/hard-disk.htmhttp://www.howstuffworks.com/cd2.htmhttp://www.howstuffworks.com/microprocessor.htmhttp://www.howstuffworks.com/ram.htmhttp://www.howstuffworks.com/microprocessor.htmhttp://www.howstuffworks.com/hard-disk.htmhttp://www.howstuffworks.com/cd2.htm
  • 8/11/2019 Difference Between Static RAM and Dynamic RAM

    6/8

    !he computer you are usin# to read this pa#e uses amicroprocessor to do its work. !he microprocessor is the heart ofany normal computer, whether it is a desktop machine , a ser3er or alaptop . !he microprocessor you are usin# mi#ht be a -entium, a E2,a -ower- , a /parc or any of the many other brands and types ofmicroprocessors, but they all do appro"imately the same thin# inappro"imately the same way.

    If you ha3e e3er wondered what the microprocessor in your computer is doin#, or if you ha3e e3er wondered about the differences betweentypes of microprocessors, then read on. In this article, you will learnhow fairly simple di#ital lo#ic techni ues allow a computer to do its

    Bob, whether its playin# a #ame or spell checkin# a documentor e"ample, the :%:: clocked at 7 M(C but only e"ecuted at%.66 MI-/ 'about one instruction per &7 clock cycles*. Modernprocessors can often e"ecute at a rate of two instructions per clockcycle. !hat impro3ement is directly related to the number oftransistors on the chip and will make more sense in the ne"t section.