Studybook navigation
Operating Systems & Networks · all-in-one exam book · rebuilt 25 Jul 2026

Show the route.
Collect the marks.

One self-contained route from first principles to exam-speed answers: intuitive developer-level teaching, every supplied exercise page beside its solution, the full historical paper, and exact one-page-aid wording.

Monday · 27 Jul 202690 points · 45 OS + 45 Networks90 min reported1 × single-sided DIN A4Casio fx-991CW UK
Canonical companion: cheatsheet.html is now the complete one-sided A4 aid. Every memory line in the lessons feeds that page.
Start here · evidence changed on 22 July

Your exam desk

There is now one historical paper and a direct instructor reply. Together they remove the main uncertainty: every WT25/26 lecture topic is in scope, and the answer must expose enough method and intermediate working for the marker to follow it.

Current structure: 45 points Operating Systems + 45 points Networks. The SS23 booklet is joint, but its Q1–Q4 and Q5–Q8 totals already split exactly 45/45. Treat one point as roughly one minute, then recover time on short definitions for a final check.

Confirmed now

  • Exam date: Monday, 27 July 2026; Databases is Friday, 24 July.
  • All content taught in WT25/26 lectures is examinable.
  • No retake-specific change in content or importance.
  • Show the route to every answer; omit only obvious steps.
  • Current allowance: one single-sided DIN A4 notes page and the fx-991CW UK.

Evidence boundary

  • One historical exam: SS23, 16 pages, 90 min, 90 points.
  • No official solution key; worked answers below are independently generated.
  • The current 90-minute duration is supported by user report and the historical cover, not a supplied 2026 cover.
  • The old cover has a blank supplies field; the current user-confirmed aid rule overrides it.
🔴 Exam-coreEvidence: instructor reply dated 21 Jul 2026; exam-SS23.pdf cover p.1 and Q1–Q8 pp.2–16; current 45/45 split confirmed by the user.

Dated instructor briefing · 21 July 2026

QuestionVerdictWhat it changes tonight
Shell scripting?INQ2 is a 14-point historical archetype; practise permissions, redirection, sed, and literal code output.
TCP, DNS, DHCP?INTCP is directly tested in Q8. DNS/FQDN appears in Q5. DHCP is absent from SS23 but remains taught-and-in-scope.
Any content removed?NONE OUTUse ◇ only as “drop first if time collapses,” never as “not examinable.”
How much working?METHOD VISIBLEName rule → show state/substitution → intermediate → boxed result + unit/check.
Instructor guidance on scope and working

Exact priority order when OSN study starts

  1. Q8 · routing/subnet/TCP
    Lesson 9–10 + historical solution
    15 pt
  2. Q2 · Linux/permissions/shell
    Lesson 3 + literal source-defect handling
    14 pt
  3. Q1 · OS concepts
    Lesson 1 + compact definitions
    13 pt
  4. Q6 · delay/throughput
    Lesson 6 + units/checks
    12 pt
  5. Q4 then Q5 · RR and topology/models10 + 10
  6. Q3 then Q7 · memory and OSI/flow8 + 8
Exactly one route · Sunday 26 July + exam morning

The 48-hour battle plan

The calendar is tighter than the older version of this book implied. From waking on Sunday to the Monday exam, protect the recurring 90-point paper first. Every block ends with something written on blank paper; reading alone does not complete a block.

Time rule: the historical paper gives 90 points in 90 minutes, so one point is a one-minute ceiling. A 1-point item should be immediate; a 4-point item gets roughly four minutes including reading; a 15-point question is a collection of timed subparts, not permission to write an essay.
BlockMust do on paperDo if time remainsSafe to skip first
Sun 08:30–11:15
Routing first · 15 pt
Lessons 9–10, then SS23 Q8 closed-book. Produce a routing table, two longest-prefix decisions, one subnet calculation, UDP/TCP comparison, and SYN bit position.Sheet 13 VLSM and the TCP-window micro-example.Detailed IPv6 history and rare application record types.
Sun 11:35–13:55
Linux · 14 pt
Lesson 3, then SS23 Q2 in 14 minutes. For every permission result write the chosen user/group/other triad and the decisive directory right.Run the Sheet 08 shell trace by hand.Editor/package-manager lab mechanics.
Sun 14:40–17:05
OS foundations · 23 pt
Lessons 1–2, SS23 Q1 and Q4. Draw the process-state model and reproduce the full RR queue trace with the boundary convention.Sheet 04 Task 2 and one interrupt/system-call trace.VM installation and OS-generation history.
Sun 17:25–19:10
Memory · 8 pt
Lesson 5, SS23 Q3, then one FIFO/LRU table. Show every hole/frame update, not only the final count.Cache EAT and hexadecimal address translation.Detailed Linux replacement implementation.
Sun 19:50–22:30
Networks · 30 pt
Lessons 6–8, then SS23 Q5–Q7. Draw the torus, compute RTT/throughput with units, and write OSI 7→1 from memory.Fat-tree metrics and the line-code drawing.Network history, market research, and physical media catalogues.
Sun 22:40–23:15
Aid lock
Copy/print the canonical one-page aid. Point at every ★ item and name the matching drill. Add nothing new after this block.Rewrite one line that you cannot decode instantly.Cosmetic reformatting.
Mon exam morning
60–75 min
Closed-book recall only: RR, first fit/aging, four delays, RTT/throughput, torus metrics, OSI, /21 hosts, LPM, TCP SYN/ACK. Then read the aid once and stop.One 4-minute permission mini-trace.Slides, new exercises, and long explanations.
1 point · 30–60 sOne precise label, value, or definition clause. No preamble.
2–3 points · 2–3 minDefinition + mechanism/example, or formula + substitution + unit.
4–5 points · 4–5 minName method, expose the trace/calculation, box result, one check.
8–15 pointsBudget each printed subpart separately; leave a visible route for partial credit.
01
Operating systems · recognition + short explanation

Architecture, privilege, processes

Anchor every OS answer in the same causal chain: hardware is scarce and privileged; the OS provides abstractions and controlled access; processes are programs in execution whose state changes on scheduling and events.

🔴 Exam-coreEvidence: exam-SS23 Q1, 13 points (appears in 1 of 1 past exams); Introduction pp.59–60 and Sheets 01–03 corroborate the same concepts.
Build the mental model first

The OS is a trusted runtime between apps and hardware

As a full-stack developer, imagine the machine as a server whose database is CPU time, memory, devices, and files. Applications are untrusted tenants. The operating system is both the API that gives them useful abstractions and the control plane that stops one tenant from corrupting another.

Analogy that holds: a system call is like entering a trusted backend through a validated endpoint. User code supplies arguments; the kernel checks identity, permissions, addresses, and device state; then privileged code performs the operation. Where it stops: the kernel is not a separate network service—control transfers on the same CPU, and the hardware changes privilege mode.

Program, process, thread: do not merge them

A program is passive code and data in a file. A process is one execution instance with an address space, open-file table, credentials, registers, program counter, and scheduling state. A thread is one execution path inside a process: threads normally share the process address space and files but have their own registers, program counter, and stack.

This distinction explains the process-state diagram. Ready means it has everything except a CPU. Running means a CPU currently executes one of its threads. Blocked means scheduling it would be pointless because it awaits an event such as I/O completion. The event moves it to ready; the scheduler—not the device—later moves it to running.

Three transfers that exam questions deliberately confuse

System call

Synchronous and requested by the running program: read, open, fork. User mode → kernel mode → usually back to the same process.

Interrupt

Asynchronous to the current instruction stream: a timer or device signals the CPU. The kernel saves a minimal context and runs a handler.

Exception/fault

Synchronous because the current instruction caused it: divide by zero, invalid opcode, page fault. It may be recoverable or terminate the process.

A mode switch changes privilege level. A context switch changes the executing thread/process and therefore saves/restores registers and scheduler state. A system call can perform only a mode switch; it becomes a context switch if the caller blocks or the scheduler chooses someone else.

Architecture in one causal chain

Von Neumann hardware stores instructions and data behind a shared path. That shared path is the bottleneck. Harvard-style separation permits an instruction fetch and a data access concurrently; modern CPUs commonly present one programmer-visible address space while splitting instruction/data caches close to the core. The memory hierarchy exists because small fast storage is expensive: registers → caches → RAM → SSD/HDD. A miss moves the request down the hierarchy and adds latency.

Time-sharing combines multiprogramming with preemption: a timer interrupt periodically gives the kernel control so it can rotate among ready processes. To a programmer this creates responsive, apparently concurrent processes and prevents a CPU-bound loop from owning the machine forever.

Recognize the requested answer“benefit to programmer” → apparent concurrency, responsiveness, isolation.“user vs kernel space” → privilege + protected addresses + controlled entry.“execution context” → name concrete saved state: PC, registers, stack pointer, address-space/page-table reference, open files, credentials.
Memorize exactly: process = program in execution + resources/state. Preemption = OS can interrupt a running process and return it to ready. User mode cannot execute privileged instructions; system calls enter validated kernel handlers.

Von Neumann vs Harvard

Von Neumann bottleneck: instructions and data share one memory path, so CPU progress is limited by transfers over that path. Harvard: separate instruction and data stores/buses permit concurrent access; modern CPUs often expose a unified address space but split L1 instruction/data caches.

Privilege path

An application runs in user mode. A system call, fault, or interrupt transfers control to a kernel handler. The kernel validates the request, touches protected hardware/state, then returns. A mode switch is not automatically a process switch.

createdreadyrunningterminatedblockedadmitdispatchpreempt / quantumexitwait for eventevent occurs
Five-state process model. Fast hand version: draw the ready↔running pair first, then attach created, terminated, and blocked.
Draw it in 25 seconds: five ovals; arrows created→ready→running→terminated; running→ready for preemption; running→blocked for I/O wait; blocked→ready when the event completes.
Read the original task, then cover the answer
Sheet 01 setup and architecture prompt from Exercises/sheet01.pdf page 1
Original source · Exercises/sheet01.pdf, p. 1. · Sheet 01 setup and architecture prompt.
Sheet 02 architecture and timing tasks from Exercises/sheet02.pdf page 1
Original source · Exercises/sheet02.pdf, p. 1. · Sheet 02 architecture and timing tasks.
Sheet 02 fill-in concepts from Exercises/sheet02.pdf page 2
Original source · Exercises/sheet02.pdf, p. 2. · Sheet 02 fill-in concepts.
Sheet 02 concept selections from Exercises/sheet02.pdf page 3
Original source · Exercises/sheet02.pdf, p. 3. · Sheet 02 concept selections.
Sheets 01–02 · Architecture and conceptsrehearsal target · 3–5 min

S1 T1 (lab setup): obtain the Ubuntu 24.04 LTS image matching the host CPU, create a VirtualBox 7.1 VM, allocate 2 virtual CPUs, 4 GB RAM and at least 25 GB storage, attach the ISO, install Ubuntu, eject the ISO and reboot. Verify with uname -m and lsb_release -a. Exact limitation: the architecture-specific guide and download target referenced in Sheet 01’s misc directory were not supplied in this course folder, so their screenshots and prescribed defaults cannot be reproduced responsibly.

S1/S2 T1: The Von Neumann bottleneck is contention for the shared instruction/data path. Harvard architecture separates those paths, so an instruction fetch and data access can occur concurrently.

S2 T2: fCPU = 5.7 GHz. T = 1/fTCPU = 0.175 ns. DDR5-5600 has a 2.8 GHz base clock; worst-case row change uses tRP+tRCD+CL = 38+38+36 = 112 cycles, so TRAM = 112/2.8 GHz = 40.0 ns. Register operation ≈ 228× faster.

S2 T3: time-sharing; multiprogramming; time-sharing; multiprogramming; time-sharing.

S2 T4: 1 b,d · 2 b · 3 a,c · 4 d · 5 c · 6 a,b,d · 7 True · 8 a,c · 9 c,d · 10 a,c,d.

The VM task is installation practice, not a paper calculation; the verification commands are the evidence that the intended OS and architecture are running. The RAM question assumes a row miss, so it pays precharge + row activation + column latency. If the row is already open, state that only CL applies. In Q10, the sheet uses “context switch” loosely: file, socket, and process-creation requests certainly enter the kernel; a full switch to a different process depends on blocking/scheduling.

VM: record host architecture → select matching image → configure → install → verify. Calculation: fx-991CW Calculate app → enter 1 ÷ (5.7 × 10^9), then (38+38+36) ÷ (2.8 × 10^9); convert seconds to ns by ×10⁹. On paper, write the frequency and the three RAM latency terms.
Tcycle=1/f; DDR base clock=data rate/2; row miss≈(tRP+tRCD+CL)/fRAM.
Read the original task, then cover the answer
Sheet 03 process-state diagram from Exercises/sheet03.pdf page 1
Original source · Exercises/sheet03.pdf, p. 1. · Sheet 03 process-state diagram.
Sheet 03 command and environment tasks from Exercises/sheet03.pdf page 2
Original source · Exercises/sheet03.pdf, p. 2. · Sheet 03 command and environment tasks.
Sheet 03 curl and pipeline tasks from Exercises/sheet03.pdf page 3
Original source · Exercises/sheet03.pdf, p. 3. · Sheet 03 curl and pipeline tasks.
Sheet 03 · Task 1 process model + Tasks 2–5 shellrehearsal target · 5–8 min

T1 labels: (1) created, (2) admitted, (3) ready, (4) scheduler dispatch, (5) running, (6) exit, (7) terminated, (8) preemption/interrupt, (9) event completion, (10) wait for event, (11) blocked.

T2: date -d 'next Monday' '+Die Deadline ist am %d.%m.%Y %H:%M:%S Uhr.'

T3: echo "$USER"; echo "$HOSTNAME"; export STUDENT_ID=12345678; echo "Hello! I am $USER working on $HOSTNAME with ID $STUDENT_ID."

T4 expected in the supplied scenario: th-deg.de → 0 (success); deg-th.de → 6 (host cannot be resolved); curl -z → 2 (malformed/missing option argument). Network-dependent results must be reported as actually observed.

T5: curl -sL URL | grep -o 'Frankenstein' | wc -l29 occurrences when independently checked on 21 Jul 2026. Plain grep counts matching lines, not multiple occurrences per line.

$? must be read immediately after each command. Quoting prevents word splitting. grep -o emits one match per line, making wc -l an occurrence count.

These are mechanical traces, not calculator tasks. In the exam write command → expected output/exit code → one-line interpretation.
process: created→ready⇄running→terminated; running→blocked→ready. exit 0=success, non-zero=error; pipeline connects stdout→stdin.
Chapter completeness · Introduction pp. 59–60

The architecture material that SS23 did not sample

The historical paper samples architecture, privilege and timesharing, but the current instructor explicitly keeps the whole lecture in scope. These compact drills close the remaining Introduction competencies.

🟠 Exam-practicalEvidence: 01-Introduction.pdf summary pp.59–60 explicitly requires the instruction cycle, memory trade-offs, OS-history concepts, hypervisor types, system-call execution, interrupts and VM setup; all remain IN under the 21 Jul instructor reply.
Lecture competency drill · instruction cycle, memory hierarchy, hypervisors and OS evolutionrehearsal target · 3–5 min

Instruction cycle: fetch instruction → decode → fetch operands → execute → write result/update PC. Registers/cache are small, fast and expensive per bit; RAM is larger/slower; secondary storage is much larger, persistent and slower.

Hypervisors: type 1 runs directly on hardware; type 2 runs as an application on a host OS. A VM guest sees virtual CPU, memory, storage and devices.

Evolution: batch groups jobs; spooling queues slow card/printer I/O on disk; multiprogramming switches while a job waits for I/O; timesharing adds short preemptive quanta for interactive users.

For a cycle question, name every state transition rather than writing “the CPU runs it.” For comparisons, use the axes latency, capacity, persistence and cost per bit. History questions score for the problem each mechanism solved, not dates alone.

