How much is that Megabyte in the Window?
RAM, at least for now, is sold by the Megabyte...but how much space are you REALLY getting? And why is it that when you have 16MB of RAM your BIOS reports a number with a 15 in front of it? Lets take a look at what a Megabyte is. In computer science, a bit is the amount of space necessary to account for a single comparison's outcome. Confused? A bit is the amount of space needed to store one digit in a binary number system (see Binary Number System), a 1 or a 0. A byte then is a combination of 8 bits, or 8 1's and 0's (i.e. 10010010). A megabyte, is the most misunderstood measurement of storage. A kilobyte is in fact, 210 bytes, or 1024 bytes. In that case, a Kilobit (not a kilobyte) is 1/8 of a kilobyte (8 bits in a byte) or 128 bytes. Meaning that a megabyte, is 210 kilobytes, or 1024 kilobytes (KB), a megabyte is NOT 1000 kilobytes, although it is often easier to call it that. In turn, a megabit is equal to 1/8 of a megabyte, or 128 kilobytes (KB). Therefore, as you might expect, a gigabyte is equal to 210 megabytes, or 1024 megabytes. Therefore a gigabit is 1/8 of a gigabyte, or 128 megabytes (MB). Now until sometime next year, we'll be dealing with RAM in terms of Megabytes and every now and then in Kilobytes, NOT Gigabytes.
So now why is it that some programs say you only have 15744KB of RAM, when you should have 16384KB (16MB x 1024KB = 16834KB)? In order to understand that we have to look at the history of the PC. A now very famous man was once quoted as saying "I can't imagine anyone ever using more than 640K of RAM..." Ring any bells? It should...that quote was made by none other than the CEO of Microsoft, Bill Gates. Let me give you a scenario: You just got your high powered system up and running, you boot up Win95, with 32MB of RAM you feel prepared to run anything you could possibly want to. You quickly open 5 or 6 applications then, feeling lucky open another one, an old Sierra game from your 386 days...but to you're amazement you can't run it. Not enough memory?!?! You hurriedly close all of your instances of Netscape and Internet Explorer...to try again, same error! You reboot...same error! What is causing this? No, its not that 32MB of RAM isn't enough...you're merely battling with the 640KB bottleneck that was bestowed on us back when the PC was first being developed. You're not out of system memory, you're simply out of conventional memory. Conventional memory, is non-upgradable memory, which is the very first 640KB of your system RAM. Since this bottleneck was first realized in a real world situation, there have been work-arounds programmers use, however there was a time where all systems were equal in that you had 640KB of Conventional memory to work with...and that was it. As I mentioned before, some programs are designed to use Extended Memory, or all of the RAM above the first 640KB. In cases like that, the program you're running may or may not consider the first 640KB (Conventional Memory) part of its allocated memory space, so therefore subtracts it from your total system RAM.
Show me the Money...or should I say "Cache"
Cache Memory, pronounced like Cash, is an ultra-fast type of RAM (Random Access Memory) which can quickly store and retrieve data. It is because of the Cache on your processor and on your motherboard that you experience the true performance of your system, just another reason to believe that your $500 processor isn't all that its cracked up to be without some relatively inexpensive modules =)
The best way to explain Cache Memory would be from the point of view of a person that uses and addresses them every day of his/her life, a programmer (Courtesy of Avinash Baliga of Vzzrzzn's Programming Homepage). There are currently two types of caches, L1 (level 1) and L2 (guess...). The L1 cache is built into the processor, so there are no bus-lines to go through; the L2 cache is an external piece, although on some of the newer processors like the Pentium Pro, Pentium II, and DEC Alpha it is also integrated onto the processor (or the processor card in the case of the Pentium II). As you might be able to guess an integrated L2 cache means faster performance, due to the absence of bus-lines (see Bus) like the L1 cache and also operates at or near the clock speed of the processor. The cache is a layer between system RAM and your processor. Think of it like a salesperson in a department store. If there is a model on the shelf then it will be handed to you with little hassle; but if the shelf is empty then they will have to go to the storage area. Well the cache keeps track of the most recently used memory addresses (locations) within it and the values they contain. When the processor requests an access to memory (trust me, it will) then that address and value must be in the cache. If it is not, then the cache will load that value from memory, and replace some previously cached memory address with this new one (if necessary). If a program is not optimized to take advantage of the cache's ability to make repeated access to the same address, then severe performance hits result. For instance, to speed itself up, the L1 cache on the Pentium loads strips of 32 bytes at a time from the L2 cache. If the address the program is looking for is not in the L1 cache, approximately 75 nanoseconds will be wasted on a P200. If this value is not in the L2 cache either, then an additional 1.5 to 2.5 microseconds will be wasted in "cache thrashing". All this for one add instruction that uses a seldom-used RAM location! Think about the number of adds, subtracts, and moves that are done in code. Microseconds are certainly an insignificant measure of time for you and me, but now think about whether your 50ns EDO RAM or your 10ns SDRAM is performing up to par! It is for those reasons that when you exceed your cacheable area by using more System RAM (i.e. using 128MB of RAM on a chipset that can only cache 64MB) you experience a noticeable loss of performance.
0 Comments
View All Comments