Computer Systems and Networks, AP CSP Big Idea 4 (15%) – Study Notes
offline

Source: AP Computer Science Principles Course Framework

Tags: internet, network, protocol, TCP, IP, UDP, HTTP, packet, routing, bandwidth, latency, IPv4, IPv6, fault tolerance, redundancy, scalability, parallel computing, sequential computing, distributed computing, DDoS, speedup, execution time

Difficulty: Intermediate Prerequisites: Basic understanding of binary (Big Idea 2) is helpful for IP addresses.


Big Picture

Big Idea 4 covers how computers communicate with each other over the internet. It accounts for 15% of the exam. You need to understand the structure of the internet (networks of networks), how data travels in packets through routers, and the protocols (TCP/IP, UDP, HTTP) that make it all work. Fault tolerance and redundancy explain how the internet stays running when parts fail. The computing models (sequential, parallel, distributed) and their execution time calculations are tested directly, often as word problems. If you can explain how packets move, distinguish TCP from UDP, and calculate speedup for parallel processing, you are well prepared.


TL;DR

The internet is a network of networks using open, nonproprietary protocols. Data travels in packets through routers, guided by TCP/IP. Fault tolerance through redundancy keeps systems running when parts fail. Sequential computing does one thing at a time, parallel computing uses multiple processors simultaneously, and distributed computing spreads work across multiple devices. Know how to calculate execution time and speedup.


Key Terms

Internet

A computer network consisting of interconnected networks that use standardised, open (nonproprietary) communication protocols. Any device can join as long as it follows the rules.

Computing device

A physical machine that can run a program. Devices connect to form computing systems.

Computing network

A group of computing devices that can share data with each other.

Computing system

A group of computing devices and programs working together for a common purpose.

Packet

A small chunk of data sent over a network. Each packet contains a section of the data being transmitted plus a header with metadata (where it came from, where it is going, how to reassemble it).

Router

A computing device that forwards packets along a path. Paths are sequences of connected routers.

Routing

The process of finding a path for packets to travel from source to destination.

Bandwidth

The maximum amount of data a network connection can transfer in a given amount of time. Measured in bits per second or megabits per second.

Latency

The time delay between when data is sent and when it arrives. In simple terms, how late the bits are.

Protocol

A standard set of rules that all devices agree to follow for communication. Protocols are open (nonproprietary), meaning they are not owned by any single company.

TCP/IP (Transmission Control Protocol / Internet Protocol)

Two protocols that work together. TCP governs how packets are created and reassembled. IP handles addressing and moving packets to their destinations. Together they provide reliable, ordered, error-checked delivery.

IP address

A unique numerical label assigned to each device on a network. Used to identify the device and route packets to it.

IPv4

An IP address format using four numbers separated by dots, each ranging from 0 to 255 (e.g. 74.125.20.113). Provides 2^32 (about 4.3 billion) possible addresses.

IPv6

A newer IP address format using eight groups of hexadecimal numbers (e.g. 2001:0db8:0000:0042:8a2e...). Provides 2^128 possible addresses, vastly more than IPv4.

UDP (User Datagram Protocol)

A protocol that delivers data faster than TCP by skipping error checking and delivery confirmation. Does not guarantee delivery or order of packets. Used where speed matters more than reliability (e.g. live video streaming).

HTTP (Hypertext Transfer Protocol)

The protocol that controls how web page data is transmitted. Enables communication between web browsers and servers. Used on the World Wide Web.

World Wide Web (WWW)

A system of web pages, programs, and files accessed through the internet using HTTP. The web is not the same as the internet: the internet is the infrastructure, the web is one service that runs on it.

Scalability

The capacity of a system to change in size and scale to meet new demands.

Fault tolerance

The ability of a system to function properly even when one part fails.

Redundancy

The inclusion of extra components (servers, connections, paths) that can take over if primary components fail. A key mechanism for achieving fault tolerance.

DDoS (Distributed Denial of Service) attack

An attack where multiple computers overwhelm a server or network with a flood of traffic, causing it to slow or crash. Redundant servers help mitigate this.

Sequential computing

Executing instructions one after another in order. Total time = sum of all step times.

Parallel computing