Draw a five-box cycle and one arrow between each box. For a hypervisor sketch, put hardware at the bottom: type 1 has hypervisor immediately above it; type 2 has host OS below the hypervisor application.
instruction: fetch→decode→operands→execute→write/PC. Near CPU=faster/smaller/costlier; storage=large+persistent. Type1 hypervisor on hardware; Type2 on host OS. batch→spool disk I/O→multiprogram I/O waits→timeshare quanta.
Lecture competency drill · system-call and interrupt tracesrehearsal target · 3–5 min

System call: user code calls a library wrapper → places call number/arguments → trap switches to kernel mode → dispatcher validates and executes the service → result/error is returned → privileged state is restored.

Interrupt: device/timer raises a signal → CPU saves minimal context and vectors to a handler → urgent top-half work acknowledges the source → deferred bottom-half work completes later → the kernel restores or schedules a context.

A mode switch changes privilege. A context switch changes the running process; one does not imply the other.

A system call is synchronous from the requesting process; a hardware interrupt is asynchronous. Both enter kernel mode, but their trigger and return path differ.

Write trigger | saved state | kernel work | return. On paper, label user/kernel boundary and state whether another process is selected.
syscall: wrapper+args→trap→kernel validate/dispatch→result→return. interrupt: signal→save→top half ACK→bottom half/defer→restore/schedule. mode switch ≠ process switch.
02
Operating systems · guaranteed paper trace

Scheduling without queue mistakes

Every scheduling problem is a queue simulation. The winning habit is to write remaining burst and ready queue at every event; the Gantt chart is only the visible result.

🔴 Exam-coreEvidence: exam-SS23 Q4, 10 points (appears in 1 of 1 past exams); Processes p.45 and Sheet 04 repeat full by-hand traces.
Think like an event-loop debugger

Scheduling is a deterministic simulation, not a picture-guessing task

The scheduler sees a stream of events: a process arrives, a CPU burst finishes, a quantum expires, or a process blocks/unblocks. Its state is the current time, the running process, every remaining burst, and the ready queue. The Gantt chart is merely a log produced from those state transitions.

Developer analogy: Round Robin is a work queue with a per-job time budget. FCFS is a single worker draining each job completely. SPN is a priority queue ordered by estimated job size. The analogy fails if you forget arrivals: the scheduler cannot select a job that has not entered the ready queue.

The paper algorithm that prevents almost every error

  1. Write time | running | ready queue | remaining.
  2. If the queue is empty, jump time to the next arrival and enqueue it.
  3. Choose by the algorithm. Run only until the next event the algorithm cares about.
  4. Subtract executed time. Add all arrivals at the event timestamp.
  5. For RR, requeue the unfinished process after same-time arrivals under the course convention.
  6. Copy the interval to the Gantt chart; repeat until every remaining burst is zero.

FCFS is non-preemptive and preserves arrival order. It is simple but a long job can create a convoy. SPN/SJF chooses the shortest burst among processes already ready and then runs it to completion; it minimizes average waiting time when burst estimates are known, but a long job can wait behind repeated short arrivals. RR limits each visit to quantum q; small q improves responsiveness but increases context-switch overhead.

Metrics, if asked
turnaround = completion − arrival
waiting = turnaround − CPU burst
response = first run − arrival

Average only after calculating each process. Do not confuse waiting with turnaround.

How variants change the trace

For SRTN, a new arrival can preempt if its remaining time is shorter. For priority scheduling, first state whether a larger or smaller number means higher priority and whether equal priorities use FCFS or RR. For CFS, the conceptual rule is “run the eligible task with the smallest virtual runtime,” not “fixed quantum round robin.”

Selection cues“time slice / quantum” → RR.“shortest process next, no interruption” → SPN.“shortest remaining” → SRTN and reconsider at arrivals.“fair / responsive” → discuss RR trade-off and overhead.
Memorize exactly: RR event order = run min(q, remaining) → enqueue arrivals → if unfinished append running process. State the boundary convention once.

FCFS

Non-preemptive. Choose earliest arrival; run to completion. Easy but convoy-prone.

RR(q)

Run head for min(q, remaining); enqueue arrivals; if unfinished, append it. Fair; more context switches.

SPN

Non-preemptive. At completion choose the ready process with smallest full burst. Do not choose a process that has not arrived.

Sheet 04 · Task 1 schedulesFCFSABCD012345678910111213141516171819202122RR q=2ABCADBCADCDC012345678910111213141516171819202122SPNABDC012345678910111213141516171819202122
Verified event-by-event. In RR, arrivals at a quantum boundary enter the queue before the just-preempted process; state a different convention if your lecturer specifies one.
Read the original task, then cover the answer
Instructor scheduling trace template from Exercises/sheet04-scheduling_template.pdf page 1
Original source · Exercises/sheet04-scheduling_template.pdf, p. 1. · Instructor scheduling trace template.
Sheet 04 Task 1 scheduling table from Exercises/sheet04.pdf page 1
Original source · Exercises/sheet04.pdf, p. 1. · Sheet 04 Task 1 scheduling table.
Sheet 04 · Task 1 schedulesrehearsal target · 8–10 min

a FCFS: A 0–5 | B 5–8 | C 8–16 | D 16–22.

b RR, q=2: A 0–2 | B 2–4 | C 4–6 | A 6–8 | D 8–10 | B 10–11 | C 11–13 | A 13–14 | D 14–16 | C 16–18 | D 18–20 | C 20–22.

c SPN: A 0–5 | B 5–8 | D 8–14 | C 14–22.

At t=5 SPN sees B(3), C(8), D(6), so B wins; at t=8 D(6) beats C(8). For RR, write queue snapshots: t2 [B,C,A], t4 [C,A,D,B], t6 [A,D,B,C]. Typical marks: algorithm choice, each boundary, final completion.

Trace columns: time | running | ready queue | remaining. Update arrivals before requeueing a process at the same timestamp; box the convention.
FCFS: earliest arrival, nonpreemptive. SPN: shortest READY burst, nonpreemptive. RR: run min(q,rem), arrivals→queue, unfinished→tail.
Read the original task, then cover the answer
Sheet 04 Task 2 scheduling table from Exercises/sheet04.pdf page 2
Original source · Exercises/sheet04.pdf, p. 2. · Sheet 04 Task 2 scheduling table.
Sheet 04 · Task 2 schedulesrehearsal target · 8–10 min

a FCFS: A 0–5 | B 5–9 | C 9–12.

b RR, q=2: A 0–2 | B 2–4 | A 4–6 | C 6–8 | B 8–10 | A 10–11 | C 11–12.

c SPN: A 0–5 | C 5–8 | B 8–12.

d Lecture priority model: larger number = higher priority; preempt only when a higher level appears; RR within a level. A 0–4 | C 4–6 | A 6–7 | C 7–8 | B 8–12.

The lecture’s Priority illustration labels Priority 4 highest and uses round robin only among processes at the same level. At t=4, C joins A at priority 3; giving the newcomer the next slice matches the lecture’s shown same-level behavior. Explicitly write this convention because the sheet itself does not restate it.

Before priority tracing, write larger number = higher and RR within equal level. That protects the answer from an otherwise ambiguous convention.
Lecture priority: larger value=higher; higher level preempts; equal level uses RR.
Chapter completeness · Processes pp. 44–45

IPC, synchronization and the remaining schedulers

🟠 Exam-practicalEvidence: 03-Processes.pdf summary pp.44–45 explicitly requires process creation/termination, IPC comparison, synchronization, resource hazards and scheduler comparison; Sheet 04 exercises only a subset.
Lecture competency drill · process lifetime, IPC and synchronizationrehearsal target · 3–5 min

Create: system initialization, a running process creating another process, a user request, or a batch job. Terminate: normal exit, voluntary error exit, fatal exception, or external kill.

IPC: a signal is a small asynchronous event; a pipe is a one-way byte stream with shell composition; shared memory is fastest locally but needs synchronization; a socket is a bidirectional endpoint usable locally or over a network.

A race occurs when the result depends on interleaving. Protect the critical section with a mutex/semaphore and state the invariant, for example “at most one writer changes the shared counter.”

Choose IPC by payload size, direction, locality and synchronization needs. Shared memory does not itself prevent races; its speed comes from avoiding copies, so coordination is the programmer’s responsibility.

For an IPC comparison draw method | direction | local/remote | payload | synchronization. For a race trace, show the read–modify–write steps of both processes and the broken invariant.
create=boot/fork/user/job; end=normal/error/fatal/killed. IPC: signal event; pipe 1-way stream; shared memory fast+needs sync; socket local/remote endpoint. race→critical section→mutex/semaphore; state invariant.
Lecture competency drill · SRTN, starvation and CFSrehearsal target · 3–5 min

SRTN: whenever a process arrives or finishes, run the ready process with the smallest remaining time; preempt the current one if the newcomer is shorter. Priority: run the highest level; aging can raise waiting processes to prevent starvation. CFS idea: approximate fair CPU sharing by choosing the runnable task with the smallest weighted virtual runtime.

SPN is non-preemptive and compares original/remaining bursts only at completion; SRTN is preemptive and reconsiders at each arrival. CFS is a lecture concept, not a hand-trace algorithm unless the question supplies virtual runtimes and weights.

Use the same trace as RR: time | running | ready(rem) | event. At every arrival, compare the newcomer’s remaining time with the runner’s remaining time.
SRTN: at arrival/completion choose min remaining; preempt if newcomer shorter. priority starvation→aging. CFS chooses smallest weighted virtual runtime. SPN nonpreemptive ≠ SRTN preemptive.
03
Operating systems · commands + permission reasoning

Shell, files, paths, permissions

Read permissions as a decision tree, not a string to memorize: identify owner/group/other, then remember that directory read lists names, write changes entries, and execute traverses.

🔴 Exam-coreEvidence: exam-SS23 Q2, 14 points (appears in 1 of 1 past exams); File-System pp.64–66 and Sheets 03/05/08 corroborate commands, permissions and shell output.
One namespace, two separate permission problems

Linux files make sense when you separate names, objects, and open handles

A directory is not the file object; it is a mapping from a name to an inode number. The inode stores object metadata and block pointers. A path is a sequence of directory lookups. After open(), the process receives a file descriptor: a small integer indexing its table of open handles. That is why deleting or renaming a pathname does not magically invalidate every already-open descriptor.

Developer analogy: pathname resolution resembles routing through nested maps; the inode is the object ID, and a descriptor is a process-local handle. “Everything is a file” means many kernel objects expose a common descriptor/read/write/poll interface—not that every object is stored as ordinary disk bytes.

Permission checks are a decision tree

  1. Identify the acting user and supplementary groups.
  2. Select exactly one triad: owner if UID matches; otherwise group if any owning group matches; otherwise other. Linux does not combine triads.
  3. For every parent directory in a path, require x to traverse it.
  4. For the final operation, check the right on the relevant object: file content rights for reading/writing a file; directory w+x for creating, deleting, or renaming entries.
Directory r

List entry names. It does not by itself let you access an entry.

Directory w

Modify the directory’s name→inode mapping; normally useful only together with x.

Directory x

Traverse/search by a known name. Required on every path component.

This yields the famous deletion result: deleting dir/file is primarily permission on dir, because deletion removes a directory entry. Conversely, writing the file contents depends on the file’s write bit. The sticky bit can add an ownership restriction in shared directories.

The shell performs a parse-and-wire phase before commands run

For sudo echo hi > protected, the current shell opens protected before launching sudo. Therefore sudo elevates echo, not the redirection. Use echo hi | sudo tee protected when the privileged process must open the file. A pipeline connects stdout of the left command to stdin of the right; each stage has its own exit status, and $? is only the status of the most recently completed command.

Expansion order matters in traces: parse operators → expand variables/quotes/globs → set up redirections and pipes → execute. Single quotes preserve text literally; double quotes allow variables but prevent word splitting and glob expansion of the resulting value.

Hard links and symbolic links

A hard link is another directory entry for the same inode; it normally cannot cross filesystems and survives deletion of another name. A symlink is a distinct inode containing a pathname; it can cross filesystems but can dangle. The object is reclaimed only when its hard-link count is zero and no process still has it open.

Fast theory-answer cuesabsolute vs relative → starts at root / vs current directory.command succeeds? → actor → chosen triad → each parent x → final-object/directory right.predict shell output → parse/expand/redirection first, then trace branch/loop/function.
Memorize exactly: create/delete/rename needs parent directory w+x; traverse needs x; shell redirection happens before sudo; sed 's/old/new/g' file replaces every occurrence on each line.
File vocabulary
file = named data container; path = route through directories; filesystem = on-disk organization; VFS = unified tree over mounted filesystems; root = /; buffer = temporary transfer memory.
r=4 · w=2 · x=1
directory: r=list · w=create/delete/rename · x=traverse
Read the original task, then cover the answer
Sheet 05 definitions and path classification from Exercises/sheet05.pdf page 1
Original source · Exercises/sheet05.pdf, p. 1. · Sheet 05 definitions and path classification.
Sheet 05 · Tasks 1–2 definitions and pathsrehearsal target · 5–8 min

T1: 1 file · 2 name and inode · 3 directories · 4 virtual file system · 5 root directory · 6 forward slash · 7 file system · 8 open() · 9 read() · 10 buffer · 11 mkdir() · 12 readdir().

T2: 1 absolute · 2 relative · 3 relative · 4 absolute · 5 relative.

Absolute paths begin with /. .. and . do not make a path absolute. A filename maps to an inode through its directory entry; the inode holds metadata and block pointers.

Underline the first character of every path. “/” → absolute; everything else → relative to the process working directory.
absolute starts /; directory entry:name→inode; inode=metadata+block pointers; open/read/mkdir/readdir.
Read the original task, then cover the answer
Sheet 05 permission scenario and commands from Exercises/sheet05.pdf page 2
Original source · Exercises/sheet05.pdf, p. 2. · Sheet 05 permission scenario and commands.
Sheet 05 · Task 3 permission decisionsrehearsal target · 5–7 min
CommandResultDecisive check
mkdir dir1/d3failalice is in group osn, but dir1 group has r-x, no w.
mkdir dir2/d3successdir2 group has rwx.
mkfile dir2/f3.txtfailmkfile is not a standard Ubuntu command.
touch dir2/f3.txtsuccessw+x on dir2 permits creation.
touch /dir2/f3.txtfailabsolute /dir2 is not the shown directory.
cat /tmp/mock/f1.shsuccessalice owns f1.sh and has r.
cat f1.shsuccesssame inode via current directory.
echo exam > f2.txtfailalice matches group alice, which has r--, no w.
sudo echo exam > f2.txtfailthe current shell opens the redirection before sudo runs echo.

Choose exactly one permission triad: owner first, otherwise a matching group, otherwise others. You do not combine triads. For path operations, every parent needs x; creating/removing an entry needs w+x on the parent directory.

Write identity → matching triad → target permission → parent directories. For redirection, evaluate who opens the file: the shell.
choose ONE triad u/g/o; dir x=traverse, w+x=create/delete; sudo cmd >file: shell redirection is not sudo.
Read the original task, then cover the answer
Sheet 05 editor task from Exercises/sheet05.pdf page 3
Original source · Exercises/sheet05.pdf, p. 3. · Sheet 05 editor task.
Collaborative project permission setup from Exercises/sheet05-collab-proj-env_class-ex.pdf page 1
Original source · Exercises/sheet05-collab-proj-env_class-ex.pdf, p. 1. · Collaborative project permission setup.
Collaborative project command sequence from Exercises/sheet05-collab-proj-env_class-ex.pdf page 2
Original source · Exercises/sheet05-collab-proj-env_class-ex.pdf, p. 2. · Collaborative project command sequence.
Sheet 05 · Tasks 4–5 + collaborative projectrehearsal target · 5–8 min

Packages: sudo apt update; sudo apt install vim htop; htop. update refreshes metadata, upgrade updates installed packages, install adds named packages.

Editors: Vim: vim lincoln-vim.txt → press i → type the two lines → Esc:wq → Enter. Nano: nano lincoln-nano.txt → type → Ctrl+O → Enter → Ctrl+X. Without an editor: printf '%s ' 'Four score and seven years ago' 'our fathers brought forth on this continent, a new nation' > lincoln.txt.

