It gets far more complicated than this, but for now, this is good to know.
Computer Memory Size Terms:
So.. You think you have a lot of memory in your computer...
The following table shows just how much memory "could" be available under the current 64 bit addressing scheme:
Symbol |
Power of 2 |
Bytes (Decimal Value) |
K (Kilobyte) |
2**10 |
1,024 |
M (Megabyte) |
2**20 |
1,048,576 |
G (Gigabyte) |
2**30 |
1,073,741,824 |
T (Terabyte) |
2**40 |
1,099,511,627,776 |
P (Petabyte) |
2**50 |
1,125,899,906,842,624 |
E (Exabyte) |
2**60 |
1,152,921,504,606,846,976 |
16 Exabytes |
2**64 |
18,446,744,073,709,551,616 |
Yes... 16 Exabytes is: 17,179,869,184 Gigabytes, which is 18,446,744,073,709,551,616 bytes!!!
That is how big an address space can be using the 64 bit addressing model (at least in theory).
This is how much memory that can be mapped in a single physical address space using the 64 bit addressing model.
Not to worry... as of the date of this writing, 1/2 Gigabytes (512 Megabytes) of RAM is more than enough for the needs of most people.
Disk storage... that is a horse of a different color.
Most people can do just fine with 200 Gigabytes).
Read on and see what we are talking about:
RAM (Random Access Memory)
This is memory that holds currently executing programs and data being operated on by these programs.
Operating system code (such as Windows) gets loaded into RAM when you "boot" your computer.
As you start running applications, they are also loaded into RAM.
Data that may be needed by your executing programs are also placed in RAM.
RAM is very fast and not intended to hold information permanently.
RAM is erased when you turn off your computer.
RAM is normally stated in Megabytes (MB), with 512 MB being the preferred amount to have in your computer for the average user.
The more you have, the faster your machine runs until you have enough.
After that, more RAM may actually slow down your machine.
Yes,, you read that right... it can actually slow down your machine.
To understand why, you would need a good understanding of how "Virtual Storage" and "Address Space" architectures works, and know how memory is accessed by the CPU.
An address space is a chunk of RAM that has a starting address of zero and contains a fixed number of bytes.
The size of the "chunk" is dictated by the addressing scheme employed by the processor and its operating system.
Commercially, there are several addressing schemes: 24, 31, 32 and 64 bit.
For example 24 bit addressing can provide an address space of 16 megabytes.
The number of bits is 2 raised to that power.
- 24 bit addressing can provide an address space of 16 Megabytes.
- 31 bit addressing can provide an address space of 2 Gigabytes.
- 32 bit addressing can provide an address space of 4 Gigabytes.
- 64 bit addressing can provide an address space of 16 Exabytes.
Normally programmers write programs that execute in an address space.
When you launch a program, an unique address space is assigned and the program is loaded into it for execution.
You normally launch more than one program and they run concurrently.
You can potentially have thousands of address spaces active when you use your computer, but you seldon have that many.
Now you may ask... how can this be? I only have 512 Megabytes of RAM.
How can I have thousands of address spaces when I only have one memory?
A long time ago RCA invented something called Virtual Storage for their SPECTRA/70 mainframe computers.
IBM jumped in on it and turned Virtual Storage into a piece of art with their S/370 line of mainframe computers.
Microsoft also exploited this technology as well as other Personal Computer Operating System vendors.
Virtual Storage (under the hood)
Virtual storage is the key to how Operating Systems manage RAM and keep one program from interfering with another.
It used to be in the "old days" that if you ran two programs at the same time on a single computer,
the potential for one to interfere with the other was high.
Prior to Virtual Storage, all kinds of schemes were developed, but none of them came close to what the industry needed to address storage issues.
At the same time, RAM was very expensive.
A very large computer only had 512 Kilobytes (yes, that was kilobytes).
Virtual storage was developed to address both the cost of memory and the ability to isolate concurrently running programs from "having each other for lunch".
The concept of Virtual Storage is quite simple, but very hard to design and put into operation.
- First, the Operating System must own ALL of the RAM on the system.
- Second, you need to make each concurrent running task (thread) "think" it is the only one running on your system.
The way this is currently accomplished is the Operating System creates a "Virtual Address Space" for each "application" running of the system.
A program runs in a Virtual Address Space and accesses memory as if it were all in RAM and it owns all the RAM on your computer (the program is fat, dumb and happy).
A hardware function typically called "Dynamic Address Translation" intercepts storage addresses requested by programs and locates their corresponding "REAL" storage addresses (in RAM).
The program "thinks" it is referencing storage at a particular address but in fact the address is Virtual.
The REAL address is only known to the hardware and the Operating System managing it.
This is why this is called: "Virtual Storage" (or VS).
The physical RAM is divided up into 4K storage "pages" which are assigned to address spaces on demand.
The pages have real storage addresses, but programs refer to this storage by their Virtual Storage addresses.
The Operating System and the hardware perform the address translations "under the covers" (like magic).
RAM actually looks like a checkerboard full of 4K squares (containing pieces of storage owned by Virtual Storage address spaces).
When the workload running on your system requests more storage pages then are contained in RAM, RAM becomes saturated and the Operating System's storage manager starts to "thrash" between RAM and the SWAP file.
The system will continue to run your workload by copying the oldest referenced pages (if changed) in RAM out to slots on DISK (called the SWAP file or Page Data Set) and will start making pages in RAM available to accomodate new requests.
The current requestor's data will populate the freed up RAM page(s) normally from DISK.
This is where the problem starts.
The system will try to run whatever you launch.
However, once you require more virtual storage than you have pages in RAM, the system starts to interact with its paging file (in Windows, this is your SWAP file) on DISK.
Disk is very slow compared to RAM and you will notice it.
If this becomes excessive, your system starts to slow down until it is so slow you cannot tolerate it anymore.
If you increase the amount of RAM (open the case and add more memory sticks), you provide more space for the system to page into and life becomes good again.
If you increase the amount of RAM and there is no demand for it, the system may use it to buffer I/O (Input/Output) requests in an effort to reduce DISK I/O, which is also a very good thing.
ROM (Read Only Memory)
This memory is used to hold specialized programs (such as the BIOS on your motherboard and Video Adapters).
It acts just like RAM, except it is normally written once and conceptually is never erased.
When someone tells you that you need a BIOS Upgrade, they are talking about changing the contents of ROM.
There are many types of ROM and it is not important to really understand much more about ROM unless you are a computer expert.
You really do not care how much you have, or that you have it at all.
ROM is normally used "under the covers".
The most common device that is in this memory class is a CD-ROM device.
Compact Disks initially could only be created and never altered.
This is still true, with the exception of certain CD media (and their drives) that allow you to alter the contents of the CD media itself.
CD Burners allow you to create CD media.
A CD is considered a ROM media.
After all; ROM must be "created" somewhere.
The CD burner simply gives you that ability.
Disk Drives
This memory is electro-mechanical in nature and is used to "permanently" store programs and data.
We all know you can "delete" things from a disk, but you are doing it.
As long as the device works, you can normally always access the data on it using the proper software programs.
In the audio world, a record player can play records that have more than one song on each side.
This is accomplished by placing a record on the turntable and placing the tone arm on the desired "cut" that is to be played.
Each cut can be played this way in any desired order.
A tape recorder can also play a tape what contains multiple songs.
However the tape media is sequential in nature and does not lend itself to random play of the recorded material.
One would have to forward and rewind the tape until the particular song is located.
Disk drives are more like phonograph records.
It really does not matter if we are discussing magnetic disks (such as floppy or Hard Disks) or optical disks, such as CD and DVD media.
The objective is to provide random access data to your programs as quickly as possible.
Optical Disks (CD and DVD) is a computer media that was first exploited in the audio-video world.
They offer cheap reliable storage. Their main drawback to this media is the long time to locate data in a random fashion.
Most applications that use this media tend to process the data in sequence (such as movies and music tracks).
Yes, we sometimes skip around and play material in random order, but we do not attempt to do thousands of random lookups in a single second.
The Hard Disk Drive (HDD) is something we have all come to know, love, hate, or all of the above.
Floppy disk drives (FDD) work like hard drives but their storage capacity are much... much smaller.
Introducing: Mr. Hard Drive
It comes with your computer, you fill it up and then start deleting files to make more room.
We sometimes purchase larger ones to allow us to hold more data.
We cry when we delete the wrong stuff from it (why the thing fills up in the first place).
Some of us actually back the "big fellow" up (make logical copies of the data), but how many of us really know how to "restore" the lost data?
Hard drives have known to "crash" (after all, they are still mechanical in nature).
Your hard drive will eventually crash, it is just a matter of WHEN.
Sometimes you replace the drive (or the computer) before it happens, but never the less, it will happen.
Make sure yours is backed up and you know how (or know someone who knows how) to recover your data from your backup.
Just like what your Dentist may tell you... Only brush and floss the teeth you desire to keep... you do not have to worry about the rest.
Think of your hard drive as your computer's "filing Cabinet".
How Mr. Hard Drive gets the job done:
- A disk drive contains a motor which spins at a rather fast speed (7200 RPM or faster).
- Attached to the motor's shaft are magnetic platters (like a stack of phonograph records sitting in a record changer, except they are magnetic instead of vinyl).
- There is an "actuator arm" that has a read/write head for each of these platters.
- Unlike our stack of phonograph records which may only be accessed one side at a time by the phonograph's tone arm,
all platters spin at the same time and any side of any platter may be accessed by the actuator arm).
- The data is transferred between the disk and your system using these read/write heads (a concept like magnetic tape, except in a random fashion) .
- The recording media itself is organized in something called: Tracks and Cylinders.
- If there are 5 platters, there will be 10 recording surfaces (one on each side of each platter). However, sometimes the first and last platters are not used.
- A recording surface is divided up into "circles" (like grooves on a phonograph record).
- The circles are discrete and do not connect to each other (like rings on a bulls-eye target).
- These circles are called "Tracks" (sometimes referred to as "heads").
- Each track has a number, starting with 0 to how ever many there are on the recording surface.
- Looking down on the stack of recording surfaces on the platters,
the collection of all the tracks with the SAME NUMBER on all the recording surfaces is referred to as being a "Cylinder".
An example would be a disk with 5 platters (10 recording surfaces) with 500 tracks on each surface would be:
The device has 500 cylinders with 10 tracks per cylinder.
The total number of tracks would be 5000 (a very small disk drive).
Accessing data on this beast would be: "give me the data at Cylinder 75, track 3).
This operation would cause the disk drive's "access arm" to move its read/write head under cylinder 75 and start I/O operations from track 3.
- The data contained on the actual track can be in almost any format.
- PC disk file systems use a fixed block architecture (a track is divided up into 512 byte segments).
- Mainframe computers are more flexible and can support something called "Count Key Data" which means "anything goes".
- On the PC, groups of segments are grouped together to form "clusters".
- The cluster is how your programs locate data using tables maintained by programs on your computer (FAT/FAT32 and NTFS).
Hard drives used to be rated by MB capacity, but now are rated by Gigabytes (GB).
If you do not have enough, you get messages from your file system telling you "no space", etc.).
There is no penalty to have too much disk space (unless it gets fragmented).
Good hard drives are fast, but most of all are reliable.
Hard drives work like a record player, as noted in the above discussion.
Your program needs some data contained on it, it has to know where it is.
The disk actuating arm must move from where it is to where it has to be...
This is called: SEEK TIME.
The arm must wait until the proper segment is under the read/write head...
This is called: ROTATIONAL DELAY.
The data must be read from (or written to) the desired segments on the disk...
This is called: DATA TRANSFER TIME.
This is why you sometimes hear the "clicking" coming out of your PC when you access programs and data.
The clicking is the arm going back and forth looking for the proper cylinders containing your data.
(Like picking up a tone arm on a record and putting it on another album cut).
Hard drives are sold as capacity (GB), seek time and transfer speed.
The transfer time is related to the speed of what you connect the device to (bus).
Newer machines IDE rates are 100, but can be 133, 150 or now with S/IDE (SATA) can be 300.
Rotational delay is an "average" delay directly related to the fact that media is spinning and even if the arm is where it needs to be, the data may not be.
The desired data may have just past the arm, which means we wait one full revolution.
The data may be exactly where we need it to be, so we have no rotational delay at all.
Rotational delay is almost always specified as AVERAGE Rotational delay.
Normally it is the rotational speed (in RPMs) divided by 2 computed to fractional seconds (average rotational delay).
Seek time is stated on the drive.
One last thing you really should know:
The answer to the question I get asked all the time by people...
Why your 80 Gigabyte disk drive shows up as 71 Gigabytes on your computer..
There are two reasons for this..
First the math lesson:
Computers relate 1 "K" as being 1,024, not 1,000.
This is because in binary we relate based on the power of two.
1,000 in really is 1 to the fourth power in base 10 (decimal system).
We all can relate to this.
However, in a computer we do not use the decimal system.. we use binary instead.
1 to the fourth power is 1000 (that is 8 + 0 + 0 + 0) giving us 8 in base 10.
If you look at the place values in binary, they are: 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 4096 etc. moving right to left.
So with that in mind a "K" will be 2 to the tenth power: 0100 0000 0000 (0 + 1024 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0) which is 1024 in base 10.
Considering the above topic, software (your programs) relate a "K" as 1024, the Disk Drive manufactures rate their disks as 1,000 being a "K".
Real nice, but the marketing people sell a 200MB disk drive as 1000 times 1000 times 200, not 1024 times 1024 times 200.
The second part of this is your disk drive is "formatted" by your operating system and in doing so, some of its capacity is lost to the encapsulation of data and the file system tables..
This may be viewed as "overhead", or the same as the cost of carrying gas in your car's fuel tank as part of the payload when you drive.
There is much more, but I am sure you are scratching your head by now... so we move on.