understanding memory

Memory issues come up all the time in web production. Designers and engineers are constantly wringing their hands over the size and speed of their pages, which directly correlates to how much memory or storage space they take up.

Although you don't need a degree in computer science to know your site is slow, it's helpful to understand the basic principles behind computer memory and networking just in case.

The first thing you should know is that everything on your computer has to be stored: your software programs, your files...even the sound file that plays when you turn on your computer. All these things take up space or "memory" on your computer's hard drive.

measuring the size of a file

Computer memory is generally measured in bytes, so every single item on a web page or a computer for that matter can be described by the number of bytes it takes up. A single byte, however, is rather small. So items are usually measured in kilobytes (1,000 bytes), called "K" for short, or in megabytes (1 million bytes), called "Meg" for short.

Although it rarely comes up in the context of web sites, it's helpful to know that each byte can be further broken down into 8 bits. A bit is the smallest possible unit of memory, containing one of two values: 0 or 1, on or off.

measuring the capacity of a computer

When it comes to memory, all computers are not created equal. Depending on how they're built, they differ widely in how much information they can store and how much they can process at once.

memory: more, more, more!

Byte

8 bits

Kilobyte

1,000 bytes

Megabyte

1,000,000 bytes

Gigabyte

1,000,000,000 bytes

Terabyte

1,000,000,000,000 bytes

Petabyte

1,000,000,000,000,000 bytes

Exabyte

1,000,000,000,000,000,000 bytes

Zettabyte

1,000,000,000,000,000,000,000 bytes

Yottabyte

1,000,000,000,000,000,000,000,000 bytes


2 kinds of memory:

  • ROM (read-only memory), which stores files, but can't do anything with them. This is better known as the hard disk.

  • RAM (random access memory), which actively processes the files you're using at any given moment.

The hard disk provides permanent storage for files. This type of memory is relatively cheap and plentiful, but it isn't active. Things on the hard disk are in deep storage. And that's where RAM comes in. RAM is the more active, short-term memory. It's constantly shuffling things back and forth to the CPU your computer's processor for, um, processing. So the whole time you're using your computer opening and closing files, calculating, completing tasks the RAM is fetching things from permanent storage and handing them off to the CPU as fast as its little legs can carry them. The more RAM you have, the more legs it has to transport things, and the faster they can run.

"I was a millipede, but I upgraded to gigapede."

graphics/205fig01.gif



The Unusually Useful Web Book
The Unusually Useful Web Book
ISBN: 0735712069
EAN: 2147483647
Year: 2006
Pages: 195
Authors: June Cohen

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net