Project T1–5: mkdir -p ~/project/{personal,shared,releases,documentation}; cd ~/project; chmod 700 personal; chgrp "$GROUP" shared releases documentation; chmod 2770 shared documentation; chmod 2750 releases. The leading 2 sets setgid so new entries inherit the team group.

Project T6–10: printf 'private note ' > personal/notes.txt; printf -- '- task 1 - task 2 - task 3 ' > shared/team-tasks.md; printf 'Release 1.0 ' > releases/v1.0-readme.txt; ls -la personal shared releases documentation; then, after replacing TEAMMATE, printf ' - comment by %s ' "$USER" >> /home/TEAMMATE/project/shared/team-tasks.md. The last command succeeds only when both students share the assigned group and every parent directory is traversable.

Private 700 = rwx------. Shared 2770 = setgid+rwxrwx---. Releases 2750 = setgid+rwxr-x---. The SSH commands supplied are ssh user@osn01.cloudlab.th-deg.de, id, and getent group GROUP. If the teammate path differs, discover it instead of guessing.

No calculator. Translate each English requirement into owner/group/other, sum 4+2+1, run the matching command, then verify the target and its parent with ls -ld/ls -la.
chmod: r4 w2 x1; shared dirs often 2770 (setgid, rwxrwx---); apt update≠upgrade≠install.
Read the original task, then cover the answer
Shell-script Tasks 1–2 from Exercises/sheet08-shell-script.pdf page 1
Original source · Exercises/sheet08-shell-script.pdf, p. 1. · Shell-script Tasks 1–2.
Shell-script Task 3 from Exercises/sheet08-shell-script.pdf page 2
Original source · Exercises/sheet08-shell-script.pdf, p. 2. · Shell-script Task 3.
Shell-script Task 4 from Exercises/sheet08-shell-script.pdf page 3
Original source · Exercises/sheet08-shell-script.pdf, p. 3. · Shell-script Task 4.
Sheet 08 shell-script worksheet · Tasks 1–4rehearsal target · 5–8 min
#!/bin/bash
categorize() {
  local n="$1" category
  if (( n <= 10000 )); then category=Small
  elif (( n <= 20000 )); then category=Medium
  else category=Large
  fi
  printf '%s: %s
' "$category" "$n"
  logger -p user.info "random=$n category=$category"
}

sum=0
for i in {1..10}; do
  n=$RANDOM; categorize "$n"; (( sum += n ))
done
printf 'sum=%s
' "$sum"

# while-loop equivalent
i=1; sum=0
while (( i <= 10 )); do
  n=$RANDOM; categorize "$n"; (( sum += n )); (( i++ ))
done
printf 'sum=%s
' "$sum"

Then chmod +x script.sh, ./script.sh, and check /var/log/syslog (or journalctl on systems without that file).

The function receives its random number in $1; quoting protects values; mutually exclusive bounds cover 0–32767 with no gap. Each loop generates, prints, logs, and accumulates exactly ten values.

Trace with four columns: i, n, category, running sum. Shell scripting is lower-yield than scheduling, memory, and IP; learn the skeleton, not trivia.
bash: quote "$1"; arithmetic ((...)); if/elif/else/fi; for i in {1..10}; do ...; done.
04
Operating systems · storage calculations + path mechanics

Filesystems, inodes, disks

Separate logical work from physical cost: a directory resolves names to inode numbers; an inode stores attributes and block pointers; the device then pays access latency and transfer time for the blocks.

🟠 Exam-practicalEvidence: absent from exam-SS23 but explicitly IN under the 21 Jul instructor briefing; File-System pp.64–66 and Sheet 06 make it a repeated paper-calculation topic.
Translate a pathname into storage work

A filesystem is an indexing structure plus a crash-consistency policy

Start with the logical question “which object does this pathname name?” The superblock provides filesystem-wide metadata and the root inode. Each directory block maps the next component name to an inode. The final inode supplies metadata and pointers to data blocks. Only then ask what the storage device pays to fetch those blocks.

Developer analogy: directories are indexes, inodes are records, and data blocks are the payload pages. A cold path lookup resembles several dependent index reads. Caches can remove physical reads, but an exam calculation that says “cold” normally charges every stated access.

Allocation strategies express the same trade-off as data structures

Contiguous

Fast sequential and random access; simple start+offset. Growth is awkward and external fragmentation appears.

Linked

Easy growth and no external fragmentation; following pointers makes random access slow and pointers cost space.

Indexed/inode

A separate index stores block pointers. Good random access and growth, paid for with index blocks and multi-level lookup.

Free-space bitmaps spend one bit per block and make runs searchable with word operations. A free list is simple but less convenient for finding a long contiguous run. Internal fragmentation is unused space inside allocated blocks; external fragmentation is free space split into separate gaps.

HDD and SSD formulas represent different physics

HDD time = Σ(seek + rotational delay) + bytes / transfer rate
SSD time = requests × request latency + bytes / transfer rate

Charge a new HDD seek/rotation only when the physical run changes under the problem’s model. Consecutive sectors in one run share the positioning cost. SSDs have no mechanical seek, but separate requests still pay controller/flash latency. Convert kB/MB consistently with the convention supplied by the exercise.

Journaling is not a backup

A journal records intended metadata or data changes before the main structures are committed. After a crash the filesystem replays or rolls back incomplete transactions to restore structural consistency. It does not guarantee that the newest user data survived, and it does not protect against deletion or device failure.

Recognition cues“owner of /a/b” → count dependent directory/inode reads.“how many blocks / waste” → ceiling division, then allocated minus actual bytes.“bitmap after operations” → track ownership, not only 0/1, so deletion clears the correct blocks.
Memorize exactly: directory entry = name→inode; inode = metadata + block pointers; superblock = filesystem-wide metadata/root. Blocks = ⌈size/block size⌉; waste = allocated − size.
HDD time = seeks + rotations + bytes/rate
SSD time = request latencies + bytes/rate
blocks = ⌈file size / block size⌉
Path walk
superblock → root inode → root directory data → next inode → next directory data … → target inode. Cache hits can remove physical reads; state the cold-cache assumption.
root inodemetadata + ptr/ directory“home” → inodehome inodedir block ptrhome directory“alice” → inode… → doc.txt inodeowner + block ptrsSuperblock gives the root inode location.Directory data stores names; the inode stores the owner, permissions, size, and data-block addresses.
Cold-cache path resolution. A filename is not stored “inside the file”; it is a directory entry pointing to an inode.
Read the original task, then cover the answer
Sheet 06 filesystem selections, first page from Exercises/sheet06.pdf page 1
Original source · Exercises/sheet06.pdf, p. 1. · Sheet 06 filesystem selections, first page.
Sheet 06 selections continued and storage timing from Exercises/sheet06.pdf page 2
Original source · Exercises/sheet06.pdf, p. 2. · Sheet 06 selections continued and storage timing.
Sheet 06 · Task 1 conceptual selectionsrehearsal target · 3–5 min

1 HDD: a,b,c,d · 2 NAND SSD: a,b,c · 3 inodes: a,b,d · 4 bitmap: a,d · 5 superblock: a,b,c,d · 6 journaling: a,c,d · 7 fragmentation: a,c,d · 8 absolute path: a,b,d.

Journaling improves recovery but cannot eliminate all data loss. SSDs have no seek delay, so external fragmentation is far less damaging. A bitmap’s word operations make contiguous free runs discoverable. The lecture states that the superblock contains the root inode’s block address and may be replicated.

For “select all,” falsify every statement with one precise counterexample. Never assume an option is true because its neighbors are.
journal=log-before-commit→recovery, not zero loss; bitmap=1 bit/block; inode=attrs+block ptrs; superblock=FS-wide metadata.
Read the original task, then cover the answer
Sheet 06 storage timing values from Exercises/sheet06.pdf page 2
Original source · Exercises/sheet06.pdf, p. 2. · Sheet 06 storage timing values.
Sheet 06 · Task 2 load the eight 4 kB blocksrehearsal target · 3–5 min

32 kB total; 3 physical runs (102/4, 204/0, 327/8).

a HDD: 3(9+4) ms + 32 kB/(130 MB/s) = 39 ms + 0.246 ms = 39.25 ms.

b SSD: 8(0.08 ms) + 32 kB/(7000 MB/s) = 0.640 + 0.00457 ms = 0.645 ms.

For the HDD, contiguous sectors within one CHS run do not repay seek/rotation; the first positioning and two moves create three positioning costs. The SSD wording charges latency “per read operation,” so eight block reads are used. If requests are coalesced, say so and charge three latencies instead. Marks: group physical runs, count bytes, show units.

Calculator: 3×(9+4)+32÷130 when kB/MB is converted consistently to ms as 32/130 ms; SSD 8×0.08+32/7000. Keep decimal storage units because the sheet uses MB/s.
storage: group contiguous runs; mechanical cost per positioning + total bytes/rate; SSD request count×latency + bytes/rate.
Read the original task, then cover the answer
Sheet 06 bitmap, inode, and relocation tasks from Exercises/sheet06.pdf page 3
Original source · Exercises/sheet06.pdf, p. 3. · Sheet 06 bitmap, inode, and relocation tasks.
Sheet 06 · Task 3 bitmap tracerehearsal target · 3–5 min
After actionBitmap (blocks 0…15)
A already present1111 1110 0000 0000
write B, 5 blocks1111 1111 1111 0000
delete A1000 0001 1111 0000
write C, 8 blocks1111 1111 1111 1100
delete B1111 1110 0000 1100

Index bits left-to-right. The allocator always scans from block 0; after A is removed, C reuses blocks 1–6 and then takes 12–13. Keep a small ownership row (root/A/B/C) below the bits to avoid deleting the wrong file.

Draw bit indices and an owner letter row. Allocation sets the first free bits; deletion clears only that file’s bits.
bitmap trace: number bits; keep owner row; allocate lowest 0s; delete only owner’s 1s.
Sheet 06 · Tasks 4–5 inodes and compactionrehearsal target · 5–8 min

T4a: cold cache, one block per inode/directory item: superblock + root inode + root dir + home inode + home dir + alice inode + alice dir + doc inode = 8 block reads (7 if superblock is already resident).

T4b: ⌈50 KiB / 4 KiB⌉ = 13 data blocks. T4c: 13×4−50 = 2 KiB = 2048 B wasted.

T5a: 2×[8 ms + 4 ms + 8 kB/(200 MB/s)] = 24.08 ms per file. T5b: half of 2 TB is 1 TB; 1 TB/8 kB = 125,000,000 files; ×24.08 ms = 3.01×10⁶ s = 34.8 days (decimal units).

The owner is inode metadata, so no data block of doc.txt is required. The compaction result is deliberately absurd: per-file mechanics make eager compaction impractical. State cold-cache and kB convention; those assumptions are part of a defensible answer.

fx-991CW: use the Calculate app and parentheses; for days divide milliseconds by 1000×60×60×24. On paper keep the read and write costs separate until the final line.
data blocks=ceil(size/block); waste=blocks×block−size; path owner needs target inode, not file data; eager disk compaction≈days.
Chapter completeness · File System pp. 64–66

Links, mounting and allocation choices

🟠 Exam-practicalEvidence: 04-File-System.pdf summary pp.64–66 requires hard/soft links, formatting/mounting, user/group administration, linked-list free space, LBA and file implementation; Sheets 05–06 corroborate the mechanics.
Lecture competency drill · links, mount points and allocation structuresrehearsal target · 3–5 min

Hard link: another directory entry for the same inode; normally cannot cross filesystems; content survives deletion of one name while a link remains. Symbolic link: a separate file containing a path; can cross filesystems and can dangle.

Format creates filesystem metadata on a device/partition. Mount attaches its root at a directory in the virtual directory tree. LBA gives the device a linear logical-block address independent of physical CHS details.

Data allocation: contiguous is fast but hard to grow and externally fragments; linked allocation grows easily but random access is slow; indexed allocation stores block pointers in an inode/index block and supports random access with pointer overhead.

Free space: a linked free list is simple but slow to search for runs; a bitmap costs one bit per block and supports word-wise run searches.

Do not confuse a name with a file: hard links share an inode; a symlink has its own inode and payload path. “Mounting a disk” does not copy files—it changes name resolution by grafting a filesystem into the tree.

For link questions draw name → inode → data. Give two names the same inode for hard links; give the symlink its own inode whose data is the target path. For allocation, compare sequential access, random access, growth and fragmentation.
hard link=same inode, same FS, survives one-name deletion; symlink=own inode+path, cross-FS, may dangle. format creates FS; mount grafts at dir. contiguous fast/growth-frag; linked grows/slow random; indexed random+pointer cost. free list vs bitmap 1bit/block; LBA linear block id.
05
Operating systems · highest calculation density

Caches, allocation, virtual memory

Three invariants carry this lesson: misses descend the hierarchy; a logical address must pass a bounds/permission/present check; and replacement algorithms differ only in which resident page they evict.

🔴 Exam-coreEvidence: exam-SS23 Q3, 8 points (appears in 1 of 1 past exams); Memory pp.45–46 and Sheets 07–08 add address translation and replacement traces.
Virtual memory is indirection with checks

Every memory question follows address → translation → residency → permission

A process behaves as if it owns a private contiguous address space. The MMU translates each virtual address to physical memory under rules installed by the kernel. That indirection gives isolation, relocation, sparse allocation, sharing, and the ability to keep only part of the address space in RAM.

Developer analogy: a virtual address is a stable logical key; a page table is the routing table from virtual pages to physical frames; the TLB is its cache. A page fault is not a TLB miss: it means the page-table state says the page is not resident or the access needs kernel intervention.

Address translation by hand

  1. From page size, determine offset bits. For 4 KiB, offset = 12 bits = last three hexadecimal digits.
  2. Split virtual address into virtual page number and offset.
  3. Index the page table; inspect present/valid and access permissions.
  4. If resident and permitted, replace the page number with the frame number and preserve the offset unchanged.
  5. If absent, report page fault; if prohibited, report protection fault. Do not invent a physical address.

Dynamic base/limit relocation is the simpler version: first require 0 ≤ VA < limit, then compute PA = base + VA. The limit is a size/bound, not the largest valid physical address.

Effective access time is a probability tree

Write mutually exclusive paths and make their probabilities sum to one. Conditional miss rates multiply: an L2 cost is paid only on an L1 miss; a memory cost only on all preceding misses. Every request pays the first lookup, which is why the nested form is safer than listing vague “hit times.”

EAT = t₁ + P(miss₁)[t₂ + P(miss₂)(t₃ + …)]

State whether each t is an added latency or a total path latency; never count the same lookup twice.

Replacement algorithms differ only in victim policy

On a hit, update policy state but do not replace a frame. On a fault with a free frame, fill it. Otherwise choose a victim: FIFO evicts oldest load; LRU evicts least recently used; OPT evicts the page used farthest in the future; NFU evicts the lowest accumulated reference count; aging right-shifts history and inserts the latest reference bit at the most significant position; clock gives referenced pages a second chance by clearing R=1 until it finds R=0.

OPT is a benchmark because it needs future knowledge. NFU can remember ancient popularity forever; aging fixes this by discounting old references. More frames do not guarantee fewer FIFO faults (Belady’s anomaly), while stack algorithms such as LRU and OPT do not show that anomaly.

Selection cues“oldest loaded” → FIFO.“not used for longest time” → LRU.“recent bits shifted” → aging.“best possible / future” → OPT benchmark.
Memorize exactly: TLB miss = page-table lookup; page fault = page not resident. Offset never changes during paging translation. Aging update: counter = (counter >> 1) with R inserted at MSB.
EAT = Σ P(path)·time(path)
VA = page·page_size + offset
PA = frame·page_size + offset
Fault order
1 bounds/page index → 2 present? no = page fault → 3 permission? no = protection fault → 4 substitute frame + unchanged offset.
0x1A00 with 4 KiB pagespage1offset0xA00page table[1]frame 12 · P · RWphysical address0xCA00Hex shortcut: the last three hex digits are the 12-bit offset. The preceding digit(s) are the virtual page.frame 0xC concatenated with offset 0xA00 → 0xCA00.
Translation preserves the offset. With 4 KiB pages, 12 offset bits equal exactly three hexadecimal digits.
Read the original task, then cover the answer
Sheet 07 cache and allocation tasks from Exercises/sheet07.pdf page 1
Original source · Exercises/sheet07.pdf, p. 1. · Sheet 07 cache and allocation tasks.
Sheet 07 · Task 1 cache EAMATrehearsal target · 3–5 min

