Introduction to Computers with Ubuntu Unity
File Storage - The Theory

Note:
There is a separate section of this guide describing the way you manipulate files in practical ways on a computer running Ubuntu Unity.

You may recall reading that computers are really just thousands of switches, and that the switches are used to represent all sorts of information. A file is a package of information designed to be stored digitally (that is, in some representation of the "on" or "off" status of switches). Remember, too, that the digital switches in an active computer depend on a steady source of electricity. The switches of digital memory are so easy to turn on and off that an interruption of electricity from a battery or from the wall outlet will let all the switches go off. When that happens, anything that was in the digital memory (also called RAM) to be lost.

You must have a way to save your work that is more permanent and secure. You cannot depend on RAM for long term storage of your work. A file is that next layer of permanence.

In the early years of the 21st century, the most common long term digital storage method is magnetic. Magnets have two poles, north and south. If the magnet is small enough, it will swing around quickly under the control of a more powerful magnet. If the magnet isn't floating completely free, it will stay in place once the powerful magnet has moved away. You can observe part of the idea with a compass. The middle of a compass needle is balanced on a sharp pin so it can spin. When you hold the compass still, the needle will spin around and settle so one end points along the lines of magnetic force. The needle of the compass is marked with one end labeled "North." That end comes to rest pointing to the north because the Earth is a gigantic magnet, relatively weak, but much stronger than the little compass needle. It is the huge amount of iron at the Earth's core which concentrates the magnetic field of our planet. [ More at Wikipedia ]

If another magnet approaches, the magnetic field around it overpowers the Earth's field and makes the compass needle swing away from the weaker influence of the Earth's magnetic field. The Earth's field is still there, but has less strength than the nearby magnet. In fact, the needle of the compass will swing again when the nearby magnet is removed. The Earth's magnetic field will take over again.

Note:
Disk or Disc?
I'm old. When I started this computer stuff, we spelled "disk" for all these things. You may more often read "disc" these days [ Grammar Opinion ]. Forgive me if I mess with your preference. I'm not always a good speller, anyway.

The mechanism in a disk drive is based on the ideas illustrated in these simpler compass images. The locally powerful magnet is controlled by electricity and turns on and off very rapidly while riding just above a layer of magnetic particles spread evenly on the top layer of a spinning disk. The magnets in the layer are mostly stuck in the rest of the layer's material, but can be made to shift by the powerful magnet as it passes closely over them. The powerful magnet tugs the particles, establishing a patch of them with their north ends up. The next patch might be set so their north ends are down. The pattern of ups and downs is like the switches, on or off, in RAM. The patches of tiny magnetic material stay oriented as the electromagnet moves away. Its job is done. The pattern stays put for a relatively long time (years). The Earth's weak magnetic field is not able to rearrange the magnetized patches on the disks of a hard drive.


Image credit: walknboston on Flickr [cc-by license]

Disk drives sit inside the box of your computer. They are sealed. Opening one to show the parts like this would make it not work. Exposing your disk drive to a powerful electromagnet like the ones used in a car junkyard would erase it.

Note:
"Hard" takes its meaning by reference to the material of the spinning disks inside the case. The first hard drives had metal disks. More recently, the disks are made of lighter, but still very stiff material. The storage disks that were common in early personal computers were made of thin, very flexible plastic. They were called "floppy disks." The terms "hard" and "floppy" stuck. Once a term takes hold, it can be difficult to change. Think about the modern phone. It has no dial, yet we still refer to dialing a phone number.


Image credit: Cyril Methodius Jansky from Wikimedia [ license: public domain ]

The file sits, as recorded, even after the disk stops spinning when the computer's power is shut off. The data is stored. It is now a series of small clusters of magnetic particles laid out in a line following the curve of the disk. The file will stay stable for years.

