# A-level Computing/AQA/Paper 2/External hardware devices/Secondary storage devices

This section will be looking at the various forms of secondary storage devices (media). For each device you should be familiar with the following details:
* Seek time - The average time taken from requesting data to starting to read the requested data
* Capacity - The amount of data it is possible to store on a medium
* Write type - Whether it is read only, write only, or readable and writable
* Cost - How much it costs per megabyte
* Access type - Whether it uses Random Access or Serial Access
Pay special attention to devices with an orange background, you need to be able to describe exactly how they work!

## Magnetic media

Magnetic media stores data by assigning a magnetic charge to metal. This metal is then processed by a read head, which converts the charges into ones and zeros. Historically, magnetic media has been very popular for storing programs, data, and making backups. However, solid state technology is starting to be used more and more, storing programs and data on new devices such as mobile phones and cameras.
Magnetic media :
| Device | Size |
| Hard Disk | Up to 10 Terabytes |
| Magnetic Tape | Up to 2 Terabytes |

### Hard disk

Hard disks are usually found inside computers to store programs and data. They are increasingly cheap and more and more companies are using them to back things up. Hard disks can vary in physical size with some disks getting as small as your thumb. More closely packed platters, greater density of data on each platter to allow for more tracks and cylinders and the ability to write smaller magnetic spots have all been developments in the design of hard disks to increase their storage capacity. The capacity of a commercial disk is currently up to about 4 terabytes allowing users to read and write to them. They are constructed from several key components:
* Platter - Metallic disks where one or both sides of the platter are magnetised, allowing data to be stored. The platter spins continuously, around one hundred times a second, around a spindle while in use. There may be several platters, with data stored across them. The disk is divided into tracks and sectors with data represented by magnetising spots on the disk.
* Head - The head reads magnetic data from the platter. For a drive with several platters there may be two heads per platter allowing data to be read from top and bottom of each
* Actuator Arm - used to move the read heads in and out of the disk so that data can be read and written to particular locations. They allow you to access data in a random fashion, so you don't need to read your way through the entire disk to fetch a particular bit of information, you can jump right there. Seek time is very low.
* Power connector - provides electricity to spin the platters, move the read head and run the electronics
* IDE connector - allows for data transfer from and to the platters
* Jumper block - used to get the disk working in specific ways such as RAID
For the exam you must be able to explain how a hard disk works:
* The platters spin around the spindle
* Data is requested to be read from a particular area of a platter
* The actuator arm moves the read head to that track
* Once the data sector that is required has spun around and under the read head, data is read
* Read data is sent from the IDE connector to main memory
Writing data is very similar:
* The platters spin around the spindle
* Data is sent to the hard disk using the IDE connector
* The actuator arm moves the write head to the track that will be written to
* Once the data sector that is required has spun around and under the write head, data is written to the platter
Pros
Cons

### Solid state drive

An SSD(Solid state drive) consists of an array of NAND flash memory with a controller that manages the pages and blocks, as well as the complexity of writing. A block is made up of many pages, when you need to overwrite pages it has to be erased before it can be written to however because of the limitations of the technology the whole block must be erased. NAND flash memory is based on a floating gate transistor which traps and stores charge.
Pros
Cons

### Magnetic Tape drive

Increasingly obsolete, the tape has been a medium to deliver software and back up data since the early days of computing. Nowadays they are used mostly for corporate backing up and archiving of data. Tapes are sequential data stores, meaning that if you had information stored at the end of the tape you would have to wind your way through the entirety of the tape before you could read it. There is no random access like with a hard disk! Tapes can be several terabytes in size and reading and writing can be very fast as long as you read or write continuous sections of the tape at once.
Pros
Cons

## Optical media

Optical media works by creating a disc with a pitted metallic surface. There are several different types of disc out there ranging from 650 MB to 128 GB, with the pits and lands getting closer together for higher volume disks. The principle behind how each of them works is the same.
Optical media :
| Device | Type | Size |
| CD-ROM CD-R CD-RW | Read Only Write once then Read only re-Writable | 650 - 900 MB |
| DVD-ROM DVD-R DVD-RW DVD-RAM | Read Only Write once then Read only re-Writable re-Writable | 4.7 - 9.4 GB |
| Blu-ray (BD) disc HD DVD (obsolete) | Re-Writable and Read Only versions available. Uses a blue laser, that is able to recognise smaller pits and lands, which allows for the pits and lands to be more closely packed, and so store more data | 25 - 128 GB |

### CD-ROM

A CD-ROM is a metal disc embedded into a plastic protective housing. Each disc has to be 'mastered'; this is the process of creating the CD and placing the data on it. CDs are WORM (Write Once, Read Many) media; this refers to the fact that once they have been mastered, there is no way to change the data on them.
Reading from a CD-ROM
* A single track runs in a spiral pattern from the centre of the disc to the outside, this track is made of pits and lands to represent the ones and zeroes of binary data
* A low-powered laser is shone on the metallic surface and the reflection is captured in a photodiode sensor, the lands reflect differently to the pits, meaning it can tell the difference between a 1 and a 0
* The disc spins and the laser follows the track
* The binary data (the 1s and 0s) are put together and the CD-ROM has been read
Pros
Cons