E = 1 + 0.10[5 + 0.20(17 + 0.30·90)] ns = 1 + 0.50 + 0.34 + 0.54 = 2.38 ns.

All references pay the L1 lookup. Only 10% pay L2; only 10%×20% pay L3; only 10%×20%×30% reach RAM. The given hit rates are conditional (“on L1/L2 miss”), so multiply along the path.

Enter 1+0.1×(5+0.2×(17+0.3×90)). On paper draw a four-level miss tree so every time is paid exactly when reached.
hierarchy EAT = first lookup + P(miss1)[next + P(miss2)(next + …)]. Conditional rates multiply.
Sheet 07 · Task 2 first/next/best/worst fitrehearsal target · 3–5 min
AlgorithmP1 12 MBP2 10 MBP3 9 MB
first fitC20→8A10→0D18→9
next fitC20→8D18→8F9→0
best fitG12→0A10→0F9→0
worst fitC20→8D18→8H15→6

Update the hole immediately after every placement. Next fit resumes after the previous placement instead of restarting at A. Best fit minimizes leftover; worst fit maximizes the chosen hole.

Copy the holes once per algorithm and cross out/update each chosen size. Never reuse the original sizes for P2/P3.
first: scan from start; next: resume cursor; best: smallest fitting; worst: largest. Update remainder after each process.
Read the original task, then cover the answer
Sheet 07 relocation and page-table tasks from Exercises/sheet07.pdf page 2
Original source · Exercises/sheet07.pdf, p. 2. · Sheet 07 relocation and page-table tasks.
Sheet 07 · Tasks 3–4 relocation and page tablerehearsal target · 5–8 min

T3a: 2048 < 8192, so valid; PA = 16384+2048 = 18432 = 0x4800. T3b: 10000 ≥ limit 8192 → bounds fault.

AccessDecisionPhysical address
read 0x1A00page 1 present; RW allows read0xCA00
read 0x2500page 2 absentpage fault
write 0x3100page 3 present; RW0x8100
execute 0x6200page 6 present but R onlyprotection fault

A limit is a size: valid addresses satisfy 0 ≤ VA < limit. For 4 KiB pages, split at the last three hex digits. Page 1 maps to frame 12 = hex C; page 3 maps to frame 8.

fx-991CW official path: HOME → Base-N (starts Decimal) → use the number-mode key to cycle Decimal/Hex/Binary/Octal. For page splitting, hand work is faster: last 3 hex digits = offset. Write the present and protection checks before any address.
base/limit: valid iff 0≤VA<limit, PA=base+VA. 4 KiB page⇒12-bit/3-hex offset; check present then permission.
Read the original task, then cover the answer
Sheet 08 FIFO/LRU and translation-time tasks from Exercises/sheet08.pdf page 1
Original source · Exercises/sheet08.pdf, p. 1. · Sheet 08 FIFO/LRU and translation-time tasks.
Sheet 08 · Task 1 page replacementrehearsal target · 3–5 min
reference0172327103
FIFO frames0---01--017-0172317231723172317230723072
fault?FFFFFF
LRU frames0---01--017-0172317231723172317201720173
fault?FFFFFFF

FIFO: 6 faults · LRU: 7 faults.

Hits do not alter FIFO arrival order, but they do update LRU recency. Before the final LRU reference 3, page 2 is least recently used, so it is evicted. LRU is not guaranteed to beat FIFO on every finite sequence.

Draw four frame rows plus a FIFO queue or “last used at t=” row. Update recency even on hits; increment faults only when absent.
FIFO evicts oldest load (hits do nothing to order); LRU evicts oldest last-use (hits update); fault iff page absent.
Sheet 08 · Task 2 effective translation timerehearsal target · 3–5 min

P(TLB hit)=0.99; P(page fault)=0.0001; page-table-only=0.0099.

E = .99(1 ns)+.0099(1+90 ns)+.0001(1+90+6,000,000 ns) = 601.9 ns ≈ 0.602 μs.

The page-fault probability is part of the 1% TLB-miss population, so the ordinary page-table-only probability is 1−.99−.0001=.0099. Convert 6 ms to 6,000,000 ns before weighting.

Write probabilities so they sum to 1, then put every time in ns. A probability×latency term makes even a rare page fault visible.
EAT: mutually exclusive probabilities sum1; 1 ms=10^6 ns; page-fault term=Ppf×replacement time.
Chapter completeness · Memory Management pp. 45–46

Replacement benchmarks and process memory layout

🟠 Exam-practicalEvidence: 05-Memory-Management.pdf summary pp.45–46 explicitly includes static/dynamic relocation, optimal and Linux replacement ideas, and process segments/stack/heap in addition to the worksheet calculations.
Lecture competency drill · relocation, replacement and process segmentsrehearsal target · 3–5 min

Static relocation: adjust addresses when loading; moving later requires relinking/reloading. Dynamic relocation: the MMU adds base and checks limit on each access. Paging/virtual memory: fixed-size virtual pages map to frames; a TLB caches translations; a nonresident valid page causes a page fault.

OPT: evict the page whose next use is farthest in the future—unimplementable online, but a lower-bound benchmark. Clock/second chance: scan circularly; clear a referenced bit and skip; evict the first unreferenced candidate. NFU counts forever; aging shifts history so recent references dominate.

Address-space sketch: text/code, initialized data, BSS, heap growing upward, mapped/shared region, and stack growing downward. Heap holds dynamically allocated objects; stack holds call frames, parameters, locals and return state.

Virtual memory is the abstraction; paging is one implementation. A TLB miss is not a page fault: the page may be present and only require a page-table lookup. The stack/heap growth directions are the conventional lecture sketch, not a language guarantee.

For replacement draw frame rows plus R bit / last use / load time. For a process layout draw high addresses at the top and label both growth arrows. For any translation, check validity, presence and permission before forming PA.
static reloc at load; dynamic base+limit per access; paging page→frame, TLB caches; valid nonresident→fault. OPT farthest future; clock clear R=1, evict first R=0. layout text|data|BSS|heap↑ … mappings … stack↓; heap dynamic, stack calls/locals.
06
Networks · units decide the answer

Switching, RTT, capacity, throughput, jitter

Write a unit line before every network calculation. Most wrong answers here are a correct formula fed bytes instead of bits, milliseconds instead of seconds, or one-way delay instead of RTT.

🔴 Exam-coreEvidence: exam-SS23 Q6, 12 points (appears in 1 of 1 past exams); Network-Performance and Sheets 09–10 repeat delay/RTT/throughput mechanics.
A packet experiences a pipeline of clocks

Separate “push bits” from “move the signal”

Transmission delay is the time to serialize L bits onto a link of rate R: L/R. Propagation delay is how long the signal travels distance d at speed v: d/v. A faster link reduces serialization but does not make the signal propagate faster. Processing is device work; queuing is waiting behind earlier traffic.

Developer analogy: transmission is writing a response into a socket at a finite bitrate; propagation is the network’s physical travel time after a bit has entered the medium; queuing is the request backlog; processing is middleware/router work. A tiny request on a long path can be propagation-dominated; a huge transfer on a slow link can be serialization-dominated.

Use a delay ledger

TermFormula/sourceCount it whenClassic error
Generationgiven by problemhost must create the packetsilently treating it as transmission
Transmissionbits / bit·s⁻¹for each link that serializes the packet under the modelbytes not converted to bits
Propagationdistance / speedfor each physical pathmultiplying instead of dividing
Processing/queuegiven or inferredat stated devicesinventing values not supplied

For a simple symmetric request/response, RTT is twice the stated one-way path only if the return has the same components. If the problem already gives RTT, do not double it. For store-and-forward routers, a complete packet may need serialization on every link; for cut-through or idealized questions, follow the stated model.

Throughput is useful data divided by elapsed time

transfer time = setup/RTT overhead + data bits / bottleneck rate
throughput = useful data bits / total elapsed time
BDP = bandwidth × RTT

Bandwidth-delay product is the amount of data that fills the path, not a time. Its units are bits. To convert it to complete packets, divide by packet size in bits and floor. Do not multiply by two when RTT is already round-trip.

Jitter is variation in delay. The course exercise uses mean absolute deviation, so state that definition and follow it even though other sources use different jitter estimators. Loss is sent minus delivered over sent. Real-time voice usually values low jitter and delay; bulk transfer values throughput; safety/control traffic may prioritize loss/reliability.

Recognition cues“how long until first/last bit” → separate serialization and propagation.“in flight / pipe capacity” → BDP.“effective rate for a file” → useful bits / total time, including fixed delay.
Memorize exactly: bytes × 8 = bits; ms × 10⁻³ = s. Write one-way ledger first, then justify any RTT doubling.
dprop = distance / propagation speed · dtrans = bits / bit/s
BDP = bandwidth × RTT · throughput = D / (RTT + D/B)
jitter (course) = (1/n) Σ|xi−x̄|
Read the original task, then cover the answer
Sheet 09 packet/circuit switching calculations from Exercises/sheet09.pdf page 2
Original source · Exercises/sheet09.pdf, p. 2. · Sheet 09 packet/circuit switching calculations.
Sheet 09 · Tasks 3–4 switching wait timesrehearsal target · 5–8 min

Shared facts: 250 MB = 2000 Mbit; at 100 Mbit/s a whole transfer takes 20 s. A 1518-byte packet takes 121.44 μs.

T3 AppStore: circuit switching completion times 20,40,60 s ⇒ Wavg=40 s. Packet round robin needs N=⌈2×10⁹/12144⌉=164,691 packets/source; mean final-packet time (3N−1)t = 60.0001 s ≈60.0 s.

T4 Netflix: playback threshold 49,152 kbit takes 0.49152 s at full link rate. Circuit starts are 0,20,40 s ⇒ Wavg=20.49152 s. Packet round robin needs n=⌈49,152,000/12144⌉=4048 packets/source ⇒ mean (3n−1)t = 1.47465 s.

The exercise’s “transfer unit” is the whole stream under circuit switching but one packet under packet switching. Packet switching delays complete AppStore downloads when all three are continuously active, yet dramatically improves time-to-first-playback because each flow receives early packets.

Draw three sender lanes. Circuit: serialize whole files. Packet: repeat S1,S2,S3; the kth packet of S2 finishes at (3k−1)t. State decimal MB/kbit convention.
shared 3-flow RR: kth mean completion=(3k−1)tpacket; circuit whole-file starts 0,T,2T.
Read the original task, then cover the answer
Sheet 10 RTT and bandwidth-delay product from Exercises/sheet10.pdf page 1
Original source · Exercises/sheet10.pdf, p. 1. · Sheet 10 RTT and bandwidth-delay product.
Sheet 10 · Tasks 1–2 RTT and pipe capacityrehearsal target · 5–8 min

T1: per one-way hop: propagation 100/200,000 s =0.5 ms and NIC transmit 0.2 ms. There are h−1 routers at 0.3 ms and one 0.5 ms packet-generation cost. RTT(h)=2[0.5+0.5h+0.2h+0.3(h−1)] = (2h+0.4) ms. For h=3: 6.4 ms.

T2: BDP=100 Mbit/s×0.045 s=4.5 Mbit=562,500 B. 562,500/1518=370.55, so 370 complete packets can be sent before the first ACK (the 371st is in progress).

Correction to Exercises/sheet10_notes.pdf p.4: the handwritten working multiplies the 562,500-byte BDP by two and reports about 742 packets. That double-counts the return path: RTT already spans outbound plus return. The independently verified count is 370 complete packets.

fx-991CW: 100×10^6×45×10^-3÷(1518×8) → 370.55. Round down only because the question asks complete packets before the ACK.
BDP=B×RTT (do NOT ×2); complete packets=floor(B×RTT/Lbits). RTT=2×one-way delay.
Read the original task, then cover the answer
Sheet 10 throughput and jitter tasks from Exercises/sheet10.pdf page 2
Original source · Exercises/sheet10.pdf, p. 2. · Sheet 10 throughput and jitter tasks.
Sheet 10 · Task 3 throughput after 100 Mbit/s → 1 Gbit/srehearsal target · 3–5 min

a: maximum gain occurs at minimum RTT: 2 hops×10 ms one-way×2 =40 ms. For D=2 kB=16 kbit: TP100=16 kbit/(40+.16 ms)=0.3984 Mbit/s; TP1000=16 kbit/(40+.016 ms)=0.39984 Mbit/s. gain ≈1.0036× = 0.36%.

b: guarantee doubling on worst path RTT=2×5×10 ms=100 ms. Solve (R+D/B100)/(R+D/B1000)≥2: D≥R/(1/B100−2/B1000)=12.5 Mbit=1.5625 MB.

For a tiny packet, RTT dominates, so tenfold bandwidth barely matters. “In any case” means use the largest RTT. Marks: select best/worst hop count, substitute both bandwidths, keep bits.

Write G=TPnew/TPold before substituting. If the result of a 10× bandwidth upgrade is near 1× for small packets, that is plausible when RTT dominates.
TP=D/(RTT+D/B); bandwidth gain vanishes when RTT≫D/B; guarantee uses worst RTT.
Sheet 10 · Task 4 jitter recommendationrehearsal target · 3–5 min

Provider A: x̄=257/6=42.83 ms; MAD=7/6=1.17 ms. Provider B: x̄=264/6=44.00 ms; MAD=38/6=6.33 ms. Choose A: it has both lower mean delay and much lower jitter. For interactive voice, low jitter is especially important because variation causes uneven playout and buffering/dropouts.

The course defines jitter as mean absolute deviation, not standard deviation. Provider B occasionally looks faster, but its timing is far less predictable.

fx-991CW: HOME → Statistics → 1-Variable → enter six RTTs → 1-Var Results gives x̄. The calculator does not directly give course MAD: compute |xi−x̄|, sum, ÷6. On paper show mean and the absolute-deviation sum.
course jitter=MAD=(Σ|xi−x̄|)/n; VoIP values predictable timing, then low mean.
Read the original task, then cover the answer
Sheet 09 network history and media prompts from Exercises/sheet09.pdf page 1
Original source · Exercises/sheet09.pdf, p. 1. · Sheet 09 network history and media prompts.
Sheet 09 · Tasks 1–2 research answers (context, not a memorization target)rehearsal target · 5–8 min

ARPANET: its goals included secure communication and resource sharing among geographically separated research sites. The first attempted message from UCLA to SRI was LOGIN, but the system crashed after LO. The operational 1969 network had four initial nodes. There is no authoritative exact count of “Internet hosts now”: NAT, dynamic addressing, virtual machines, and IoT make the term definition-dependent; give a dated metric/source if asked.

Medium / named standardTheoretical headline rateTypical field
Wi‑Fi 7 / IEEE 802.11be≈46 Gbit/s with the full multi-stream configurationlocal wireless LAN
Bluetooth Core 5.43 Mbit/s BR/EDR; 2 Mbit/s LE 2M PHYperipherals, audio, low-power IoT
5G / ITU IMT‑2020 + 3GPP NR20 Gbit/s down, 10 Gbit/s up under ideal peak conditionsmobile broadband, URLLC, massive IoT
twisted-pair copper / IEEE 802.3bq 40GBASE‑T40 Gbit/s over up to 30 mLAN/data-centre short links
optical fiber / IEEE 802.3df‑2024800 Gbit/s Ethernetdata-centre and backbone links

These are named, dated physical/link-rate benchmarks—not a promise of application throughput and not timeless maxima. Configuration, overhead, distance, interference and device support reduce real rates.