Imagine the black dots are facing "up" and that the gray dots are "down" magnetic patches on the rotating disk. This image is an aide to your imagination and is not to scale. (There's no intentional hidden message in binary either.)


Later, when you want to look at the file again, the process is reversed. While the disk spins by, an electric current gets turned on or off by the little patches of magnetic particles. The current turns switches in RAM back on. The RAM switch pattern repeats the pattern from the disk. The file data is accessible again to be read on screen, printed to paper, sent as an attachment in email, etc.

Thanks are due to the many engineers who have worked to develop these techniques. We don't have to worry about the details because of their work.

Solid State drives are becoming more popular these days. Instead of magnets, the solid state drives (SSD) use electronic components of tiny size to store data. The data is still no more than clustered sets of switches. SSDs have the benefit of being smaller than standard disk drives and SSDs have no moving parts. Like most electronic components, the initial cost is high, but the price of a large solid state drive will come down to match the magnetic drives in common use these days. Solid State Drives of this type are intended to be fixed in place within the box/case of your computer.

Another form of solid state storage is the popular thumb drive or "USB key." Thumb drives are designed to be removable storage. Thumb drives have taken the place of magnetic disks that used to be the preferred form of removable storage. The most common removable disks were called "floppy disks" because the disk was made of flexible plastic inside a harder plastic case.


Image credit: Robert Nelson on Flickr [ license: cc-by ]


Image credit: Emelian Robert Vicol on Flickr [ license: cc-by ]

Before the 3.5 inch floppy, the popular size was 5.25 inches square. Though it was bigger, it had less storage space because of technical limitations of the time. Before the 5.25 drive, there were even 8 inch floppies. Before that, removable storage was done with paper tape or punch cards. Wow, talk about ancient history!


Image credit: Marcin Wichary on Flickr [ license: cc-by ]

Very few computers are sold these days with a built-in floppy drive of any size. One of the long term problems of file storage is updating the medium on which the file is stored. It may not be too long from now that nobody will have working versions of a floppy disk. Any files still stored on the old floppy disks will be lost.

One of the theoretical benefits of storing files in the cloud is that someone else worries about the physical format of the storage. Of course, you depend on the company you are paying to do your cloud storage. If they stop providing the service, you'll need to grab your data back from them before they turn off their equipment.

While we're at it, let's finish off this theory section with CDs and DVDs.
CD = Compact Disc
DVD = Digital Videodisk or Digital Versital Disc

Both of these media are considered "optical" storage because they use the light of a bright laser instead of an electromagnet. The laser melts or "burns" pits into the critical layer of the disk. The resulting pits represent on or off switch data for the stored files. Commercial disks are suitable for long term storage. There is some concern for data longevity of disks made with the mechanism in a home computer. CD technology replaced the vinyl record album and cassette tapes for music. CDs contain files. A file can be music just as easily as a file can be the words of a novel or business report.

DVDs followed after CDs. The DVD storage format holds much more data than a CD. While songs were delivered on CD, movies have been delivered on DVDs. Movie files are bigger. They need more room. No surprise.

The drive mechanism reads and writes to either a CD or a DVD. The burned disk is removable. CDs and DVDs are often used as a way to do backups. The CD/DVD data is stable and takes very little storage space. CDs and DVDs have effectively replaced floppy drives for purposes of backup. Thumb drives and the cloud have replaced floppies as a way to easily transport files from one computer to another.

Note:
CDs advanced to DVDs for storage capacity CDs max out at around 700MB (less than a Gigabyte). DVDs are generally recognized to hold 4.70 GB. Both have been relatively successful for computer storage even though they were originally invented for selling music and movies in playback-only format. DVDs have advanced to Blu-ray Disc™. Blu-ray is a multi-layer format, and drive mechanisms have been made for computers. Blu-ray format (with 25GB per layer) allows high definition movies to fit on single Blu-ray disks. They have not dropped in price quickly, and the demand for them has been somewhat limited. CD/DVD storage was very popular with advanced, "early adopter", computer users and that helped make the prices fall. Demand drove the manufacturers to get the tools into everybody's hands. That demand has not been there for Blu-ray technology. Blu-ray is still mainly a way to deliver pre-recorded movies to the public, often with lots of "extra features" filling the larger format space. [ More at Wikipedia ]


© 2013 Algot Runeman - Shared using the Creative Commons Attribution license.
Source to cite: - filedate: