Cheat sheets

AP Computer Science Principles / Chapter 4

Computer Systems and Networks

Cheat sheet

Networks and rates

  • A computing device runs programs. Devices and programs working toward a common purpose form a computing system; interconnected data-exchanging devices form a network, one type of system.
  • A path uses a direct working connection for each hop. Routing finds how traffic moves toward a destination; Internet routes can change as conditions change.
  • Bandwidth is maximum data per time, usually bits per second. Eight bits make a byte. Ideal transfer time is bit count divided by achieved bit rate; actual time can include overhead and delay.
  • A path’s slowest link constrains sustained transfer. Increasing a faster link alone leaves that bottleneck intact. Capacity is distinct from latency and from achieved throughput.

Internet delivery and the Web

  • The Internet connects networks using open standardized protocols. Shared rules allow different implementations to interoperate and support growth; they do not require matching applications or publicly readable private messages.
  • IP supports addressing and routing. Packets carry data chunks plus metadata for forwarding and, where provided, reassembly. Arrival order, successful arrival and routes are not guaranteed by IP alone.
  • TCP supplies reliable ordered stream delivery with recovery mechanisms. UDP does not build in delivery or ordering guarantees; timely updates may favor it when missing old data is acceptable.
  • The World Wide Web links pages, programs and files using the Internet. HTTP governs Web requests and responses. Other Internet applications need not be Web services.

Failure and redundancy

  • Fault tolerance preserves a required function despite some component failures. Redundant connections or devices can supply a surviving route without repairing the failed component.
  • For a link failure, remove that link. For a device failure, remove that device and all incident links. Trace an entire surviving sender-to-receiver path.
  • Two routes can share a single point of failure. Shared power, physical cable routes or a common gateway can disable both branches together.
  • Useful redundancy costs equipment, links, power and maintenance. More dependable paths help networks serve growing demand, but do not guarantee access through every failure or double every message.

Schedule and compare computation

  • Sequential time is the sum of required stages. Parallelism overlaps independent work while respecting dependencies. With one worker per branch, the phase lasts as long as the longest branch.
  • With limited processors, place indivisible tasks in lanes and use the largest lane total. Then add serial preparation and finalization. Total work divided by processor count is only a lower bound when tasks cannot be split.
  • Speedup equals sequential elapsed time divided by parallel elapsed time for the same job. Include required sending, waiting and combination costs. It is a ratio, not seconds saved.
  • Added processors shorten suitable independent work but retain the sequential portion. Distribution uses multiple devices and can also be parallel; supported partitions can share processing and storage demands across machines.

Sign in