These web-research prompts are evidence of vocabulary/context, while the lecture summary and calculation worksheets prioritize switching and waiting-time calculations. DARPA confirms the four 1969 ARPANET nodes; Bluetooth SIG, ITU‑R and IEEE standards confirm the named rate examples. A good research answer separates gross physical rate from user throughput.

For any changing figure, write standard/version + theoretical/real + date. That turns an otherwise fragile number into a defensible answer.
ARPANET: resource sharing; first link UCLA↔SRI, “LO”, 1969, 4 nodes. Media rate needs named standard/version.
Chapter completeness · Introduction to Networks p. 30

Network types, devices and loss

🟠 Exam-practicalEvidence: 06-Introduction-to-Networks.pdf summary p.30 requires network sketches, device purposes and network-type distinctions; 07-Network-Performance.pdf p.23 also names packet loss as a KPI.
Lecture competency drill · classify a network and every forwarding devicerehearsal target · 3–5 min

PAN: personal-area devices; LAN: one site/building; MAN: metropolitan area; WAN: long-distance regions. A repeater regenerates a physical signal (L1); a hub repeats incoming bits to all ports (L1); a bridge/switch forwards frames by MAC address (L2); a router forwards packets between IP subnets (L3).

KPI: packet-loss ratio = lost or damaged packets / packets sent. Prefer low delay, low loss, low jitter and high throughput; which dominates depends on the application.

“Wireless” is a medium, not a network-size class. A switch does not normally route between IP subnets; a router does not forward by the destination MAC beyond its current link.

In a sketch, draw hosts inside labelled subnet clouds. Put switches inside a subnet and a router between clouds. For a device comparison write layer | identifier | scope | action.
PAN person; LAN site; MAN city; WAN region. repeater L1 regenerate; hub L1 flood bits; bridge/switch L2 MAC frames; router L3 IP subnets. loss=(sent−delivered)/sent; KPI low delay/loss/jitter, high throughput.
07
Networks · sketch, measure, assign layers

Topologies and reference models

A graph question is arithmetic on a picture; a layer question is ownership of a function. Name the object each layer manipulates—signal, frame, packet, segment, or application data—and most assignments become automatic.

🔴 Exam-coreEvidence: exam-SS23 Q5 + Q7, 18 points total (appears in 1 of 1 past exams); Topologies, Reference Models and Sheet 11 corroborate the graph/layer tasks.
Pictures become graphs; layers become ownership

Topology questions ask “what fails, how far, and at what cost?”

Replace the drawing with an undirected graph unless the problem says otherwise. Vertices are devices; edges are links. Degree counts incident links. Shortest path is the fewest links between two vertices. Diameter is the worst shortest-path length over all pairs. Connectivity is the smallest number of vertices or edges whose removal disconnects the graph—state which kind the question uses. A graph is regular if every vertex has the same degree.

Do not infer connectivity from degree alone unless you can prove it. The exam-safe method is constructive: show that fewer removals cannot disconnect, then exhibit a set of the claimed size that does.

Star

Short paths and simple expansion; central device is a bottleneck/single failure point.

Ring

Degree two and predictable wiring; a break harms a single ring, while a counter-rotating dual ring gives an alternate direction.

Tree/fat tree

Hierarchical scaling; upper links/devices aggregate traffic. Fat trees add path multiplicity and bandwidth.

Router versus switch in one precise contrast

A switch normally forwards frames inside a layer-2 broadcast domain using MAC addresses learned from source frames. A router forwards packets between IP networks using a routing table and decrements TTL/Hop Limit. A router replaces the link-layer frame at every hop; the destination IP normally remains end-to-end unless NAT rewrites it.

OSI questions are easier when you ask “which object owns this function?”

LayerObject/functionAnchor examples
7 Applicationuser-visible protocol semanticsHTTP, DNS, DHCP
6 Presentationrepresentation, encoding, compression, encryptionTLS/serialization as practical functions
5 Sessiondialog/session coordinationcheckpoints, session control
4 Transportprocess-to-process delivery, ports, reliability/flowTCP, UDP
3 Networkrouted logical addressingIP, routers
2 Data linklocal-link frames and MAC access/addressingEthernet, switches
1 Physicalsignals and bit transmissioncopper, fibre, radio

Flow control protects a receiver from a sender that is too fast. Congestion control protects the network from too much offered traffic. They can coexist in TCP but answer different questions.

Recognition cues“route between networks” → L3/router/IP.“frame/MAC/local medium” → L2/switch.“ports/end-to-end reliability” → L4.“signal/voltage” → L1.
Memorize exactly: OSI 7→1 = Application, Presentation, Session, Transport, Network, Data Link, Physical. Internet model folds 5–7 into Application and 1–2 into Link.
density = |E| / [n(n−1)/2]
diameter = max shortest-path length
connectivity = min removals to disconnect
OSI memory chain
7 Application—user protocol · 6 Presentation—format/crypto · 5 Session—dialog · 4 Transport—ports/reliability · 3 Network—IP/route · 2 Data link—frame/MAC · 1 Physical—bits/signal.
coreaggregationedgeV=20 · E=32 · diameter=4 · connectivity=2 · not regulardegrees: core 4 · aggregation 4 · edge 2
Complete reconstruction of Sheet 11 p.1: four core, eight aggregation and eight edge switches. A worst-case edge→aggregation→core→aggregation→edge path has four hops.
Read the original task, then cover the answer
Sheet 11 fat-tree topology from Exercises/sheet11.pdf page 1
Original source · Exercises/sheet11.pdf, p. 1. · Sheet 11 fat-tree topology.
Sheet 11 cost and protocol prompts from Exercises/sheet11.pdf page 2
Original source · Exercises/sheet11.pdf, p. 2. · Sheet 11 cost and protocol prompts.
Sheet 11 · Tasks 1–2 topology properties and costrehearsal target · 5–8 min

T1: Figure has n=20 switches (4 core, 8 aggregation, 8 edge) and E=32 links (16 edge↔aggregation +16 aggregation↔core). Diameter=4; edge/vertex connectivity=2; density=32/[20·19/2]=0.1684. It is not regular: edge degree 2, while aggregation/core degree 4.

T2a: with n edge and n aggregation switches, 2 core switches and 4n cables: C(n)=2·15000+n·5000+n·200+4n·50=€30,000+€5,400n.

T2b: 768/64=12 edge switches (already even), so C(12)=€94,800.

One link removal never disconnects the paired fabric; removing the two links incident to an edge node does. Density uses the undirected maximum n(n−1)/2. The cost model follows the worksheet’s depicted n edge + n aggregation structure and treats 64 edge ports as host capacity; state this assumption.

Annotate V, E, and each degree on the drawing. For diameter, exhibit a length-4 pair and argue no shortest path is longer.
undirected density=2E/[n(n−1)]; fat tree sheet: V20,E32,diam4,conn2,not regular; C(n)=30000+5400n.
Read the original task, then cover the answer
Sheet 11 Subway service-model prompt from Exercises/sheet11.pdf page 2
Original source · Exercises/sheet11.pdf, p. 2. · Sheet 11 Subway service-model prompt.
Sheet 11 · Task 3 Subway protocolrehearsal target · 3–5 min

Connection-oriented and reliable. A greeting establishes an interaction, the order proceeds through an expected sequence, and payment terminates it. The customer/employee confirm choices and can correct omissions, providing ordered, acknowledged completion.

Do not argue that “human = reliable.” Identify protocol properties: setup/state/teardown for connection orientation; acknowledgement, ordering, and correction for reliability.

Use a two-column test: setup+state+close? acknowledgement+recovery+ordering? Then justify with one event from the scenario.
connection-oriented=setup/state/teardown; reliable=acknowledge+order+retransmit/correct.
Read the original task, then cover the answer
Sheet 11 OSI assignment table from Exercises/sheet11.pdf page 3
Original source · Exercises/sheet11.pdf, p. 3. · Sheet 11 OSI assignment table.
Sheet 11 · Task 4 OSI assignmentsrehearsal target · 3–5 min
#LayerReason
1Physicalelectrical signal
2Transportsegmentation
3Sessionestablish/terminate dialog
4ApplicationHTTP request
5Transportport identifies application
6Transportend-to-end ordering
7Data linkMAC address
8NetworkIP/logical address
9Data linkframing for medium
10Presentationencryption
11Transportend-to-end loss/duplicate recovery
12Networknext-hop routing
13Physicalbits ready for signal
14Transportend-to-end flow control
15Data linkEtherType-like upper-protocol multiplexing

Error/flow control can appear at multiple scopes. The wording decides: frames on one link → data link; end-to-end packets/segments → transport. “Protocol multiplexing” is assigned to data link here because the lecture emphasizes choosing the encapsulated network-layer protocol; ports are already tested in #5.

Underline the telltale noun: signal→L1, MAC/frame→L2, logical/route→L3, port/order/retransmit→L4, session→L5, format/crypto→L6, HTTP/user service→L7.
OSI: App user protocol | Pres format/crypto | Sess dialog | Trans ports/segments/reliability | Net IP/route | Link frame/MAC | Phys signal.
Chapter completeness · Topologies p. 27 + Reference Models pp. 30–31

Topology sketches, service models and TCP/IP mapping

🟠 Exam-practicalEvidence: 08-Network-Topologies.pdf summary p.27 requires all taught topology sketches and Internet topology; 09-Reference-Models.pdf summaries pp.30–31 require communication patterns, client/server, P2P and OSI↔Internet mapping.
Lecture competency drill · basic topologies and the Internet hierarchyrehearsal target · 3–5 min

Star: every leaf joins one center—cheap/easy, but the center is a bottleneck and single point of failure. Ring: every node has two neighbors—predictable cabling, but a simple ring is vulnerable to a break. Clique: every pair is linked, so E=n(n−1)/2—excellent paths/redundancy, quadratic cost. Tree: hierarchical parent/child links—scalable aggregation, but upper failures affect subtrees.

The Internet is a graph of autonomous systems: access networks connect through providers; regional/tier-2 providers buy transit or peer; tier-1 backbones can reach the global routing table without buying transit.

Assess every topology on the same axes: path length/performance, connectivity/reliability, edge/switch cost, and expansion. “Best” without a use case earns little.

To draw: star = center first; ring = circle then close; clique = place nodes on a circle and join all pairs; tree = levels. Annotate degree, one worst-case path and the failure whose removal disconnects the graph.
star center/failure; ring degree2; clique E=n(n−1)/2 costly+robust; tree hierarchy/scalable+upper failure. Internet=access→regional/tier2→tier1 ASes with transit/peering; assess path, connectivity, cost, scale.
Lecture competency drill · communication patterns and Internet reference modelrehearsal target · 3–5 min

Patterns: one-way sends without a reply; request–response pairs a request with its answer; notification pushes an event to a receiver. Client/server: clients request a centralized service. Peer-to-peer: participants can both request and provide resources, improving distribution but complicating coordination/trust.

Internet model: Application ≈ OSI 5–7 (HTTP/DNS/DHCP); Transport = OSI 4 (TCP/UDP); Internet = OSI 3 (IP/ICMP); Host-to-network/Link ≈ OSI 1–2 (Ethernet/Wi‑Fi). In the data-link layer, LLC multiplexes upper protocols while MAC handles medium access and link addressing.

Layer mapping is approximate, not a claim that OSI functions disappeared. Encapsulation adds a header at each downward step; the receiver removes them upward.

For model questions draw two aligned stacks and horizontal arrows between corresponding groups. For a protocol, say message order/format, connection state and reliability—not only its name.
patterns one-way | request↔response | notify push. client/server centralized; P2P peers serve+request. TCP/IP: App=OSI5–7; Transport4; Internet3; Link1–2. LLC multiplexes network protocols; MAC medium access+address.
08
Networks · one drawing is likely

Physical and data-link layer

A good signal drawing declares its convention, marks bit boundaries, and shows the mid-bit transitions. A good link-layer answer names the frame field that makes the decision.

🟠 Exam-practicalEvidence: absent from exam-SS23 but explicitly IN under the 21 Jul instructor briefing; Network-Protocols pp.100–102 and Sheet 12 require calculations and line-code drawings.
Bits need timing before packets can exist

The physical layer encodes symbols; the link layer frames a local conversation

A receiver does not see abstract 0s and 1s. It samples voltage, light, or radio symbols and must know when to sample. A line code maps bits to signal levels/transitions and can provide clock information. Mark bit-cell boundaries first; then apply the course convention mechanically.

NRZ-L uses a level per bit and can lose synchronization on long constant runs. Manchester forces a mid-bit transition, improving clock recovery at the cost of more signal changes/bandwidth. 4B/5B maps each four-bit nibble to a five-bit code chosen to limit long runs; it is block coding, not the final electrical waveform.

Differential signalling: send opposite voltages on a pair and let the receiver subtract. Noise coupled equally onto both wires cancels: (signal + noise) − (opposite signal + noise). It rejects common-mode noise; it does not remove noise that affects the wires differently.

Frames add local addressing and error detection

Ethernet wraps payload in a frame containing destination/source MAC addresses, an EtherType/length interpretation, and a frame check sequence. A switch learns the source MAC → incoming port mapping and uses the destination MAC to forward or flood. The FCS detects corruption; ordinary Ethernet does not itself provide end-to-end retransmission.

The first 24 bits of a globally administered MAC address form the organizationally unique identifier (OUI). A MAC address identifies an interface on a local link; it is not a routable global path. ARP/neighbor discovery bridges the question “which local MAC currently owns this next-hop IP?”

Drawing recipe

  1. Copy the bit string and draw equal-width cells.
  2. Write the convention: e.g. Manchester 0 = low→high, 1 = high→low.
  3. Draw the mid-cell transition for every Manchester bit and any boundary transition implied by adjacent cells.
  4. For 4B/5B, split into nibbles, show each table lookup, concatenate, and label it encoded bits—not voltage.
Recognition cues“noise on both wires” → subtract and show cancellation.“draw encoding” → state convention before waveform.“vendor from MAC” → first 24-bit OUI, normally a lookup procedure rather than memorized vendor.
Memorize exactly: L1 moves encoded symbols; L2 moves frames on one link. Switch uses MAC, router uses IP.
Physical
digital signal, synchronization, simplex/half/full duplex, modulation, differential pair, NRZ-L, Manchester, 4B/5B, PAM.
Data link
frames, source/destination MAC, EtherType, error detection, link flow control, media access. Switches learn/forward at L2.
Sheet 12 · bits 0 0 1 0 1 1 1 100101111NRZ-LManchester4B/5B0010 → 10100   1111 → 11101    encoded: 1010011101Convention used from lecture figure: NRZ-L 1=high, 0=low; Manchester 1=high→low, 0=low→high at mid-bit.
Exam-ready line-code answer. 4B/5B first translates each nibble; the resulting ten bits are then physically line-coded by the chosen lower-level scheme.
Fast hand method: draw vertical bit boundaries first; write the bits above them; NRZ-L is one level per cell; Manchester forces one mid-cell transition; for 4B/5B split 0010|1111 and look up 10100|11101.
Read the original task, then cover the answer
Sheet 12 physical/link vocabulary from Exercises/sheet12.pdf page 1
Original source · Exercises/sheet12.pdf, p. 1. · Sheet 12 physical/link vocabulary.
Sheet 12 · Task 1 fill the gapsrehearsal target · 3–5 min

1 digital signal · 2 synchronization · 3 duplex · 4 full-duplex · 5 modulation · 6 copper · 7 differential signaling · 8 line code · 9 NRZ-L · 10 Manchester · 11 4B/5B · 12 pulse-amplitude modulation (PAM) · 13 common-mode noise.

A line code maps bits to a signal pattern; modulation changes a carrier/signal property to carry information. Differential signaling encodes the voltage difference, so equal noise on both wires cancels.

Pair each definition with its unique action verb: coordinate time=synchronization; simultaneous both ways=full duplex; map 4→5=4B/5B; amplitudes of pulses=PAM.
sync=shared bit timing; full duplex=simultaneous both ways; line codes NRZ-L/Manchester/4B5B; PAM uses amplitudes.
Read the original task, then cover the answer
Sheet 12 differential and line-code tasks from Exercises/sheet12.pdf page 2
Original source · Exercises/sheet12.pdf, p. 2. · Sheet 12 differential and line-code tasks.
Sheet 12 · Task 2 differential signalingrehearsal target · 3–5 min

