KS5H446 1.1.3 22 min read 10 question quiz 18 exam marks

Input, Output and Storage

Devices and their uses, magnetic, flash and optical storage, RAM and ROM, virtual storage and how to justify a choice.

Devices and how they work

Input devices

Convert a real world signal into data the computer can process.

  • Keyboard: each key closes a circuit, producing a scan code translated by the driver
  • Optical mouse: an LED and a small camera photograph the surface many times a second and compare successive images to detect movement
  • Barcode scanner: a laser sweeps across the code and a sensor measures reflected light, since black absorbs and white reflects
  • Microphone: a diaphragm vibrates, producing a varying voltage sampled by an analogue to digital converter
  • Sensors: temperature, pressure, light, motion, converting a physical quantity into a measurable electrical value

Output devices

  • LCD and OLED displays: an LCD uses a backlight with liquid crystals controlling how much light passes each subpixel, while OLED pixels emit their own light, so black pixels are simply off and contrast is far higher
  • Laser printer: a laser draws the page as a static charge on a drum, toner sticks to the charged areas and is fused by heat
  • Inkjet printer: droplets are fired from nozzles onto the paper
  • 3D printer: builds an object layer by layer, usually by extruding molten material
Justifying a device choice

Name the property that matters for the scenario. A laser printer suits an office because its cost per page is low over high volumes and it is fast, whereas an inkjet suits occasional photo printing because the initial cost is low and the colour quality is good.

A desk with a keyboard, mouse, microphone and printerA desk with a keyboard, mouse, microphone and printer, the everyday input and output devices of a computer system.monitor: outputshows the resultmicrophone: inputkeyboard: inputmouse: inputprinter: output
Input brings data in, output sends results back out. Classify by the job it does, not by what it looks like.Drawn illustration
How an optical mouse, a barcode scanner and a capacitive touchscreen workThree input devices, each drawn working. An optical mouse is cut open to show an LED that lights the desk and a tiny camera, the sensor, that photographs it thousands of times a second. Two photos of the same desk are shown with the pattern slightly shifted, and comparing them tells the processor which way the mouse moved, so the pointer moves. A barcode scanner shines a laser line sweeping across the black and white bars. White bars reflect the light and black bars absorb it, so the sensor sees a pattern of high and low light, drawn as a square wave under the barcode, which becomes a pattern of 1s and 0s. A capacitive touchscreen has a grid of wires under the glass holding a small electric charge. A finger conducts, so the charge changes where it touches, and the controller finds the row and the column that changed, here column 4 and row 2, which gives the position of the touch.Optical mouse1An LED lights thedesk surface2A tiny camera takes1000s of photos a second3Comparing the photos showswhich way it movedBarcode scanner1A laser sweeps acrossthe bars2White reflects light,black absorbs it3The sensor turns the lightpattern into 1s and 0sTouchscreen1A grid of wires under theglass holds a small charge2A finger conducts, so thecharge changes at that spot3The controller finds therow and column that changedLEDsensorphoto 1photo 2pointer movesscannerreflected light, high then lowcolumn 4, row 2
  1. Optical mouse: an LED lights the surface, a tiny camera takes thousands of photos a second, and comparing them shows the movement.
  2. Barcode scanner: a laser sweeps across the bars, white reflects and black absorbs, and the sensor turns the pattern of light into 1s and 0s.
  3. Capacitive touchscreen: a finger changes the charge in the grid of wires, and the controller finds the row and column that changed.
An input device turns something real, such as movement, light or touch, into a signal the computer can process.
How a laser printer, LCD and OLED screens, and a 3D printer workThree output devices, each drawn working. In a laser printer a laser draws the page as an electric charge on a rotating drum. Toner powder sticks only to the charged parts of the drum. The paper passes under the drum and picks up the toner, and then a hot fuser melts the toner into the paper. A liquid crystal display has a backlight behind a layer of liquid crystals and colour filters, so the light is always on and the crystals block it, which means a black pixel is only dark grey. An OLED display has pixels that make their own light, so a black pixel is simply switched off and the contrast is higher. A 3D printer feeds plastic filament from a spool to a heated nozzle that moves across the build plate laying down one thin layer, then another on top, until the whole object is built.Laser printer1A laser draws the page asa charge on the drum2Toner sticks to thecharged parts of the drum3Paper picks up the toner,a hot fuser melts it inLCD against OLED1LCD: a backlight shinesthrough liquid crystals2OLED: each pixel makesits own light3OLED black is simply off,so contrast is higher3D printer1Plastic filament is fedto a heated nozzle2The nozzle moves, layingdown one thin layer3Layer on layer buildsthe whole objectdrumlasertonerpaperfuserLCDOLEDdark greyblack: offfilterscrystalsbacklightpixelscircuitsone light for alleach lights itselffilamentnozzlelayers
  1. Laser printer: a laser draws the page on a drum as a charge, toner sticks to it, the paper picks the toner up and a fuser melts it in.
  2. LCD has a backlight that is always on, so black is dark grey. OLED pixels make their own light, so black is off and the contrast is higher.
  3. A 3D printer melts plastic filament and lays it down one layer at a time until the object is built.