Breaking a program into smaller operations that run simultaneously on multiple processors. Saves time by doing things at once.

Distributed computing

Using multiple devices (not just multiple processors in one machine) to run a program. Allows users to share information and solve problems that a single device could not handle alone.

Speedup

The measure of how much faster a parallel solution is compared to a sequential one. Calculated by dividing sequential time by parallel time.


Core Content

How the Internet Works

  • The internet connects networks of computing devices using open, nonproprietary protocols

  • Data is broken into packets, each with a header containing metadata (origin, destination, reassembly instructions)

  • Packets travel through routers along paths

  • Packets can arrive in order or out of order; TCP handles reassembly

  • Bandwidth is the maximum data transfer rate; latency is the delay

Protocols

  • TCP/IP: reliable delivery with error checking

    • TCP creates and reassembles packets

    • IP moves packets to their destination using IP addresses

    • Packets may arrive out of order; TCP ensures correct reassembly

    • If packets are lost, TCP requests redelivery

  • UDP: faster but unreliable

    • No error checking, no delivery guarantee, no order guarantee

    • Good for streaming where speed matters more than perfection

  • HTTP: governs web page data on the World Wide Web

  • Key distinction: TCP, IP, and UDP transmit data over networks. HTTP transmits data over the World Wide Web specifically. Do not mix these up.

IP Addresses

  • IPv4: four numbers (0 to 255) separated by dots. 2^32 possible addresses (about 4.3 billion). Running out of unique addresses.

  • IPv6: eight groups of hexadecimal numbers. 2^128 possible addresses. Created to solve the address shortage.

Fault Tolerance and Redundancy

  • Fault tolerance means the system keeps working even if a part fails

  • Achieved through redundancy: extra servers, backup connections, alternative paths

  • Benefits: reduces impact of hardware failures and cyberattacks, increases reliability, prevents full shutdowns, supports system expansion

  • Drawbacks: requires more resources and is expensive to build and maintain

  • Example: during a DDoS attack, redundant servers can handle traffic while the targeted server is overwhelmed

Computing Models and Execution Time

  • Sequential: steps run one after another. Total time = sum of all steps.

    • Example: steps take 40, 50, and 80 seconds. Sequential time = 170 seconds.

  • Parallel: steps run simultaneously on multiple processors. Total time depends on how tasks are distributed.

    • With unlimited processors (3 steps, 3 processors): total time = the longest single step = 80 seconds

    • With 2 processors and 3 independent steps (40, 50, 80): try all groupings and pick the fastest

      • Processor 1 gets (40 + 50 = 90), Processor 2 gets 80: total = 90 seconds (the longer of the two)

      • Processor 1 gets (40 + 80 = 120), Processor 2 gets 50: total = 120 seconds

      • Processor 1 gets (50 + 80 = 130), Processor 2 gets 40: total = 130 seconds

      • Best case: 90 seconds

    • With 2 processors and 4 steps (40, 50, 60, 80): assign first two to Processor 1, last two to Processor 2. Each processor takes as long as its longest step set: max(40, 50) = 50 and max(60, 80) = 80. Total = 50 + 80 = 130 seconds.

  • Speedup = sequential time / parallel time

    • Example: 170 / 90 ≈ 1.89x speedup

  • Important: check whether steps are independent before assuming they can run in parallel. Some steps depend on the output of a previous step and must run sequentially. A startup or setup step that everything else depends on adds to the parallel total.

  • Distributed computing: multiple devices share the work. Solves problems too large for one machine's storage or processing power.


Real-World Applications

  • Content delivery networks (CDNs) use redundancy by placing copies of websites on servers around the world. If one server goes down, another nearby server takes over, which is fault tolerance in action.

  • Scientific projects like protein folding simulations use distributed computing across thousands of volunteer computers worldwide, tackling problems no single machine could handle.


Common Misconceptions

  • Students confuse the internet with the World Wide Web. The internet is the global network infrastructure. The web is a service that runs on the internet, accessed via HTTP. Email, file transfer, and streaming also run on the internet but are not "the web."

  • Students assume TCP is always better than UDP. TCP is more reliable, but UDP is preferred when speed matters more than guaranteed delivery (live video calls, online gaming).

  • Students forget to check whether parallel steps are independent. If step 3 requires the output of step 2, they cannot run at the same time.

  • Students sometimes think adding more processors always cuts time proportionally. Overhead costs, dependent steps, and uneven task sizes all limit parallel speedup.