Let the pair carry V+=+0.5 V, V−=−0.5 V and let equal noise n=+0.25 V affect both. Before noise: ΔV=0.5−(−0.5)=1.0 V. After noise: ΔV'=(V++n)−(V−+n)=(0.75)−(−0.25)=1.0 V. Algebraically n−n=0 for any common noise.

The receiver does not interpret either wire against ground; it subtracts them. Only noise that is common to both cancels—unequal interference does not disappear.

Write the subtraction with parentheses on both wires. Cross out +n−n visibly; keep volts on every line.
differential: ΔV=(S+n)−(S̄+n)=S−S̄; common-mode noise cancels.
Read the original task, then cover the answer
Sheet 12 MAC/OUI task from Exercises/sheet12.pdf page 3
Original source · Exercises/sheet12.pdf, p. 3. · Sheet 12 MAC/OUI task.
Sheet 12 · Task 3 line codes + Task 4 MACrehearsal target · 3–5 min

T3: use the plotted answer above. NRZ-L levels for 00101111: L,L,H,L,H,H,H,H. Manchester half-levels: LH,LH,HL,LH,HL,HL,HL,HL under the lecture convention. 4B/5B: 0010→10100 and 1111→11101, so 1010011101.

T4: Windows ipconfig /all; macOS ifconfig; Linux ip a. Identify the active Wi-Fi interface’s 48-bit MAC; the first 24 bits are the OUI to look up in IEEE’s registry. The exact address/vendor is machine-specific.

The supplied lecture 4B/5B table has a duplicate/typo around 1100/1101, but the two nibbles used here are unambiguous and match the standard entries. State the Manchester convention because naming conventions vary.

No calculator. For Base-N sanity, HOME → Base-N, choose Binary, but a ten-bit line code should be transcribed from the table, not numerically converted.
00101111: NRZ L,L,H,L,H,H,H,H; Manchester 1=HL,0=LH; 4B5B=10100 11101.
09
Networks · most likely multi-mark problem

IPv4/IPv6, subnetting, routing

Subnetting is range arithmetic, and routing is a maximum-prefix decision. Write the mask/prefix, network, broadcast, usable range, and next hop as separate lines so partial credit survives one arithmetic slip.

🔴 Exam-coreEvidence: exam-SS23 Q8a–b, 10 points (appears in 1 of 1 past exams); Network-Protocols and Sheets 13–14 are devoted to subnet/routing work.
CIDR is range alignment, routing is specificity

A prefix fixes the left bits and leaves a power-of-two address block

In IPv4 a.b.c.d/p, the first p bits identify the network and the remaining 32−p bits vary inside the block. The network address has all host bits zero; the broadcast has all host bits one. Traditional usable-host exercises subtract those two endpoints.

Developer analogy: a CIDR route is a pattern match on the leading bits. Longer prefix means a more specific pattern, like a more specific route handler winning over a catch-all. It is not “first row wins” unless rows happen to be sorted and the problem explicitly says so.

The changing-octet shortcut

  1. Convert the prefix to a dotted mask or identify the octet where network bits stop.
  2. Block size = 256 − mask value in that octet.
  3. Find the greatest block multiple not exceeding the IP octet: that is the network boundary.
  4. Broadcast boundary = network + block − 1; earlier octets stay fixed and later octets become 255.
  5. Write network, broadcast, and usable range separately.
host bits h = 32 − p
addresses = 2ʰ
traditional usable hosts = 2ʰ − 2

For /31 point-to-point or /32 host routes, modern protocol rules differ; use the course’s ordinary subnet convention unless the question names those cases.

VLSM is memory allocation with alignment

Sort host requirements largest first. For each, choose the smallest power-of-two block that fits the required usable hosts, convert it to a prefix, and allocate at an address divisible by that block size. Packing small blocks first can strand a large aligned region—exactly like heap fragmentation.

Longest-prefix routing

  1. Include directly connected networks and a default route if supplied.
  2. For the destination, test every row: (IP AND mask) == network.
  3. Among all matches, choose the largest prefix length.
  4. Report the next hop/interface; if directly connected, say so instead of inventing a gateway.

TTL/Hop Limit prevents loops. Each router decrements it; traceroute deliberately sends probes with values 1, 2, 3… and observes ICMP Time Exceeded replies. Path MTU discovery sets DF, reacts to “too big/fragmentation needed,” and reduces packet size.

IPv6: what changed and why

IPv6 expands addresses to 128 bits and uses a fixed 40-byte base header. It removes the base-header checksum and router fragmentation, moves optional features to extension headers, renames TTL to Hop Limit, and uses Next Header to identify an extension or upper-layer protocol. Intermediate routers do less per-packet work; sources handle fragmentation when necessary.

Recognition cues“how many hosts” → host bits and power of two.“network/broadcast” → block boundary.“allocate several subnets” → largest-first VLSM + alignment.“next hop” → list all matches, choose longest prefix.
Memorize exactly: /21 = 2048 addresses = 2046 traditional usable hosts. Default /0 matches everything but loses to every more-specific match.
host bits h=32−prefix
addresses=2^h · usable=2^h−2
block size=2^(8−prefix bits in changing octet)
network=IP AND mask
Longest-prefix match
Find every route whose masked destination equals its network. Choose the match with the largest /prefix. Use the default /0 only if nothing more specific matches.
VLSM allocation from 192.168.0.0/16A · 192.168.0.0/23510 usableB · .2.0/25C /26D /28Pack largest→smallest. Each next network begins at the previous broadcast + 1 and must align to its block size.Destination IPmask against all routesAll matching prefixes/0, /8, /16, /24 …Largest / winsforward to its next hop
Subnet allocation and forwarding are separate operations: allocate aligned address ranges first; route a packet by the most specific matching range.
Read the original task, then cover the answer
Sheet 13 IPv4 and IPv6 header tasks from Exercises/sheet13.pdf page 1
Original source · Exercises/sheet13.pdf, p. 1. · Sheet 13 IPv4 and IPv6 header tasks.
Sheet 13 · Task 1 IPv4rehearsal target · 3–5 min

a /20 hosts: h=12; 2¹²−2=4094 usable.

b binary address: 10000000.11010000.00000010.10010111 = 128.208.2.151.

c 172.16.145.78/22: mask 255.255.252.0, third-octet block size 4; 145 lies in 144–147. network 172.16.144.0; broadcast 172.16.147.255.

d flags: DF=1 forbids fragmentation; a router that would need to fragment drops it and reports an ICMP error. MF=1 means more fragments follow; final fragment has MF=0.

e Protocol: identifies the payload’s next protocol; 6=TCP, 17=UDP (1=ICMP).

f MTU 1500, no IPv4 options: 1500−20=1480-byte payload.

The supplied Sheet 13 solution agrees with all numerical results. /22 means six host bits remain in the third octet: mask 11111100₂ and blocks of four. MTU includes the IPv4 header.

fx-991CW: HOME → Base-N; decimal is default; cycle to Binary/Hex as needed. Faster IPv4 method: write octet weights 128,64,32,16,8,4,2,1 and the changing-octet block size.
IPv4 usable=2^(32−p)−2; block=256−mask_octet; net=floor(IP/block)×block; bcast=net+block−1; payload=MTU−IHL.
Read the original task, then cover the answer
Sheet 13 IPv6 comparison and subnet tasks from Exercises/sheet13.pdf page 2
Original source · Exercises/sheet13.pdf, p. 2. · Sheet 13 IPv6 comparison and subnet tasks.
Sheet 13 · Tasks 2–3 IPv6 header and comparisonrehearsal target · 5–8 min

T2 labels: (1) Version, (2) Traffic Class, (3) Flow Label, (4) Payload Length, (5) Next Header, (6) Hop Limit, (7) Source Address, (8) Destination Address. Next Header occupies bits [48,55], zero-indexed.

T3 removed: IHL (fixed 40-byte header), header checksum, IPv4 identification/flags/fragment offset (routers do not fragment), inline options (extension headers instead). Changed: TTL→Hop Limit; Protocol→Next Header; Total Length→Payload Length. Added: Traffic Class and Flow Label; addresses expand 32→128 bits.

Field boundaries: Version 0–3, Traffic Class 4–11, Flow Label 12–31, Payload Length 32–47, Next Header 48–55, Hop Limit 56–63. IPv6 fragmentation can be performed by the source via an extension header, not by intermediate routers.

Draw the fixed first 64 bits as 4|8|20 then 16|8|8; below them draw two 128-bit address rows. Sum field widths to derive bit intervals.
IPv6 fixed40B: Ver4|TC8|Flow20|PayloadLen16|Next8|Hop8|Src128|Dst128; Next=[48,55].
Sheet 13 · Task 4 VLSMrehearsal target · 8–10 min
NeedHost bitsAllocationRange
A 5009 → /23192.168.0.0/23.0.0–.1.255
B 1007 → /25192.168.2.0/25.2.0–.2.127
C 506 → /26192.168.2.128/26.2.128–.2.191
D 104 → /28192.168.2.192/28.2.192–.2.207

Risk: tightly packed subnets have no adjacent growth room; later expansion can force disruptive renumbering.

For each requirement choose the smallest h with 2^h−2≥hosts. Sorting largest first prevents a large aligned block from being stranded by small allocations. This independently matches the supplied solution.

Write powers of two margin table: 14→/28, 30→/27, 62→/26, 126→/25, 254→/24, 510→/23. Move next start to previous broadcast+1.
VLSM: sort largest; choose smallest h with 2^h−2≥need; /p=32−h; next net=prev bcast+1, aligned.
Read the original task, then cover the answer
Sheet 14 subnet allocation and routing tasks from Exercises/sheet14.pdf page 1
Original source · Exercises/sheet14.pdf, p. 1. · Sheet 14 subnet allocation and routing tasks.
Sheet 14 · Task 1 reverse-binary allocation with 2× headroomrehearsal target · 3–5 min
Purpose2× hostsReverse index offsetSubnet
Professor offices48010.112.32.0/26
Deep Learning6051210.112.34.0/26
HPC/Graphics5625610.112.33.0/26
Network Lab7476810.112.35.0/25
Seminar412810.112.32.128/29
Server IT1264010.112.34.128/28
Server Intelligent Networks2838410.112.33.128/27

A /22 has ten host bits. Reverse the ten-bit counters 0…6: offsets 0,512,256,768,128,640,384. Each chosen start is aligned for its smallest adequate prefix, and all ranges are disjoint. This spreads allocations through the /22 instead of packing them at one edge.

Write counters as 10-bit values, reverse all ten bits, convert to an offset, add to 10.112.32.0, then choose the prefix from doubled host need. Check alignment and overlap.
reverse binary /22: rev10(0..6) offsets 0,512,256,768,128,640,384; then smallest host-fitting prefix.
RNHNHNHNH32.0.0.0/848.0.0.0/8207.10.100.0/24128.1.0.0/16207.10.100.8128.1.0.10locallocal / default .11
Conceptual reconstruction from Sheet 14 Task 4. The routing table fixes next-hop addresses but not every neighbor interface octet; unknown values must be shown as “?”.
Read the original task, then cover the answer
Sheet 14 longest-prefix routing diagram from Exercises/sheet14.pdf page 2
Original source · Exercises/sheet14.pdf, p. 2. · Sheet 14 longest-prefix routing diagram.
Sheet 14 · Tasks 2–4 routing table, traceroute, LPMrehearsal target · 8–10 min

T2 router B (lecture slide 45): local routes 198.120.0.0/16, 129.0.0.0/8, 91.39.176.0/20; 50.12.230.0/24 via 91.39.176.1; default 0.0.0.0/0 via 91.39.176.3.

T3 traceroute: send probes with TTL/Hop Limit 1,2,3…; each router decrements it. When it reaches zero, that router returns ICMP Time Exceeded, revealing its address and RTT. The destination returns an endpoint response (commonly ICMP Port Unreachable for UDP probes, or Echo Reply for ICMP), ending the trace.

T4 next hops: 48.12.23.77 → 128.1.0.10; 32.20.18.55 → 207.10.100.9 (/16 beats /8); 32.21.19.56 → 207.10.100.8; 207.10.101.1 → 128.1.0.11 default; 207.10.100.2 → local.

For 32.20.18.55 both 32/8 and 32.20/16 match; the longest prefix is /16. 207.10.101.1 differs in the third octet from local 207.10.100/24, so it falls through to /0.

Convert masks to prefixes first (/8,/16,/24,/0). For each destination, list every match, circle the largest prefix, then copy its next hop.
LPM: collect all (IP&mask)==network; max /prefix wins; /0 only fallback. traceroute TTL=1,2,… + ICMP Time Exceeded.
10
Networks · explain a trace, not a slogan

Transport and application protocols

Protocol answers score when they name state transitions and fields. For TCP, track sequence/acknowledgement numbers and flags. For DNS/DHCP, track who asks whom and what information returns.

🔴 Exam-coreEvidence: exam-SS23 Q8c–d plus Q5c, 7 points total (appears in 1 of 1 past exams); instructor confirms all late TCP/DNS/DHCP lecture content remains IN.
Ports select the process; sequence state creates reliability

UDP sends messages; TCP maintains a byte-stream state machine

IP delivers packets to a host interface. A transport protocol and port identify the application endpoint. UDP preserves datagram boundaries and adds ports, length, and checksum with no connection setup or built-in ordering/retransmission. TCP exposes an ordered reliable byte stream, so it must establish state, number bytes, acknowledge progress, retransmit loss, and control how much data is in flight.

Developer analogy: UDP resembles sending independent events where the application handles loss/duplicates/order. TCP resembles a replicated log indexed by byte offsets: acknowledgements commit a contiguous prefix. The analogy stops at message boundaries—TCP is a stream, so one send is not guaranteed to equal one recv.

Handshake and sequence arithmetic

Each side chooses an initial sequence number. SYN x consumes sequence number x; the peer replies SYN+ACK y, ack x+1; the initiator acknowledges ack y+1. ACK always means the next byte expected. If 400 bytes begin at sequence 1001, the next expected byte is 1401. FIN also consumes one sequence number.

The three-way handshake proves both directions work and synchronizes both initial sequence spaces. Two messages cannot confirm that the responder received the initiator’s acknowledgement of the responder’s sequence number.

Sliding window: three regions, one invariant

At the sender, bytes left of ACK are acknowledged; bytes already sent but at or right of ACK are in flight; later bytes inside the advertised window may be sent now. The right edge is ACK + rwnd − 1. Usable capacity is advertised window minus in-flight bytes. Duplicate ACKs do not move the left edge.

Flow control uses the receiver-advertised window to protect receiver buffers. Congestion control separately estimates what the network can carry. The actual sending limit is constrained by both.

DNS resolves names through delegated authority

The client asks a recursive resolver. On a cache miss, the resolver follows referrals from a root server to a TLD server to the authoritative server, returns the record, and caches it for its TTL. Common records: A (IPv4), AAAA (IPv6), CNAME (alias), MX (mail exchanger), NS (authoritative server), PTR (reverse lookup). Reverse IPv4 lookup reverses octets under in-addr.arpa.

DHCP bootstraps configuration before the client has an address

DORA = Discover, Offer, Request, Acknowledge. Discover and Request are normally broadcast in the basic scenario because the client initially lacks usable IP configuration and wants all servers to see which offer it selected. The ACK supplies the lease plus options such as mask, router, and DNS server. Transaction ID and client hardware address correlate messages.

Encapsulation answers “which address changes where?”

Application data → TCP/UDP segment (ports) → IP packet (end-to-end logical addresses) → link frame (next-hop MAC addresses) → signal. At a router, the incoming frame ends; the router decrements TTL/Hop Limit, chooses the next hop, and creates a new outgoing frame. NAT may additionally rewrite IP addresses and ports while storing a translation-table entry.