An output device turns data back into something a person can see or hold.

Storage

Magnetic

Rigid platters coated in magnetic material spin at high speed while a read write head on an actuator arm magnetises regions to represent bits.

  • Very high capacity at low cost per byte
  • Slow relative to solid state, because access requires physical seek and rotation
  • Vulnerable to shock, since the head hovers nanometres above the surface
  • Magnetic tape is serial access, very cheap per terabyte, still standard for archives

Flash, solid state

Data is stored as charge trapped in floating gate transistors, arranged in NAND cells.

  • No moving parts, so access time is uniform and shock resistance is excellent
  • Far faster and lower power than magnetic
  • More expensive per byte
  • A finite number of program and erase cycles per cell, managed by wear levelling, which distributes writes across the drive rather than repeatedly hitting the same cells

Optical

A laser reads pits and lands burned into a reflective layer. Cheap, portable, low capacity, easily scratched, and read only formats cannot be altered.

RAM and ROM

  • RAM is volatile and holds the operating system, running programs and their data. DRAM must be refreshed constantly and is used for main memory. SRAM is faster, needs no refresh, and is used for cache.
  • ROM is non volatile and holds firmware such as the bootstrap. EEPROM and flash allow it to be rewritten for firmware updates.

Virtual storage

Virtual memory is secondary storage used as an extension of RAM. Pages not recently used are written to the page file, freeing physical memory. Excessive paging causes disk thrashing, where the system spends more time moving pages than executing instructions.

Cloud storage is a form of virtual storage: files appear local but are held on remote servers, giving access from any device and offsite backup, at the cost of requiring a connection and placing data under someone else's control.

The memory hierarchyA four level pyramid. Registers sit at the top holding a few bytes and are the fastest and most expensive storage. Below them cache holds kilobytes to megabytes and is very fast. Below that RAM holds gigabytes, is fast and is volatile. At the base secondary storage holds gigabytes to terabytes, is slow and is non volatile. Moving up the pyramid storage gets faster, smaller and more expensive per byte. Moving down it gets larger and cheaper.Registersa few bytesfastest, most expensiveCacheKB to MBvery fastRAMGBfast, volatileSecondary storageGB to TBslow, non volatilefasterbigger and cheaper
The pattern is consistent: the closer to the processor, the faster, the smaller and the more expensive per byte.
Three kinds of secondary storage: magnetic, solid state and opticalThe three kinds of secondary storage, as the three different physical things they are. A magnetic hard disk drive is a stack of spinning platters coated in magnetic material, with a read write head floating just above the surface and moving in and out to reach different tracks. It is the cheapest per gigabyte and comes in the largest capacities, but it is slow, noisy, uses more power, and because it has moving parts it is damaged by knocks. A solid state drive is a circuit board of flash memory chips with no moving parts, so it is fast, silent and tough, but costs more per gigabyte. An optical disc has one spiral track of tiny pits and flat lands that a laser reads: it is cheap and portable but holds little and scratches easily. Which one to choose depends on capacity, speed, durability and cost per gigabyte.MagneticSolid stateOpticalplattersread-write headCTRLflash memory chipsa laser reads the pitsCheapest per gigabyteHuge capacityMoving parts, slowNo moving partsFast, quiet, toughDearer per gigabyteCheap and portableSmall capacityScratches easilyChoose by:capacityspeeddurabilitycost per gigabyte1234
  1. Magnetic: spinning platters with a head floating over the surface.
  2. Solid state: a grid of cells holding charge, with no moving parts.
  3. Optical: one spiral track of pits and lands, read by a laser.
  4. Which one depends on capacity, speed, durability and cost per gigabyte.