### CD-R

The CD-R is made of a reflective metal disk with a layer of (usually green, opaque) dye on top.
Writing to a CD-R
* A single track runs in a spiral pattern from the centre of the disc to the outside.
* A high-powered laser is shone onto the CD-R, changing the transparency (permanently) of the dye above. The transparent and opaque parts represent binary 1s and 0s
* The disc spins and the laser follows the track, putting the binary data onto the CD-R in a spiral track
* The data has been written
Reading from a CD-R
* A single track runs in a spiral pattern from the centre of the disc to the outside.
* A low-powered laser is shone on the surface and the reflection is captured in a photodiode sensor. The opaque dye will reflect differently to the transparent dye (which would just reflect the metal underneath it), meaning it can tell the difference between a 1 and 0
* The disc spins and the laser follows the track
* The binary data (the 1s and 0s) are put together and the CD-R has been read
Pros
Cons

### CD-RW

The CD-RW is made of a reflective metal disk with a layer of a special ('phase change') metal on top.
Writing to a CD-RW
* A single track runs in a spiral pattern from the centre of the disc to the outside.
* A high-powered laser is shone onto the CD-RW. Depending on whether this is very high powered or heats at a slightly lower temperature, the top layer of metal cools differently. These will result in different amounts of reflectivity, which represent the 1s and 0s.
* The disc spins and the laser follows the track, putting the binary data onto the CD in a spiral track
* The data has been written
Reading from a CD-RW
* A single track runs in a spiral pattern from the centre of the disc to the outside.
* A low-powered laser is shone on the surface and the reflection is captured in a photodiode sensor. The different ways the metal has cooled reflect different amounts, meaning it can tell the difference between a 1 and 0
* The disc spins and the laser follows the track
* The binary data (the 1s and 0s) are put together and the CD-RW has been read
Pros
Cons

## Solid-state memory

Solid-state memory :
| Device | Description |
| USB flash drive | Up to 1 TB |
| Memory card | Up to 256 GB |

### USB (memory stick) Flash Drive

Internals of a typical USB flash drive :
| 1 | USB Standard-A plug |
| 2 | USB mass storage controller device |
| 3 | Test points |
| 4 | Flash memory chip |
| 5 | Crystal oscillator |
| 6 | LED |
| 7 | Write-protect switch (Optional) |
| 8 | Space for second flash memory chip |
USB Flash drives are solid state, that means that there are no moving parts. This is very useful for seek times as we don't have to wait for mechanical movement, meaning seek time is very low and it allows for fast Random Access Memory. Flash drives can be set to read only mode, but they will always allow for reading and writing. The size of flash drives is not as great as a Hard Disk and they are generally much more expensive per megabyte
* put drive into USB socket
* USB driver loads, providing the computer with code on how to read and write from the USB
* The USB is read, giving information on the file and folder structure (File Allocation Table) to the Computer
* [Reading] The user chooses to open a file, the Computer sends the address wanted to the USB port
* [Reading] The USB returns the data at the location requested
* [Writing] The computer sends data to the USB port where it is place into empty space on the drive
* [Writing] The computer then requests a new version of the file and folder structure
Pros
Cons

### Memory cards

Work in much the same way as a Flash drive and can often be converted into Flash Drives. They have different connectors and are generally smaller than USB Flash drives allowing for them to be used in cameras, mobile phones and game consoles.
* Exercise: Secondary Storage
* Choose the correct secondary storage device for each of the following scenarios:
* A company needs to backup some HD movie files for 4 years.
* Answer:
* DVD-ROM
* Blu-Ray
* Tape
* Hard Disk
* NOTE: not CD-ROM, it is too small and USB might be too expensive an option
* You need to store files for a school project taking up about 70 MB that you can then transport to and from school
* Answer:
* USB Memory Stick(remember not to say USB on it's own!)
* CD-RW
* NOTE: nothing that is ROM!
* Why do some people reckon that Blu-Ray will be the last optical disk format?
* Answer:
* As broadband gets faster and people store more and more of their data online, everything will be transmitted over the internet and there will be no need to have large physical storage at home
* Describe how a Hard Disk writes a file
* Answer:
* The platters spin around the spindle
* data is sent to the hard disk using the IDE connector
* the actuator arm moves the write head to the track that will be written to
* Once the data sector that is required has spun around and under the write head, data is written to the platter
* Describe how a computer reads from a usb
* Answer:
* put drive into USB socket
* USB driver loads, providing the computer with code on how to read and write from the USB
* The USB is read, giving information on the file and folder structure (File Allocation Table) to the Computer
* The user chooses to open a file, the Computer sends the address wanted to the USB port
* The USB returns the data at the location requested
* What optical disk format would you recommend for the following:
* Making long term backups of some photos
* Answer:
* CD-R
* DVD-R
* NOTE: there is no need for RW or RAM here
* Distributing a software product that includes 20 minutes of HD video footage
* Answer:
* DVD-ROM
* Blu-Ray
* NOTE: CD-ROM would probably be too small for this
* Backing up school work at the end of each week to take home
* Answer:
* USB Flash Drive
* DVD-RW / RAM
* CD-RW
* NOTE: Rs wouldn't be suitable as you would have to keep throwing them away!