Recognition cues“message, no setup, tolerate loss” → UDP.“ordered reliable stream / seq & ack” → TCP.“name to address” → DNS hierarchy/cache/record.“host obtains configuration” → DHCP DORA.
Memorize exactly: TCP SYN x → SYN+ACK y, ack x+1 → ACK ack y+1. ACK = next byte expected. DNS cache follows root→TLD→authoritative. DHCP = DORA.
UDP vs TCP
UDP: message-oriented, no connection setup, no built-in reliability/order; 8-byte header. TCP: byte stream, connection-oriented, ordered reliable delivery, flow/congestion control, sequence/ack numbers.
Applications
DNS maps names through a hierarchy and caches replies. DHCP uses broadcast discovery to obtain address, mask, router, DNS, and lease. A socket endpoint is IP address + transport protocol + port.
TCP three-way handshakeclientserverSYN, seq=xSYN+ACK, seq=y, ack=x+1ACK, ack=y+1Sender window invariantACKedsent, unACKedmay send nowoutside window
ACK means “next byte expected.” The usable sender window shrinks as bytes are sent and slides right only when acknowledgements arrive.
Read the original task, then cover the answer
Lecture source: TCP establishment and termination from 10-Network-Protocols.pdf page 74
Original source · 10-Network-Protocols.pdf, p. 74. · Lecture source: TCP establishment and termination.
Lecture-aligned drill · TCP handshake and acknowledgementsrehearsal target · 3–5 min

Client chooses initial sequence x=1000 and sends SYN seq=1000. Server chooses y=7000 and answers SYN+ACK seq=7000, ack=1001. Client sends ACK seq=1001, ack=7001. If the client then sends 400 data bytes beginning at seq=1001, a cumulative acknowledgement of all bytes is ack=1401.

SYN consumes one sequence number. An ACK always names the next byte expected, not the last byte received. Flags occupy the TCP header; source/destination ports multiplex applications.

Draw two vertical lifelines. On every arrow write flags, seq, ack, and payload length. Update next sequence by payload bytes plus one for SYN/FIN.
TCP 3WH: SYN x → SYN+ACK y,ack x+1 → ACK ack y+1. ACK=next byte expected; SYN/FIN consume 1.
Read the original task, then cover the answer
Lecture source: sliding-window sender/receiver model from 10-Network-Protocols.pdf page 77
Original source · 10-Network-Protocols.pdf, p. 77. · Lecture source: sliding-window sender/receiver model.
Lecture-aligned drill · sliding windowrehearsal target · 3–5 min

Sender window covers bytes 1000–1999 (size 1000). Bytes 1000–1399 are sent. Receiver ACK=1200 means 1000–1199 arrived cumulatively; sent-unACKed is 1200–1399. If the advertised window remains 1000 bytes, the right edge becomes 2199, so the sender may transmit 1400–2199: 800 bytes currently usable.

Left edge = first unacknowledged byte. Right edge = left + advertised window −1. Usable = advertised window − bytes currently in flight. Duplicate ACKs do not move the left edge.

Draw a numbered bar and shade ACKed, in-flight, usable, outside. Recompute edges after every ACK; never infer from segment count without byte lengths.
window: left=ACK(next expected); right=left+rwnd−1; usable=rwnd−in_flight; ACK cumulative.
Read the original task, then cover the answer
Lecture source: DNS study object from 10-Network-Protocols.pdf page 84
Original source · 10-Network-Protocols.pdf, p. 84. · Lecture source: DNS study object.
Lecture source: DHCP DORA sequence from 10-Network-Protocols.pdf page 94
Original source · 10-Network-Protocols.pdf, p. 94. · Lecture source: DHCP DORA sequence.
Lecture-aligned drill · DNS and DHCPrehearsal target · 3–5 min

DNS: client asks its recursive resolver for www.example.com. On a cache miss, the resolver follows root → .com TLD → authoritative server, obtains A/AAAA data, returns it, and caches it for the TTL.

DHCP DORA: client broadcasts Discover; server sends Offer; client broadcasts Request identifying its choice; server sends Acknowledge with lease parameters. DORA.

Recursive means the resolver returns a final answer for the client; the resolver’s upstream queries are typically iterative referrals. DHCP begins without a configured client IP, hence broadcast discovery/request.

For protocol-sequence questions draw actors and arrows. Put the information carried under each reply: address, TTL, or lease/mask/router/DNS.
DNS cache miss: recursive resolver → root→TLD→authoritative; cache TTL. DHCP: Discover→Offer→Request→Ack.
Lecture-aligned drill · encapsulation and field recognitionrehearsal target · 3–5 min

For an HTTPS request over Ethernet: application data → TCP segment (ports, seq/ack, flags) → IP packet (source/destination logical addresses, next-protocol) → Ethernet frame (source/destination MAC, EtherType) → physical signal. A router replaces the link-layer frame for the next link but forwards the IP packet after decrementing TTL/Hop Limit; NAT may additionally rewrite addresses/ports.

Addresses answer different questions: MAC reaches the next interface on a local link; IP identifies the end-to-end routed destination; port identifies the application endpoint.

When given a packet drawing, write the layer number above each header and identify destination field, length field, and demultiplexing field.
encap: data→TCP/UDP(ports)→IP(addr,proto)→Ethernet(MAC,EtherType)→signal; router rewrites L2 each hop.
⚪ Low priorityEvidence: ICMP type/opcode memorization is explicitly marked not exam-relevant on Network-Protocols p.56; detailed protocol registries and historical minutiae are not exercised.
Strongest evidence · 1 of 1 historical papers

SS23 paper: solve every point

The booklet is historical, not a promise of identical wording. It is still the strongest task-shape evidence available: eight questions, 90 points, exactly 45 OS + 45 Networks. Each answer below is independently generated because no official key was supplied.

QuestionPartPointsWhat the marker can ask you to execute
Q1OS13architecture, timesharing, path, privilege, preemption, process context
Q2OS14Unix file model, permissions/redirection, sed, shell output
Q3OS8first fit, NFU, aging
Q4OS10Round Robin queue trace
Q5Networks10definitions, router/switch, FQDN, torus metrics
Q6Networks12delay types, RTT, transfer throughput
Q7Networks8OSI order/relevance, flow control
Q8Networks15routing/LPM, subnet capacity, UDP/TCP, TCP header fields

Q1 · Operating Systems in General · 13 points

SS23 Question 1 architecture, timesharing and path subparts
Historical source · exam-SS23.pdf, p.2 (Q1a–c; Q1 continues on p.3).
Open original continuation · Q1d–f
SS23 Question 1 privilege, preemption and process-context subparts
Historical source · exam-SS23.pdf, p.3 (Q1d–f).
Independently generated · SS23 Q1 complete answer13 points · 13-minute ceiling

a (2): In a Von Neumann machine, instructions and data share the same memory/bus path; this bandwidth/latency bottleneck limits CPU progress. Harvard architecture separates instruction and data memories/buses, so an instruction fetch and a data access can occur concurrently.

b (4): In timesharing, a preemptive scheduler gives each ready process a short CPU quantum and switches rapidly between them. Many users/programs therefore appear to run concurrently and remain interactive. Programmers can edit, compile, run, and debug directly instead of waiting for a batch job turnaround.

c (1): home/awoelfl/documents/exam.txt is relative because it has no leading /.

d (2): User space runs applications with restricted privilege and isolated address spaces. Kernel space runs trusted OS code with access to hardware and all memory; applications request protected work through system calls.

e (2): Preemptive multitasking lets the OS interrupt a running process, save its CPU context, select another ready process, and restore that process’s context—normally after a timer quantum or higher-priority event.

f (2): Four valid process-context examples are CPU registers including PC/SP, address-space/page-table state, open-file descriptors, and scheduling/credential/accounting state.

Use one cause-and-effect sentence per point-bearing idea. The path classification turns only on the first character. For “process state/context,” name concrete state the kernel must save or track, not vague words such as “the program.”

How to handle the next variant

If the wording changes, classify the mechanism before defining it: architecture bottleneck, resource-sharing policy, path kind, privilege transfer, preemption, or saved process state. The common trap is treating mode switch, context switch, interrupt, and system call as synonyms.

No calculator. Write six labels a…f first. For each 2-point definition, use what it is → why/benefit; for the 4-point item add scheduler mechanism and programmer consequence.
★ Q1: VN shared I/D path; Harvard split. timesharing=preemptive quanta→interactive. relative iff no leading /. user restricted↔kernel privileged. context=regs, address space, FDs, sched/creds.

Q2 · Linux · 14 points

SS23 Question 2 Unix file model and permission scenario
Historical source · exam-SS23.pdf, p.4 (Q2a–b).
Open original continuation · Q2c–d
SS23 Question 2 sed and shell-code subparts
Historical source · exam-SS23.pdf, p.5 (Q2c–d).
Independently generated · SS23 Q2 complete answer14 points · 14-minute ceiling

a (3): Linux exposes regular files, devices, pipes, sockets, and kernel/process information through file-like objects operated on with descriptors and calls such as open, read, and write. Example: writing bytes to /dev/null uses the file interface although the target is a device.

b (5), user alice in groups alice,sudo,osn: i mkfile dir1/f3.txtError: standard Linux has no mkfile command (if touch was intended, directory owner alice has w+x). ii touch dir2/f3.txtSuccess: group osn has rwx on dir2. iii cat f1.shSuccess: owner alice has read permission. iv echo 'exam' > f2.txtError: group alice has read only. v sudo echo 'exam' > f2.txtError: the current shell opens f2.txt before sudo runs echo.

c (3): sed 's/sucks/rocks/g' linux.txt prints Linux rocks..

d (3), literal paper: block 1 is syntactically invalid because Bash parameters are not declared as string s. Blocks 2 and 3 define p but execute print "exam"; Bash therefore reports print: command not found, and neither function body produces output.

Source defect: the code almost certainly intended to call p "exam". Under that intended call, block 2 prints only Today is because $1 is redirected to /dev/null; block 3 prints Today is then 1. Do not substitute that intended version for the literal answer—state both only if the exam source is equally defective.

Permissions are selected once: owner, else matching group, else other. sudo does not retroactively elevate a redirection performed by the parent shell.

How to handle the next variant

For any new permission scenario, never pattern-match the rwx string. Re-run actor → owner/group/other triad → every parent directory x → final directory/file operation. For shell fragments, parse and set up redirections before tracing the command body.

For permissions draw command | object | chosen triad | needed right | result. For code, parse before executing, then resolve each command name. No calculator; write the error cause, not only a checkbox.
★ Q2: choose one u/g/o triad; dir create needs w+x; sudo echo >file fails (shell redirects). sed 's/old/new/g' file. Parse→expand→redirect→execute; undefined command errors.

Q3 · Memory Management · 8 points

SS23 Question 3 first-fit hole diagram
Historical source · exam-SS23.pdf, p.6 (Q3a).
Open original continuation · Q3b–c
SS23 Question 3 NFU and aging subparts
Historical source · exam-SS23.pdf, p.7 (Q3b–c).
Independently generated · SS23 Q3 complete answer8 points · 8-minute ceiling

a (4), first fit: start A=7, B=23, C=12, D=8. P1=15 → B, so B=8. P2=4 → A, so A=3. P3=5 → B, so B=3. P4=3 → A, so A=0. P5=8 → C, so C=4. P1→B, P2→A, P3→B, P4→A, P5→C; final holes A0, B3, C4, D8.

b (2): NFU counters only accumulate references; they do not forget old activity. A page that was hot long ago can keep a high counter and defeat a recently used page indefinitely.

c (2): At each clock interval, shift every counter right and insert the current reference bit R at the most significant bit, then clear R. This aging method weights recent intervals more strongly and lets old references decay.

First fit restarts its scan at A for every process; that is why P4 uses A after P3 reduced B. The modification in c is the standard aging approximation to LRU. The paper says “simulate Least Frequently Used”; record that wording mismatch rather than memorizing it as a new algorithm.

How to handle the next variant

A different allocation algorithm changes only the scan/cursor rule; update the hole immediately after every placement. A different replacement policy changes only the victim state. Keep one row per reference so the marker can award the correct prefix of the trace.

Write the mutable hole row after every placement: A B C D. Cross out the chosen size and write its remainder. For aging, draw an 8-bit counter and one update arrow counter=(counter>>1)|(R<<7).
★ Q3: first fit restarts at first hole; update remainder each placement. NFU stale-history flaw; aging: counter=(counter>>1)|(R<<MSB), then clear R.

Q4 · Scheduling · 10 points

SS23 Question 4 Round Robin process table and trace grid
Historical source · exam-SS23.pdf, p.8 (Q4).
Independently generated · SS23 Q4 complete answer10 points · 10-minute ceiling

q=2; A(0,5), B(1,3), C(2,8), D(3,6).

Gantt: A 0–2 | B 2–4 | C 4–6 | A 6–8 | D 8–10 | B 10–11 | C 11–13 | A 13–14 | D 14–16 | C 16–18 | D 18–20 | C 20–22.

Completion check: A=14, B=11, C=22, D=20; executed CPU time 5+3+8+6=22, matching final time 22 with no idle interval. Schedule verified.

At an exact boundary, this solution enqueues arrivals before requeueing the expired process. Key queue snapshots: t2 [B,C,A], t4 [C,A,D,B], t6 [A,D,B,C]. Every process receives exactly its burst total.

How to handle the next variant

With another quantum or arrival set, the same event loop applies. If arrivals coincide with a quantum boundary, state the enqueue convention. If metrics are requested, derive turnaround, waiting, and response from the finished schedule rather than guessing from the chart.

Use four columns: time | run | ready queue | remaining. Run only min(q,remaining); add arrivals; append an unfinished runner; never draw the Gantt chart from intuition alone.
★ Q4 RR q2: A0-2 B2-4 C4-6 A6-8 D8-10 B10-11 C11-13 A13-14 D14-16 C16-18 D18-20 C20-22.

Q5 · Network Structures · 10 points

SS23 Question 5 torus topology and metric subparts
Historical source · exam-SS23.pdf, p.10 (Q5d; Q5a–c are on p.9).
3×3 torus · C₃ × C₃ Cartesian productteal = row links · amber = column links · curves are wrap-around edges9 nodes · degree 4 · regular · diameter 2 · connectivity 4Fast hand version: draw a 3×3 grid, then one wrap edge for every row and every column.
Original reconstruction of the expected topology reasoning. Every row and column is a 3-cycle, so each node has two row neighbours and two column neighbours.
Independently generated · SS23 Q5 complete answer10 points · 10-minute ceiling

a: A computer network is a set of autonomous devices connected by communication links and protocols so they can exchange data and share resources.

b: A switch forwards frames inside a LAN using link-layer MAC addresses; a router forwards packets between IP networks using network-layer addresses and a routing table.

c: In my.th-deg.de., my is the host/subdomain label, th-deg the registered second-level domain, de the top-level domain, and the final implicit dot the DNS root.

d: The graph is a 3×3 torus. i diameter=2. ii connectivity=4. iii It is regular because every node has degree 4. iv A dual ring connects each node only to adjacent ring neighbours, giving a simpler physical layout/expansion and fewer distinct neighbours to cable than the torus while retaining an alternate direction.

In C₃ □ C₃, any row coordinate differs by at most one hop and any column coordinate by at most one hop, so the farthest pair is two hops apart. The minimum degree is 4, and removing fewer than four nodes cannot isolate a vertex; the graph’s vertex connectivity is 4.

How to handle the next variant

For an unfamiliar topology, convert it to a graph and calculate degree, shortest paths, diameter, and a concrete cut set. For a router/switch comparison, name the layer, address used, and whether forwarding stays inside or crosses IP networks.

For a topology: count V and every node’s degree; run shortest paths from one symmetry class; justify regularity with the equal degree; give one concrete cost/reliability comparison. Draw the 3×3 grid before wrap links.
★ Q5: router=L3/IP/inter-network; switch=L2/MAC/LAN. FQDN host.second-level.TLD.(root). 3×3 torus: n9, degree4, diameter2, connectivity4, regular.

Q6 · Network Performance · 12 points

