e-ducate
Achieving IT Excellence. Together.
2210 | O LEVEL | 2024
3.3 DATA STORAGE
© Muzzammil Muttur
Computer Science Compiled – Workbook | O Level 2024
© Muzzammil Muttur | [email protected] | @mmuttur | 5 493 1972 2
Computer Science Compiled – Workbook | O Level 2024
3.3.1 – PRIMARY STORAGE
Storage devices are used in the computer to store data and programs (mainly for later use).
There are three main types of memory: primary, secondary and off-line
Primary Storage
Primary storage is used by the CPU (Central Processing Unit) to store data and instructions. It is also used when
reading/writing data to and from secondary storage (e.g. Hard disk).
Contents of primary storage are directly accessible by the CPU. E.g. ROM, RAM and DVD RAM.
ROM
stands for Read Only Memory
data stored in ROM cannot be altered
Contents of ROM are not lost even when the computer is switched off (non-volatile)
Small storage capacity
used to store the bootstrap
when a computer is switched on, it needs the OS for it to be able to do anything. So a small program is
stored on the ROM whose job is to get the OS from the hard disk so that the computer can work.
This little program is called the bootstrap and the process of retrieving the OS is called booting.
The bootstrap is stored in ROM because it needs to be present when the computer is switched on.
ROM may be used to store the operating system/control software for embedded system (e.g. washing
machine)
RAM
stands for Random Access Memory
Data can be easily changed.
RAM is said to be volatile memory and ROM is non-volatile.
Volatile means all stored data is lost when power is switched off
RAM stores the programs, data files and part of OS that are currently being used by the computer.
ROM RAM
Non volatile Volatile
Contents cannot be modified Can be modified
Small storage capacity Large storage capacity
Two types of RAM technology:
◦ Dynamic RAM (DRAM)
◦ static RAM (SRAM)
© Muzzammil Muttur | [email protected] | @mmuttur | 5 493 1972 3
Computer Science Compiled – Workbook | O Level 2024
Dynamic RAM (DRAM)
must be constantly refreshed (every 15 microsecond) – otherwise data is lost
DRAM is cheaper than SRAM. It also consumes less power and has a higher storage capacity.
Used for computer’s main memory
Static RAM (SRAM)
Does not need to be constantly refreshed
much faster than DRAM
DRAM is more common in computers but SRAM is used when speed is essential
CPU cache memory uses SRAM
Using both ROM and RAM
A remote-controlled toy car has a circuitry which contains both RAM and ROM
chips. The remote control is a hand-held device.
ROM
• stores the factory settings such as remote control frequencies
• stores the ‘start-up’ routines when the toy car is first switched on
• stores the set routines; for example, how the buttons on the hand-held device control turning left,
acceleration, stopping, and so on.
RAM
• the user may wish to program in their own routines; these new instructions
• would be stored in the RAM chip
• the RAM chip will store the data/instructions received from the remote control
© Muzzammil Muttur | [email protected] | @mmuttur | 5 493 1972 4
Computer Science Compiled – Workbook | O Level 2024
3.3.2 – SECONDARY STORAGE
This refers to non-volatile data storage which is NOT directly accessible by the CPU. E.g. HHD, SSD, etc.
Secondary storage devices are also known as permanent storage or backing storage devices. They are used to
store data for later on or to transfer data from one computer to another.
Hard Disk Drive (HDD)
There are two types of hard disks: internal (found inside the system unit) and external (portable). Hard
disks are usually used to store data and programs.
Hard disks are becoming cheaper and are being used more and more also for backups.
Current hard disks have a storage capacity of around 4 Terabytes (TB).
However hard disks are very fragile and can be very easily damaged by physical shocks.
The hard disk is a magnetic storage device.
There are now solid state disks with no moving (mechanical) parts at all.
Data is stored on the disc's surface in sectors and tracks
the hard disk takes a lot of time to see data (latency time) since it has to rotate and move the read-write
head
© Muzzammil Muttur | [email protected] | @mmuttur | 5 493 1972 5
Computer Science Compiled – Workbook | O Level 2024
[Source: https://www.britannica.com/technology/hard-disk]
© Muzzammil Muttur | [email protected] | @mmuttur | 5 493 1972 6
Computer Science Compiled – Workbook | O Level 2024
This is how a hard disk works:
The platters spin around the spindle. The platters are coated with magnetic material and is where data
is stored.
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 (the
read/write head floats just above the surface of the platter)
Read data is sent from the IDE connector to main memory
External hard drives are hard disk drives that are found outside the system unit. They are usually
connected using USB.
Latency is the time needed for a block of data track to rotate around the read-write head.
Over time, files are fragmented when stored in the hard disk.
SSD
A Solid-State Drive/Disk contains no actual disk.
It uses integrated circuit (special programmable ROM memory chip) to store data persistently (even
when power is cut off).
It does not use magnetism.
It uses the same connections ad traditional hard disk drives and can easily replace them (e.g. SATA).
SSDs have no moving (mechanical) parts
SSDs are more resistant to physical shocks, run more silently and quickly.
Most SSDs use NAND-based flash memory, which retains data without power.
Data stored is NOT lost when power is turned off.
SSD v/s HDD
SSD is more reliable (no moving parts)
SSD is lighter (more suitable for laptops)
SSD has low power consumption
much cooler than HDD
are very thin (as they have no moving parts)
data access is much faster than HDD
Further reading: [http://www.storagereview.com/ssd_vs_hdd]
© Muzzammil Muttur | [email protected] | @mmuttur | 5 493 1972 7
Computer Science Compiled – Workbook | O Level 2024
[Source: https://diskmfr.com/wp-content/uploads/2022/04/HDD-SSD-Inside.png]
3.3.3 – MAGNETIC, OPTICAL, SOLID-STATE
STORAGE
Off-Line Storage
This is a disconnected storage device that is not under the control of the CPU. Data is recorded onto this device
and it is then physically removed or disconnected from the computer. This type of storage system must be
inserted or connected by a human operator before a computer can access the information. The data stored on
the off-line storage device cannot be accessed when the device is removed. E.g. a USB flash disk (Thumb Drive).
Off-line storage is used for transporting data and backups.
DVD
DVD stands for Digital Versatile Disk. It is similar to a CD in size but can store
much more data. A CD stores around 700 MB (around 0.7 GB) whereas a
single layer DVD stores 4.7 GB of data and a double layer can hold over 9 GB.
A DVD can store data on one or two sides and on one or two layers per side
(dual layer).
CD R or DVD R mean that data may be written only once.
CD RW or DVD RW mean that data may be written or read many times
(ReWriteable)
© Muzzammil Muttur | [email protected] | @mmuttur | 5 493 1972 8
Computer Science Compiled – Workbook | O Level 2024
DVDs:
Are an optical storage medium
Are capable of direct access
Are very portable
Can store a large amount of data
Store sound and pictures of excellent quality
Are cheap
Do NOT work in CD drives
Can be easily damaged by breaking or scratching. DVDs must also be protected from extreme heat.
Require a DVD drive to read the disk
Note: DVD may also stand for Digital Video Disk.
CD
A Compact Disk (CD) is an optical storage device. Data is burnt onto the surface of the disk using a laser beam.
A laser beam is also used to read data stored on the disk. A CD can store around 650 MB of data. A CD-ROM
(Compact Disk Read Only Memory) is can only be written once. The disk cannot be used for storage again but
it can be read many times over.
A CD-R (Compact Disk Recordable) is a CD bought blank (empty). You can then write your data to it. You can
even use multi-sessions to write data on different occasions. Each session will tell the burner to use another
part of the disk.
A CD-RW (Compact Disk ReWriteable) allows you to write and delete data it many times over. It is more
expensive than CD-R.
CDs:
Are small and portable
Are very cheap
Can be used on most computers (can also be used in DVD drives)
Fast access to the data (quicker than magnetic tape)
But
Are fragile (easy to snap or scratch)
Cannot store much data
Are slower to access than the hard disk
© Muzzammil Muttur | [email protected] | @mmuttur | 5 493 1972 9
Computer Science Compiled – Workbook | O Level 2024
How Optical Disks (CDs and DVDs) Work?
Optical media works by creating a disc with a pitted metallic surface. There are several different types of disk
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 work is the same.
Zoomed in surface of a CD showing pits and lands
CD ROM: Working Principle
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
1. 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
2. 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.
3. The disc spins and the laser follows the track.
4. The binary data (the 1s and 0s) are put together and the CD-ROM has been read
© Muzzammil Muttur | [email protected] | @mmuttur | 5 493 1972 10
Computer Science Compiled – Workbook | O Level 2024
Writing to a CD-R
1. A single track runs in a spiral pattern from the centre of the disc to the outside.
2. 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
3. The disc spins and the laser follows the track, putting the binary data onto the CD-R in a spiral track.
4. The data has been written.
Blu-ray
A Blu-ray disk can store more data than a DVD. A single layer can hold 25GB of data and a double layer disk can
store up to 50 GB. It looks much like a CD or DVD as they are of the same size.
You need a Blu-ray player to read a Blu-ray disk. You will also need a Blu-ray burner to write data to a write-
able Blu-ray disk.
Blu-ray is mostly used to store high quality commercial movies (HD or 3D). The player uses a blue laser to read
and write data. DVD players use a red laser to read and write data. Using a blue laser allows more data to be
placed closer together on a Blu-ray disk since blue light has a shorter wavelength than red light.
Optical media
Device Type Size Image
CD-ROM Read Only 650 - 900
CD-R Write once then Read only MB
CD-RW re-Writable
DVD-ROM Read Only 4.7 - 9.4 GB
DVD-R Write once then Read only
DVD-RW re-Writable
DVD-RAM re-Writable
Blu-ray (BD) Re-Writable and Read Only versions 25-50 GB
disc available. Uses a blue laser, that is able to
HD DVD recognise smaller pits and lands, which
(obsolete) allows for the pits and lands to be more
closely packed, and so store more data.
Future of optical media
CDs and DVDs are slowly becoming obsolete. Computers now come with USB connectors only and no DVD or
CD drive. People prefer to use flash memory to transfer data. Cloud storage is also becoming more and more
popular. People listening to music prefer to ‘stream’ their music from the Internet and play in on a computer,
phone, tablet, etc.
Smart TVs can also stream movies (Video On Demand – VoD).
© Muzzammil Muttur | [email protected] | @mmuttur | 5 493 1972 11
Computer Science Compiled – Workbook | O Level 2024
Solid State / Flash Memory
Memory sticks or flash memories (pen drives) use solid-state technology. They use NAND or NOR gates to store
data using control gates and floating gates.
They connect to a computer through the USB port. These devices are small and lightweight – therefore very
easily portable. They can be used as small backup devices.
Digital cameras and smart phones use SD (Secure Digital) or XD (eXtreme Digital) which are based on the same
technology used for memory sticks.
Solid-state memories must not be in use (data transfer) when removed from the USB port or card slot. The
storage device could become unusable.
3.3.4 - VIRTUAL MEMORY
This is a memory management technique used to allow the computer load programs which are larger than the
amount of free space available in RAM. Part of the HDD or SSD is used when more memory is needed.
Part of unused data in RAM is moved out to the HDD/SSD to allow more space for new programs. A memory
management method called paging is used and facilitates the work of virtual memory management.
The problem with virtual memory is disk thrashing. This is when the CPU and OS are busier transferring data in
and out of memory rather than actually processing the data.
3.3.5 – CLOUD COMPUTING
Cloud storage means storing data on remote servers. The same data is stored on more than one servers in case
a server is down (breaks down or is being repaired) – this is called data redundancy.
Three types of systems:
Public cloud
o A storage environment where the customer and the cloud storage provider are different
companies
Private cloud
o Storage is provided by a dedicated server protected by a firewall
o The customer and cloud storage provider work together as a single entity
Hybrid cloud
o A combination of the above two environments
o Some data resides in the private cloud and less sensitive data can be accessed from a public cloud
storage provider
© Muzzammil Muttur | [email protected] | @mmuttur | 5 493 1972 12
Computer Science Compiled – Workbook | O Level 2024
Benefits of cloud storage
Files can be accessed at anytime and anywhere (as long as Internet access is available)
No need to carry external storage device
No worries about back up (done automatically). Data can be recovered even if user hard disk fails.
Very large or “unlimited” storage capacity
Drawbacks of cloud storage
Fast Internet connection needed
Can be costly for large storage space
Risk of cloud storage company failure
Cloud storage: Data security
Is the data physically secure
There should be planning to secure data in case of natural disasters or power cuts
Staff manipulating the data should be well trained and carefully selected: what if they sell confidential
data
Protection from hackers is needed. Confidential and private data could be made public (e.g. photos of
public figures)
© Muzzammil Muttur | [email protected] | @mmuttur | 5 493 1972 13
Computer Science Compiled – Workbook | O Level 2024
URL Description
https://www.youtube.com/watch?v=rBSRvjKdTh8 Optical Disks
https://www.youtube.com/watch?v=1cyMTl_QXSc Hard Disk Drive
© Muzzammil Muttur | [email protected] | @mmuttur | 5 493 1972 14