4.1 Devices, Systems & Networks
Key Definitions
Computing device: a physical thing that can run a program, e.g. laptop, phone, server, router.
Computing system: devices + programs working together for 1 purpose, e.g. a school grade system.
Computer network: connected devices that can send + receive data; a type of computing system.
Paths & Routing
Path: chain of directly connected devices that runs from the sender to the receiver.
Routing: finding a path. On the internet it's dynamic: not planned ahead; routers choose each next hop as conditions change.
Shortest ≠ used: data may take a longer path if the short one is busy or broken at that moment.
| Term | Means |
|---|---|
| Bandwidth | max data per second |
| Path | sender → receiver |
| Hop | 1 link crossed |
| Latency | delay to arrive |
Bandwidth
Bandwidth: the most data that can be sent in a fixed time, measured in bits per second (bps).
Calc e.g.: 40 MB at 8 Mbps → 40 × 8 = 320 Mb ÷ 8 = 40 s. Change bytes to bits first (× 8).
4.1 The Internet & Protocols
What the Internet Is
Internet: a network of networks that all use open (not owned by anyone), standard protocols.
Access: a device gets on by connecting to a device already online, e.g. a Wi-Fi router.
Protocol: an agreed-upon set of rules for how devices send, receive + format data.
Open protocols → anyone can build devices that work w/ the internet → easy to add new devices.
Key Protocols
| Protocol | Job |
|---|---|
| IP | addresses + routes |
| TCP | in order, resends lost |
| UDP | fast, no resends |
| HTTP | sends web pages |
| HTTPS | encrypted HTTP |
TCP: checks every packet arrived + puts them in order. Slower but complete (web, email, files).
UDP: skips the checks → faster. A few lost packets are OK (video calls, live games).
Layers: HTTP runs on TCP, which runs on IP → each protocol does 1 job + can be updated alone.
IETF: group that creates + updates the open internet standards; anyone can take part.
4.1 Packets & Data Streams
Packet Switching
Data stream: a message is split into chunks, and each chunk is sent in its own packet.
Packet = data + metadata (info like source, destination + order #) used to route + rebuild it.
Arrival: packets may arrive in order, out of order, or not at all. Each can take its own path.
Rebuild: the receiver uses the order #s in the metadata to put the message back together.
Why Packets?
| Benefit | Why |
|---|---|
| Share links | many users at once |
| Avoid failures | each packet reroutes |
| Easy fixes | resend only lost ones |
| Scales | no private line needed |
Trace e.g.
"HELLO" sent as packets 1: HE, 2: LL, 3: O. They arrive 3, 1, 2 → sorted by # → HELLO.
Split paths: packets 1 + 3 go via router X, 2 via router Y → packet 2 may arrive last.
Packet lost: TCP notices the gap + asks for it again. UDP doesn't, so a video call may glitch.
Why packets get lost: a router is overloaded, a link fails, or data arrives damaged.
4.1 The Web & Scalability
Internet vs. World Wide Web
| Internet | WWW | |
|---|---|---|
| What | network | linked pages |
| Uses | IP, TCP, UDP | HTTP |
| Role | the roads | 1 service |
| Began | 1960s–80s | 1990s |
World Wide Web: system of linked pages, programs + files. Uses HTTP; runs on the internet.
Page load e.g.: browser sends an HTTP request → server sends the page back in packets.
Not the web: email apps, streaming + online games use the internet but not the WWW.
Scalability
Scalability: a system's ability to grow or shrink to meet new demand. The internet was built to scale.
Why it scales: open protocols, packets, dynamic routing + many paths; no single control point.
Growth e.g.: billions of devices joined w/o a redesign b/c they all follow the same protocols.
Routers
Router: device that passes packets along toward where they're going, picking the next hop.
ISP (Internet Service Provider): connects homes + schools to the rest of the internet.
4.2 Fault Tolerance & Redundancy
Core Ideas
Redundancy: extra parts that can take over if others fail, e.g. more than 1 path between any 2 devices on a network or system.
Fault tolerant: keeps working when parts fail. Internet data reroutes around a broken link.
Trade-off: redundancy costs more (hardware, cables) but makes the system more reliable.
Single point of failure: 1 device or link whose loss cuts others off; good designs remove these.
| Term | Meaning |
|---|---|
| Redundancy | extra paths (cause) |
| Fault tolerance | keeps working (result) |
| Rerouting | data takes a new path |
| Single pt. of failure | 1 loss cuts others off |
Why It Matters
Failures happen: power loss, cut cables, overloads + storms knock out devices and links.
Scale: more paths → traffic spreads out → more people + devices can join w/o slowdowns.
Reroute e.g.: a cable is cut → routers send packets another way; users barely notice.
Beyond networks: backup servers, cloud copies of files + spare power supplies.
4.2 Network Diagram Problems
Method
Step 1: list every path between the 2 devices the question asks about (no repeats).
Step 2: remove the failed device or link, then check if any path is still left between them.
Worked e.g.
Links: A–B, A–C, B–D, C–D, D–E. A→D has 2 paths (A-B-D + A-C-D), so 1 failure can't cut it.
E has only 1 link (D–E) → if it fails, E is cut off. That link is a single point of failure for E.
| Fails | A↔D? | D↔E? |
|---|---|---|
| A–B | yes | yes |
| C–D | yes | yes |
| A–B + C–D | no | yes |
| D–E | yes | no |
| device D | no | no |
Common Qs
Min # to fail: fewest links whose loss breaks every path. For A↔D above, it's 2 links.
Q types: "which failure cuts X off?", "min # to fail?", "which new link helps most?"
Best new link: one that gives a 2nd path to a device that has only 1 link right now.
Device vs. link: losing device C removes A–C + C–D at once, so it can do more damage.
4.3 Sequential, Parallel & Distributed
3 Computing Models
| Model | How | Time |
|---|---|---|
| Sequential | 1 at a time | sum of steps |
| Parallel | some at once | seq + longest |
| Distributed | many devices | big jobs |
Sequential: steps run in order, 1 at a time. Total time = the sum of every step's time.
Parallel: the program is split up so some steps run at the same time on different processors.
Distributed: many devices on a network run 1 program, e.g. cloud servers, search engines.
Timing Rules
Parallel time = sequential part + the longest parallel task (slowest processor sets the pace).
Worked e.g.: tasks 30, 50, 20, 40 s on 2 processors. Sequential = 140 s.
Best split: {50, 20} + {40, 30} → 70 s each → parallel time = 70 s. Bad split {50, 40} = 90 s.
4 processors: 1 task each → time = 50 s. You can't beat the longest single task, however many processors you add to the job at once.
W/ a sequential step: 10 s setup, then {50, 20} + {40, 30} → 10 + 70 = 80 s total.
Assigning tasks: put the longest tasks on different processors first, then fill in the rest.
4.3 Speedup, Limits & Exam Moves
Speedup
Speedup = sequential time ÷ parallel time. e.g. 140 s ÷ 70 s = 2 (a ratio, so no units).
Limit: the sequential part can't be sped up, so adding processors helps less + less.
| Processors | Time | Speedup |
|---|---|---|
| 1 | 90 s | 1 |
| 2 | 50 s | 1.8 |
| 4 | 30 s | 3 |
| ∞ | → 10 s | → 9 max |
Setup: 10 s sequential + 80 s that splits evenly → time = 10 + 80 ÷ n for n processors.
Diminishing returns: 1 → 2 processors saves 40 s; 2 → 4 saves only 20 s (see table).
Dependencies: if step B needs A's result, B must wait for A, so they can't run in parallel.
Why Distributed?
Distributed: solves problems too big for 1 computer (too slow or too much data).
Scaling: parallel solutions scale better than sequential ones as data grows.
Exam Moves
MCQ: ~8–10 of 70 Qs. Expect a network diagram Q, a timing or speedup calc + definitions.