SS23 Question 6 delay types and RTT values
Historical source · exam-SS23.pdf, p.11 (Q6a–b.i).
Open original continuation · Q6b.ii
SS23 Question 6 throughput subpart
Historical source · exam-SS23.pdf, p.12 (Q6b.ii).
Independently generated · SS23 Q6 complete answer12 points · 12-minute ceiling

a (2): propagation delay = signal travel time; transmission delay = time to place all packet bits on the link; processing delay = header/error/routing work at a device; queuing delay = waiting behind earlier traffic.

b.i (4): d=5 km, v=20 km/ms, tgen=1 ms, tput=1 ms. tprop=d/v = 5/20=0.25 ms. One way = 1+1+0.25=2.25 ms. RTT=2·one-wayRTT=4.5 ms.

b.ii (6), decimal MB: D=50 MB=400 Mbit, B=1 Gbit/s. Serialization D/B = 400 Mbit / 1000 Mbit/s = 0.400 s. Total transfer time = 0.400+0.0045=0.4045 s. throughput=D/(RTT+D/B) = 400 Mbit / 0.4045 s = 988.9 Mbit/s.

Units are the main marking trap: convert 50 MB to 400 Mbit and 4.5 ms to 0.0045 s before the final division. The result must be slightly below the 1 Gbit/s link rate; 988.9 Mbit/s passes that sanity check.

How to handle the next variant

For different numbers of hops, build a one-way delay ledger and count each serialization/propagation/processing term explicitly. If the return is not symmetric, compute it separately. Throughput always uses useful bits divided by the complete elapsed time.

fx-991CW: Calculate → 5÷20; then 2×(1+1+Ans). For throughput enter (50×8)÷(0.0045+(50×8)÷1000) in Mbit/Mbit·s⁻¹ units. On paper still write every conversion and the denominator.
★ Q6: tprop=d/v; RTT=2(tgen+tput+tprop)=4.5ms. 50MB=400Mbit; T=.0045+.4=.4045s; TP=400/.4045=988.9Mbit/s.

Q7 · Reference Models · 8 points

SS23 Question 7 OSI and flow-control subparts
Historical source · exam-SS23.pdf, p.13 (Q7).
Independently generated · SS23 Q7 complete answer8 points · 8-minute ceiling

a: descending OSI order: Application → Presentation → Session → Transport → Network → Data Link → Physical.

b: Presentation and Session are the least distinct in common Internet stacks because their formatting/encryption and dialog functions are usually implemented inside applications/libraries rather than separate layers.

c: Flow control prevents a fast sender from overrunning a slower receiver by limiting outstanding/unacknowledged data according to receiver capacity, for example TCP’s advertised receive window. It is a Transport-layer (L4) function in the OSI model.

Do not confuse flow control (protect receiver) with congestion control (protect network). “Presentation and Session are irrelevant” is too absolute; say their functions still exist but are not usually separate practical layers.

How to handle the next variant

Map a function to the object it manipulates: signal, frame, packet, segment, or application data. If asked about flow versus congestion control, say who is protected: receiver versus network.

Write 7→1 down the margin, then fill names. For a layer function answer problem prevented → mechanism → layer.
★ Q7: App,Pres,Session,Transport,Network,DataLink,Physical. Pres/Session functions folded into apps. Flow control protects receiver via window at L4.

Q8 · Network Protocols · 15 points

SS23 Question 8 routing diagram
Historical source · exam-SS23.pdf, p.14 (Q8a.i).
Open original continuation · Q8a.ii–c
SS23 Question 8 next hop subnet and UDP TCP subparts
Historical source · exam-SS23.pdf, p.15 (Q8a.ii–c).
Open original continuation · Q8d TCP header
SS23 Question 8 TCP header bit index and reassembly fields
Historical source · exam-SS23.pdf, p.16 (Q8d).
Independently generated · SS23 Q8 complete answer15 points · 15-minute ceiling

a.i (7), routing table for R:

DestinationNext hop
207.10.100.0/24direct, left interface
128.1.0.0/16direct, right interface
32.20.0.0/16207.10.100.9
32.0.0.0/8207.10.100.8
48.0.0.0/8128.1.0.10
0.0.0.0/0128.1.0.11

a.ii (2), longest prefix: 32.20.18.55 → 207.10.100.9 because /16 beats /8. 207.10.101.1 → 128.1.0.11 because it is outside local 207.10.100.0/24 and only /0 matches.

b (1): usable=2^(32−p)−2 = 2¹¹−2 = 2046 hosts.

c (2): UDP is connectionless, message-oriented, and offers no built-in delivery, order, retransmission, flow, or congestion control. TCP establishes a connection and provides a reliable ordered byte stream with retransmission plus flow/congestion control.

d.i (1): data offset occupies bits 96–99, four reserved bits occupy 100–103, then flags CWR104, ECE105, URG106, ACK107, PSH108, RST109, SYN110, FIN111.

d.ii (2): Sequence Number is the byte-position counter used to order received payload for reassembly; Acknowledgement Number is the cumulative counter identifying the next byte expected/received progress.

Build routes from the drawing before evaluating destinations. Direct networks belong in the table. For each lookup, list every match and choose the largest prefix. The TCP bit index is not memorized blindly: add field widths from bit 0.

How to handle the next variant

For any routing diagram, build connected routes first, then remote routes, then default; lookup is a separate longest-prefix step. For any header bit interval, sum all earlier field widths and report the inclusive zero-based range. For ACK arithmetic, count bytes and remember SYN/FIN consume one.

fx-991CW /21: Calculate → 2^11−2. Routing is by hand: destination | matching prefixes | longest | next hop. TCP bit: write cumulative boundaries 0,16,32,64,96,100,104, then count flags.
★ Q8: routes /16→.9, /8→.8, 48/8→128.1.0.10, /0→128.1.0.11. /21=2046. TCP flags 104..111 ⇒ SYN=110; seq orders bytes, ACK=next expected.
Small tools · use under time pressure

Exam execution toolkit

One answer stencil

  1. Name the method/rule.
  2. Expose queue, table, formula, or field boundary.
  3. Substitute values with units.
  4. Box the requested result.
  5. Check one invariant.

This is the instructor’s partial-credit contract turned into a repeatable paper move.

90-point clock

Scan and label all eight archetypes first. Use roughly one minute per point as a ceiling; short definitions should bank time for Q2/Q4/Q6/Q8. At 45 minutes, switch parts even if one answer is unfinished; leave a route/table/formula so partial credit remains possible.

Last 5 minutes: units · prefixes · every subpart labelled

Trace invariant

Scheduling total executed burst = final busy time. Memory allocations never exceed a hole. Page frames contain at most the frame count.

Network invariant

Throughput ≤ bottleneck rate. Longest prefix wins. Network address aligned; host count positive. TCP ACK is next expected byte.

Calculator boundary

Use the fx-991CW for arithmetic, powers, Base-N and means. The paper must still contain the formula, conversion, intermediate, and unit.

Compact glossary · open only when a term stalls
context switchsave one process’s CPU state and restore another’spreemptionOS forcibly stops a runner so another can run
inodefile metadata and block pointers; name lives in directoryworking setpages actively needed during a recent interval
page faulttrap because referenced page is not presently usablejittervariation in delay; this course uses mean absolute deviation
diameterlargest shortest-path distanceconnectivityminimum removals required to disconnect the graph
FQDNcomplete hierarchical DNS name, conceptually ending at rootflow controlprevents sender overrunning receiver
congestion controlreduces load to protect the networkLPMchoose matching route with most prefix bits
RTTtime from send to corresponding response/ack returnBDPbits simultaneously in flight = bandwidth × RTT
Source-to-lesson map · 31 PDFs / 540 pages

Use this as a reference trail, not a second study route.

SourceUsed inPurpose
00-Menti-Survey-Results.pdfexplanation levelbaseline misconceptions and vocabulary calibration
01-Introduction.pdfLesson 1, Q1architecture, modes, calls, interrupts
02-Excerpt…History-of-Operating-Systems.pdfLesson 1 contexthistory only; low priority
03-Processes.pdfLessons 1–2, Q1/Q4states, scheduling, context
04-File-System.pdfLessons 3–4, Q2paths, permissions, inodes, allocation
05-Memory-Management.pdfLesson 5, Q3fit, paging, replacement
06-Introduction-to-Networks.pdfLesson 6packet/circuit switching
07-Network-Performance.pdfLesson 6, Q6delay, RTT, throughput, jitter
08-Network-Topologies.pdfLesson 7, Q5graph metrics and topology trade-offs
09-Reference-Models.pdfLesson 7, Q7OSI functions and mapping
10-Network-Protocols.pdfLessons 8–10, Q5/Q8link, IP, routing, TCP/UDP, DNS/DHCP
sheet01.pdfLesson 1VM setup limitation and architecture
sheet02.pdfLesson 1latency and OS concepts
sheet03.pdfLessons 1/3process model and shell commands
sheet04-scheduling_template.pdfLesson 2paper trace layout
sheet04.pdfLesson 2, Q4four scheduling algorithms
sheet05-collab-proj-env_class-ex.pdfLesson 3group directories and permissions
sheet05.pdfLesson 3, Q2paths, permissions, commands
sheet06.pdfLesson 4disk/SSD, bitmap, inode mechanics
sheet07.pdfLesson 5, Q3EAT, allocation, page replacement
sheet08-shell-script.pdfLesson 3, Q2branch/loop/function output
sheet08.pdfLesson 5context-switch EAT
sheet09.pdfLesson 6switching wait calculations
sheet10.pdfLesson 6, Q6RTT, BDP, throughput, jitter
sheet10_notes.pdfLesson 6supplied working; BDP discrepancy flagged
sheet11.pdfLesson 7, Q5/Q7fat tree, graph metrics, OSI
sheet12.pdfLesson 8signalling, line-code drawings, MAC
sheet13.pdfLesson 9, Q8binary, IP, VLSM
sheet13-solution.pdfLesson 9supplied answers independently simulated
sheet14.pdfLessons 9–10, Q8routing, TCP, DNS, DHCP
exam-SS23.pdfbriefing + Q1–Q8strongest archetype and point evidence
Known source discrepancies · do not inherit these mistakes
  • SS23 Q2d: functions are named p but calls say print; literal and likely intended answers are separated above.
  • SS23 Q3c: the stated “Least Frequently Used” target conflicts with the standard aging approximation to LRU.
  • Sheet 10 notes p.4: the handwritten BDP working double-counts the round trip; use BDP=B×RTT, never another ×2.
  • SS23 answer key: none supplied; historical answers in this book are independent and verified by invariants/code where feasible.
  • Aids: the old cover’s supplies field is blank; current user-confirmed one-sided A4 + fx-991CW rule governs preparation.
Chapter completeness · Network Protocols pp. 100–102

The full protocol-field and application safety net

🟠 Exam-practicalEvidence: 10-Network-Protocols.pdf summaries pp.100–102 require field purposes/bit locations, end-to-end challenges, TCP establishment/termination, DNS diagrams and reverse resolution; taught ICMP, PMTUD, NAT and DHCP fields are therefore in scope.
Lecture competency drill · locate and explain protocol fieldsrehearsal target · 3–5 min

Bit interval: add widths of every earlier field; for width w, the field is [start,start+w−1]. Ethernet II: destination MAC, source MAC, EtherType, payload, FCS. IPv4: Version/IHL, DS, total length, identification, flags/fragment offset, TTL, Protocol, checksum, source, destination. ICMP: Type, Code, checksum and message-specific data. UDP: source port, destination port, length, checksum. TCP: ports, Sequence, Acknowledgement, data offset, flags, window, checksum, urgent pointer, options. DHCP: op, transaction ID, flags, CIADDR/YIADDR/SIADDR/GIADDR, client hardware address and options.

A field answer needs purpose, not only a label: a length gives a boundary; a checksum detects corruption; an address/port identifies an endpoint; a next-protocol field demultiplexes; sequence/ack/window fields create reliable flow.

Write cumulative boundaries above the supplied header, starting at 0. Check that the final boundary equals the row width. For “identify field” questions, answer name → width/location → purpose.
locate field: start=sum earlier widths; interval=[start,start+w−1]. Eth dst/src/type/data/FCS. IPv4 V/IHL/Len/ID/frag/TTL/proto/check/src/dst. ICMP type/code/check. UDP ports/len/check. TCP ports/seq/ack/off/flags/win/check/urgent. DHCP op/xid/flags/ci/yi/si/gi/chaddr/options.
Lecture competency drill · PMTUD, NAT and TCP closerehearsal target · 3–5 min

PMTUD: send with DF set; a router that cannot forward at its MTU drops the packet and returns ICMP Fragmentation Needed; the sender reduces packet size. NAT: rewrite a private address/port to a public address/port and keep a translation table; this conserves addresses but breaks simple end-to-end reachability and complicates unsolicited inbound traffic.

TCP close: FIN consumes one sequence number. One side sends FIN seq=x; the peer ACKs x+1, later sends FIN seq=y, and the active closer ACKs y+1 and waits in TIME_WAIT so delayed segments cannot corrupt a new connection.

ICMP is network control/error reporting, not a transport protocol. NAT may also rewrite transport checksums because the pseudo-header/ports change. TCP close is normally four logical steps because each direction closes independently.

Draw actors and arrows. For PMTUD label DF, router MTU and ICMP reply. For NAT draw inside tuple ↔ public tuple. For TCP label every flag, seq, ack and the state that remains open.
PMTUD: DF packet too big→drop+ICMP Frag Needed→smaller send. NAT table privateIP:port↔publicIP:port; breaks inbound/end-to-end. close: FIN x→ACK x+1; peer FIN y→ACK y+1; FIN consumes1; active closer TIME_WAIT.
Lecture competency drill · DNS records, reverse lookup and DHCP fieldsrehearsal target · 3–5 min

DNS records: A=IPv4, AAAA=IPv6, CNAME=alias, MX=mail exchanger, NS=authoritative nameserver, PTR=reverse name. For IPv4 reverse lookup, reverse octets and append in-addr.arpa; e.g. 192.0.2.7 → 7.2.0.192.in-addr.arpa → PTR.

Remote query: client → recursive resolver; on a miss the resolver follows root → TLD → authoritative, returns the record and caches it for TTL. DHCP: DORA carries a transaction ID and client hardware identity; the acknowledged options supply lease, mask, router and DNS.

CNAME points to another name, not directly to an address. A recursive resolver returns the final answer to the client; its upstream exchanges are commonly iterative referrals.

Draw four DNS actors and arrows; write the referral/record under each response. For DHCP draw client/server lifelines and label Discover, Offer, Request, Ack plus address/lease options.
DNS A v4, AAAA v6, CNAME alias, MX mail, NS authority, PTR reverse; IPv4 reverse octets+.in-addr.arpa. resolver cache miss→root→TLD→auth; TTL. DHCP DORA with xid/chaddr; ACK options lease/mask/router/DNS.
Last closed-book page

Final recall: reproduce, then compare

On blank paper, write or draw the following without looking. Any item that stalls for more than 20 seconds becomes the first review target—not a reason to reread everything.

Operating systems

  • Q1’s six compact definitions/context examples.
  • Q2’s five permission/redirection outcomes and sed.
  • RR q=2 schedule ending at t=22 with queue snapshots.
  • First-fit sequence B,A,B,A,C and aging update.
  • HDD/SSD access-time decomposition.
  • Cold path-to-inode walk.
  • 4 KiB hex translation; FIFO vs LRU.

Networks

  • Q6: 4.5 ms, 0.4045 s, 988.9 Mbit/s.
  • Torus: degree/connectivity 4, diameter 2.
  • OSI 7→1; flow control protects receiver at L4.
  • 00101111 in three line codes.
  • /21 = 2046 usable hosts.
  • Routing table then longest-prefix lookup.
  • TCP SYN bit 110 and two reassembly counters.
  • DNS hierarchy and DHCP DORA.
Confirmed exam writing contract: make the route to the solution understandable and omit only the most obvious steps. State the method, show substitutions/intermediates with units, box the final answer, and add one quick invariant. This is how a wrong final computation can still earn partial credit.