Exam answers need the reason, not the name: no moving parts is why an SSD survives being dropped and starts up faster.
A hard disk drive with the lid removedA hard disk drive with the lid removed, showing the mirrored circular platter, the pivoting actuator arm reaching across it and the read write head at the tip of the arm.plattera mirror disc that stores the dataread-write headfloats above the platterspindle motorspins the platter at 7,200 rpmactuator armswings the head across
The head never touches the platter. It floats a few nanometres above a surface spinning at 7,200 revolutions a minute, which is why a knock while it is running destroys the drive.Drawn illustration
A solid state drive with its case openA solid state drive with its case opened, showing a circuit board carrying several flash memory chips and a controller chip, with no moving parts.flash memory chipsthis is where the data iscontrollermanages the chipsconnectorplugs into the computerno moving parts
Nothing in here moves. That single fact explains the speed, the silence, the power saving and the durability all at once.Drawn illustration

Key terms you must be able to define

Analogue to digital converter
Hardware that samples a continuous signal and outputs binary values.
Magnetic storage
Storage representing data by magnetising regions of a rotating platter or a tape.
Solid state storage
Storage using charge trapped in transistors, with no moving parts.
Wear levelling
Distributing writes across a flash device so no cells wear out prematurely.
DRAM
Dynamic RAM, which must be refreshed continuously and is used for main memory.
SRAM
Static RAM, faster and requiring no refresh, used for cache.
EEPROM
Electrically erasable programmable ROM, allowing firmware to be updated.
Virtual memory
Secondary storage used as an extension of RAM when physical memory is full.
Disk thrashing
Excessive paging between RAM and secondary storage, severely degrading performance.

Flashcards

Say the definition out loud before you flip the card. Retrieving it from memory is what builds recall, reading it again is not.

DefineAnalogue to digital converter
AnswerHardware that samples a continuous signal and outputs binary values.
DefineMagnetic storage
AnswerStorage representing data by magnetising regions of a rotating platter or a tape.
DefineSolid state storage
AnswerStorage using charge trapped in transistors, with no moving parts.
DefineWear levelling
AnswerDistributing writes across a flash device so no cells wear out prematurely.
DefineDRAM
AnswerDynamic RAM, which must be refreshed continuously and is used for main memory.
DefineSRAM
AnswerStatic RAM, faster and requiring no refresh, used for cache.
DefineEEPROM
AnswerElectrically erasable programmable ROM, allowing firmware to be updated.
DefineVirtual memory
AnswerSecondary storage used as an extension of RAM when physical memory is full.

Reach the top grade on this topic

  • Explain how a device works mechanically, not just what it is for
  • Justify a storage choice by naming the property that matters in that scenario
  • Distinguish DRAM from SRAM by refresh requirement and where each is used
  • Explain wear levelling as the response to a finite number of write cycles
  • Explain virtual memory as a paging mechanism with a performance cost, not as extra RAM

Mistakes that cost marks here

Avoid these
  • Saying virtual memory 'adds RAM'. It substitutes far slower secondary storage for it.
  • Saying SSDs never fail. Flash cells have a finite number of program and erase cycles.
  • Confusing DRAM and SRAM. SRAM is the faster one used for cache.
  • Describing an OLED as a backlit display. OLED pixels emit their own light, which is why black is truly black.
Fun fact

Solid state drives write data in pages but can only erase in much larger blocks. This mismatch is why an SSD slows down as it fills up, and why wear levelling exists to spread writes across the whole drive.

Knowledge check

0 of 10 answered
1How does an optical mouse detect movement?
2Which type of RAM requires constant refreshing?
3What is wear levelling?
4Why does an OLED display achieve better contrast than an LCD?
5Which storage is most appropriate for archiving 500 TB retrieved once a year?
6What causes disk thrashing?
7Where is SRAM typically used?
8How does a laser printer place toner on the page?
9Which is a disadvantage of cloud storage?
10Why is a hard disk drive vulnerable to physical shock?
Score 0 / 10

Exam-style questions

Five written questions in the style of the real paper. Write a full answer, then let the marker check it against the mark scheme.

18 marks
1Describe how data is stored on a magnetic hard disk drive.3 marks
Describe

Mark scheme0 / 3
  • LRigid platters coated with magnetic material rotate at high speed
  • LA read write head on a moving arm passes over the surface
  • LRegions of the surface are magnetised in one direction or another to represent 1 and 0
Model answer

