Thursday, October 9, 2008

Memory and Disk Space - What's the Difference?

Almost everyone has heard of Memory and Disk Space. Many mistakenly use the two terms interchangeably, as if they had the same meaning. However, while they are related, the differences between them are vast enough that they cannot be used as one term. Think of it as the difference between your short term memory and your long term memory. You meet Mary today. By tomorrow, you may forget her name. But, next week, you may be able to pull up all the details of the meeting if asked to do so. Memory and Disk Space are similar in relationship to this example.

Memory or RAM is short for Random Access Memory and is known as a volatile or temporary memory type. It can be lost and often is. It can be used to hold new information, just as your short term memory does. When something new demands your attention, your short term memory transfers the previous information to the long term memory vault.

In computers, this is the equivalent of saving a document before closing it. When you save a document, its contents are transferred from RAM (temporary memory of the computer) into the hard disk (long term memory of the computer). If the process is interrupted by power failure, cancellation by user, or a number of any other such scenarios, then the contents of the document are "lost".

It is similar to what happens as we sort out important, save-worthy information from our short term to long term memories. We won't remember that we counted six dots on the back of the fourth ladybug caught in a jar that day, but we will remember that today we are supposed to go shopping for groceries if we want to eat tonight.

Disk Space is space on the hard drive, the place where the applications you use on your computer are stored. When you open or run a program, the program is first loaded from the disk into your computer's RAM, and the program instructions are then executed from RAM. The computer can only process instructions that are in RAM. Therefore, for any program to be executed, it has to first be loaded from the disk into your computer's memory. RAM is also used when we create documents and image or other files.

However, RAM is volatile memory - the contents of RAM get "wiped out" when we switch off the computer or if there is a power failure. If information is "deleted" in RAM, it is simply not saved and the computer has no record of the existence of that information. This is why it's so easy to lose open documents during a computer runtime error commonly known as a "crash". Documents currently in RAM that aren't saved during a sudden loss of power, or while turning the computer off, are also lost.

Whenever you type a new document, whatever you type is initially stored in RAM. But, since RAM is volatile or temporary, if you want to preserve what you have typed, you will need to save your document. When you issue the Save command in your application, the information you have type which is in RAM gets transferred to the hard drive and is stored in a file.

As you can see, the memory (or RAM) and disk space are related. They are inter-dependent on each other for your computer to operate correctly. As you use your computer, it transfers applications and data from the disk to RAM when needed. This data is then manipulated in RAM. The contents of the RAM have to be saved to return any changes back to the hard disk. If not, anything in RAM that isn't saved will be lost.

Data or files on a disk can be deleted, as well. When a user "deletes" a file, be it operational system files or application files from a favorite program such as MS Word, iTunes, or a graphical program used for image editing, the files are not truly erased. Instead, your computer simply marks the space as available and the program or deleted material is inaccessible to the user.

When the computer needs the space that the deleted program or document once claimed, then that space is overwritten with new information. However, if the deleted file's old space is never needed by the computer, the material remains on the hard drive. This realization has given birth to forensic computer science as the material is obtainable if you have the right equipment and can access the hard drive's storage space with specialized programs intended to retrieve deleted files.

No comments: