Exam practice
Every question from the end of every unit, with hints and answers to open. After you check an answer, mark how you did, and come back to the ones you didn’t get.
12 questions
Unit 5 · Computers in the World
Explain these words, with an example of each: sensor, actuator, Internet of Things, data log.
Answer
- Sensor: a device that measures something in the world and turns it into a signal a computer can read. Example: a soil-moisture sensor in a greenhouse; a phone’s accelerometer.
- Actuator: an output device that acts on the world when the computer tells it to. Example: a water pump switched on by a greenhouse controller; a flood siren.
- Internet of Things: everyday things with sensors or actuators and a small computer, connected to the internet so they can send data and be controlled from far away. Example: river stations that send water levels for flood warnings; a smart electricity meter.
- Data log: a record of a sensor’s readings, each with the time it was taken, often a CSV file. Example: a greenhouse’s temperature and moisture, one line an hour.
Name the four limits of a sensor, and say what each means for a thermometer that sends a reading every 10 minutes from a milk chiller.
Answer
- Range: the lowest and highest temperatures it can measure. It must cover the chiller’s temperatures, from about 0 °C to well above the warning level.
- Resolution: the smallest change it can show. If its steps are 0.5 °C, it can’t tell 3.2 °C from 3.4 °C.
- Accuracy: how close its reading is to the true temperature. If it reads 1 °C low, the milk could be too warm while the reading looks safe; it should be checked against a good thermometer.
- Sampling rate: how often it reads, here every 10 minutes. A rise and fall that happens between two readings is never seen, and a warning can come up to 10 minutes late.
Draw the four parts of an IoT system for a vaccine fridge at a rural health post that should warn a health worker if it gets too warm. Say what happens at each part, and one thing that should still work when the mobile network is down.
Answer
- Sense: a temperature sensor inside the fridge, read every few minutes.
- Connect: a small device with a battery and a mobile-network radio sends the readings.
- Process: a program (in the device, and on a server in the cloud) compares each reading with the safe range, about 2 to 8 °C, and keeps the record.
- Act: if the temperature leaves the safe range, a text message or app alert goes to the health worker, and a buzzer sounds on the fridge itself.
When the network is down, the device should still record every reading in its own memory (and send them later) and sound the buzzer on the spot, so the warning doesn’t depend on the network.
What is a single point of failure? Find two in this design, and say how to remove each: a mobile wallet runs on one server, with its database on one disk, in one building in Kathmandu.
Answer
A single point of failure is a part whose failure stops the whole system.
- The one server: if it crashes, the wallet stops. Remove it with several servers behind a load balancer that checks their health and sends requests only to working ones.
- The one disk (the database): if it fails, every account’s data is lost. Replicate the database to other servers, and keep backups apart.
- The one building (a third one): a power cut, flood or earthquake there takes everything down. Keep copies in another zone or city.
A service promises 99.95% availability. How many hours a year may it be down? Show your working.
Answer
Down for 100% − 99.95% = 0.05% of the time.
Hours in a year: 365 × 24 = 8,760.
0.05% of 8,760 h = 0.0005 × 8,760 = 4.38 hours a year (about 4 hours 23 minutes).
Explain how a phone finds its position from GPS satellites. Include why the speed of light matters and why four satellites are needed.
Answer
Each GPS satellite has atomic clocks and keeps sending a signal that says where it is and the exact time the signal left. The phone notes when each signal arrives; the travel time × the speed of light (about 300,000 km/s) is its distance from that satellite. Each distance puts the phone on a sphere round a satellite, and the spheres from several satellites cross at one point: the phone’s position (trilateration).
The speed of light matters because the distances come from times: light covers 300 m in a millionth of a second, so the times must be measured that precisely. A phone’s clock isn’t good enough, and its error makes every distance wrong by the same amount. So the clock’s error is a fourth unknown, with the three for the position, and four satellites give four distances to find all four. The receiver finds the clock error that makes all the spheres meet at one point.
Give three reasons why a phone’s position may be poor in a narrow lane in Asan, and one way the phone still works out roughly where it is.
Answer
Reasons (any three): the buildings hide most of the sky, so few satellites can be heard, all from one direction; signals bounce off walls before arriving, so their distances come out too long; signals are weak under roofs and in doorways; satellites low in the sky are hidden first.
The phone still guesses its place from the Wi-Fi networks and mobile towers around it, whose places are known, and uses its compass and accelerometer to follow its movement between fixes. The map shows the larger accuracy circle.
A map picture is 1,000 pixels wide and 800 high; its west edge is at longitude 85.30° E and its east edge at 85.35° E, its north edge at latitude 27.72° N and its south edge at 27.68° N. At which pixel does the point 27.70° N, 85.31° E fall?
Answer
x = (85.31 − 85.30) ÷ (85.35 − 85.30) × 1,000 = 0.01 ÷ 0.05 × 1,000 = 200.
y = (27.72 − 27.70) ÷ (27.72 − 27.68) × 800 = 0.02 ÷ 0.04 × 800 = 400 (counted down from the top, so it is taken away from the north edge).
The point is at pixel (200, 400).
A data center’s computers use 50 MW and its PUE is 1.4.
- a.How much electricity does the whole data center use?
- b.How much in a year, in GWh?
- c.Give two ways it could lower its PUE.
Answer
- a.Whole data center = PUE × computers = 1.4 × 50 MW = 70 MW.
- b.70 MW × 8,760 h = 613,200 MWh ≈ 613 GWh a year.
- c.Any two: cool with outside air or cold water instead of air conditioning (build it where the climate is cool); keep the hot air leaving the servers apart from the cold air coming in; use cooling that evaporates water; reuse its waste heat, for example to heat nearby buildings; use more efficient power supplies and batteries, so less is lost in the wiring.
Your cousin wants to sell his old phone. Write the steps he should follow, in order, and say why each matters.
Answer
- Back up photos, contacts and messages, so nothing is lost.
- Sign out of his accounts, especially his Google account or Apple ID, and his wallet and banking apps: otherwise the phone stays locked to his account after a reset and the buyer can’t use it, and his money apps must never pass to someone else.
- Take out the SIM card and memory card: they hold his number and files.
- Reset the phone to factory settings, which wipes it; a modern phone’s storage is encrypted, so his old data can’t be read back.
- Sell it, or give it to someone who needs it, instead of letting it sit in a drawer.
A city plans a huge data center by a river in a dry region, run on electricity from coal. Investigate it the way this unit did: who gains, who pays, and why them? Suggest one change.
Answer
Who gains: the company and its users (anywhere in the world), who get fast, reliable services; the city, through taxes and some jobs, mostly while it is being built; businesses that sell to it.
Who pays: farmers and households downstream, if the data center takes river water for cooling in a dry region; the people near the coal plant, who breathe its smoke; everyone, through the climate change its CO₂ adds to, and most of all poorer people who depend on the weather; people whose electricity gets dearer or shorter if the data center takes a large share.
Why them: the data center is placed where land and power are cheap, and its users live far away and don’t feel its costs; the neighbors and the downstream farmers didn’t choose it and may have little say.
One change (any one sensible): cool it with air instead of water, or with recycled water; build it where there is clean electricity (wind, solar, hydro) and a cool climate; require it to pay for new clean power for the region; give the people affected a say in the decision and a share of its benefits.
Suppose the SEE results website crashes on results day. As the exam board’s adviser, explain what you would change, using the ideas of this unit.
Answer
- Scale up for the day: rent servers in the cloud and add many for results day (or let them be added automatically as visitors grow), then remove them afterwards, paying only for what is used.
- Spread the load: put several servers behind a load balancer with health checks, so one that fails is skipped.
- Remove single points of failure: replicate the database, keep copies in more than one zone, and keep backups.
- Make the work lighter: the results don’t change once published, so prepare each page in advance and keep copies close to users (caching), instead of looking up the database for every visitor; offer results by text message as well.
- Test it beforehand with as many pretend visitors as the real day brings, and change things gradually (a staged rollout) with a way to undo a change.
- Degrade gracefully and be honest: if it is overloaded, show a simple page with the results alone and a status page saying what is wrong.