Why It Matters / Exam Flags

  • ⚠️ Execution time calculations for sequential, parallel, and speedup are tested as word problems. Practice with numbers.

  • ⚠️ TCP vs. UDP: know the trade-offs (reliability vs. speed).

  • ⚠️ IPv4 vs. IPv6: know the format and address count for each.

  • ⚠️ Fault tolerance and redundancy: expect questions about what happens when a network component fails.

  • ⚠️ Internet vs. World Wide Web: they are not the same thing. HTTP is for the web; TCP/IP is for networks.

  • ⚠️ Check whether steps are independent before calculating parallel time.


Quick Self-Test

  1. True or False: The internet and the World Wide Web are the same thing.

  1. Fill in the blank: __________ is the protocol that governs how packets are created and reassembled.

  1. True or False: UDP guarantees that packets will arrive in order.

  1. Fill in the blank: Speedup is calculated by dividing __________ time by __________ time.

  1. True or False: IPv6 provides fewer possible addresses than IPv4.

Answers: 1. False (the internet is the infrastructure; the web is a service on it). 2. TCP (Transmission Control Protocol). 3. False (UDP does not guarantee order or delivery). 4. Sequential, parallel. 5. False (IPv6 provides vastly more: 2^128 vs. 2^32).


Practice Q&A

Q: A program has four independent steps that take 10, 20, 30, and 40 seconds. Calculate the execution time for: (a) sequential computing, (b) parallel computing with 2 processors, and (c) the speedup.

A: (a) Sequential: 10 + 20 + 30 + 40 = 100 seconds. (b) Parallel with 2 processors: assign (10 + 40 = 50) to one and (20 + 30 = 50) to the other. Both finish in 50 seconds. Total = 50 seconds. (c) Speedup = 100 / 50 = 2x.

Q: Why was IPv6 created?

A: IPv4 provides about 4.3 billion addresses (2^32), which is not enough for the growing number of internet-connected devices. IPv6 uses 128-bit addresses (2^128 possible values), providing a vastly larger address space.

Q: A network has three paths from server A to server B. One path goes down. Can data still reach its destination? What property of the network makes this possible?

A: Yes, data can still reach its destination through one of the two remaining paths. This is possible because of fault tolerance, achieved through redundancy (multiple paths exist so that the failure of one does not bring down the whole system).

Q: Why would a video streaming service use UDP instead of TCP?

A: UDP is faster because it skips the error checking and delivery confirmation that TCP performs. For live video streaming, speed is more important than perfect delivery. A few dropped packets cause minor visual glitches, which is acceptable compared to the delay TCP would introduce.

Q: A parallel program has a setup step that takes 5 seconds (which must run first), followed by 3 independent steps of 20, 30, and 40 seconds run on 3 processors. What is the total execution time?

A: The setup step runs sequentially first (5 seconds). Then the three independent steps run in parallel, finishing when the longest completes (40 seconds). Total = 5 + 40 = 45 seconds.


Connections to Other Topics

  • Packets and metadata here connect to the metadata concept in Big Idea 2 (Data): packet headers are metadata about the data being transmitted.

  • Parallel and distributed computing connect to Big Idea 3 (Algorithms and Programming), where algorithmic efficiency determines whether a problem can be solved in reasonable time.

  • Fault tolerance and redundancy connect to Big Idea 5 (Impact of Computing), where system reliability affects everything from access to education to the security of personal data.


Related Terms / Search Tags

internet, network, computing device, computing system, packet, router, routing, bandwidth, latency, protocol, TCP, IP, TCP/IP, UDP, HTTP, World Wide Web, WWW, IP address, IPv4, IPv6, hexadecimal, fault tolerance, redundancy, scalability, DDoS, distributed denial of service, sequential computing, parallel computing, distributed computing, execution time, speedup, processor, core, AP CSP, AP Computer Science Principles, Big Idea 4