A magnetic hard disk drive contains one or more rigid platters coated with a magnetic material, which rotate at high speed, typically between five and fifteen thousand revolutions per minute. A read write head mounted on a moving actuator arm is positioned nanometres above the surface and can be moved radially to reach any track. To write data, the head produces a magnetic field that magnetises a tiny region of the coating in one of two directions, representing a 1 or a 0, and to read it the head detects the direction of magnetisation as the surface passes beneath it.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
2Explain the difference between DRAM and SRAM and state where each is typically used.4 marks
Explain

Mark scheme0 / 4
  • LDRAM stores each bit as charge in a capacitor which must be refreshed
  • LSRAM uses flip flops and needs no refresh, so it is faster
  • LDRAM is denser and cheaper, so it is used for main memory
  • LSRAM is more expensive and less dense, so it is used for cache
Model answer

DRAM stores each bit as an electrical charge in a tiny capacitor. Because that charge leaks away, every cell has to be refreshed thousands of times per second, and this refresh cycle both consumes power and makes access slower. SRAM stores each bit using a small arrangement of transistors forming a flip flop, which holds its value as long as power is supplied and therefore needs no refreshing, making it considerably faster to access. The trade off is density and cost: a DRAM cell needs roughly one transistor and one capacitor while an SRAM cell needs about six transistors, so DRAM packs far more capacity into the same area at a much lower price. DRAM is therefore used for main memory where large capacity is essential, while SRAM is used for the small quantities of cache inside and beside the processor where speed matters far more than cost.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
3Explain what wear levelling is and why it is necessary in solid state storage.3 marks
Explain

Mark scheme0 / 3
  • LFlash memory cells tolerate only a finite number of program and erase cycles
  • LWithout intervention frequently written areas would fail long before the rest
  • LWear levelling distributes writes evenly across all cells to extend the drive's life
Model answer

Each cell in flash memory can only be programmed and erased a finite number of times before it becomes unreliable, typically in the order of thousands of cycles for consumer drives. Without intervention this would be a serious problem, because file systems repeatedly rewrite certain areas such as directory structures and log files, so those particular cells would wear out and fail while the vast majority of the drive remained almost unused. Wear levelling is a technique implemented by the drive's controller that tracks how many times each block has been written and deliberately redistributes data so that writes are spread evenly across every cell in the device. This means the whole drive ages at approximately the same rate, which extends its usable life very substantially.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
4A company must choose storage for a database that is accessed thousands of times per second. Justify a suitable choice.4 marks
Justify

Mark scheme0 / 4
  • LRecommends solid state storage
  • LAccess time is uniform because there is no seek or rotational delay
  • LRandom access performance matters most for a database with many small reads
  • LAcknowledges the higher cost per byte as the accepted trade off
Model answer

The company should use solid state storage, ideally NVMe drives. A database serving thousands of requests per second performs a very large number of small random reads scattered across the data, and this is precisely the workload magnetic storage handles worst, because every request requires the actuator arm to seek to the correct track and then wait for the platter to rotate the sector under the head, adding several milliseconds of latency to each access. Solid state storage has no moving parts, so access time is essentially uniform regardless of where the data sits and random reads are served hundreds of times faster, which translates directly into the number of queries the system can serve. The trade off is cost per byte, which is significantly higher than magnetic storage, but for a workload where response time determines whether the service is usable, that cost is easily justified, and the capacity required for a transactional database is generally modest compared with archival data.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
5Explain what virtual memory is and why heavy use of it degrades performance.4 marks
Explain

Mark scheme0 / 4
  • LVirtual memory is an area of secondary storage used as an extension of RAM
  • LPages not recently used are written out to free physical memory
  • LThey must be read back when needed, which requires further paging
  • LSecondary storage is orders of magnitude slower than RAM, so the processor waits
Model answer

Virtual memory is a region of secondary storage, known as the page file or swap space, which the operating system uses as an extension of physical RAM so that the total memory available to running processes can exceed the RAM actually installed. When physical memory is exhausted, the operating system selects pages that have not been accessed recently and writes them out to the page file, freeing those physical frames for other use. Performance suffers because those pages will usually be needed again, and retrieving them requires reading from secondary storage and typically evicting something else to make room. Secondary storage is orders of magnitude slower than RAM even when it is solid state, so every page fault stalls the process for a period during which the processor has nothing useful to do. When physical memory is very badly oversubscribed the system reaches a state called thrashing, in which almost all processor time is spent moving pages back and forth and almost none is spent executing the programs themselves.

The marker looks for key phrases. If you said it another way and it is still right, give yourself the mark.
Machine mark 0 / 18