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.
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.
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.
Dated instructor briefing · 21 July 2026
| Question | Verdict | What it changes tonight |
|---|---|---|
| Shell scripting? | IN | Q2 is a 14-point historical archetype; practise permissions, redirection, sed, and literal code output. |
| TCP, DNS, DHCP? | IN | TCP 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 OUT | Use ◇ only as “drop first if time collapses,” never as “not examinable.” |
| How much working? | METHOD VISIBLE | Name rule → show state/substitution → intermediate → boxed result + unit/check. |
Instructor guidance on scope and working
Retake exam: no new content and no shift in topic weighting - the scope is everything covered during the WT25/26 lectures. On working and justification: show enough for a reader to follow how you reached your solution, leaving out only the most obvious steps. That protects partial credit even when the final computation step goes wrong.
Exact priority order when OSN study starts
- Q8 · routing/subnet/TCP
Lesson 9–10 + historical solution15 pt - Q2 · Linux/permissions/shell
Lesson 3 + literal source-defect handling14 pt - Q1 · OS concepts
Lesson 1 + compact definitions13 pt - Q6 · delay/throughput
Lesson 6 + units/checks12 pt - Q4 then Q5 · RR and topology/models10 + 10
- Q3 then Q7 · memory and OSI/flow8 + 8
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.
| Block | Must do on paper | Do if time remains | Safe 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. |
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.
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.
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
Synchronous and requested by the running program: read, open, fork. User mode → kernel mode → usually back to the same process.
Asynchronous to the current instruction stream: a timer or device signals the CPU. The kernel saves a minimal context and runs a handler.
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.
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.
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/f ⇒ TCPU = 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.
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.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 -l → 29 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.
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.
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.
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.
trigger | saved state | kernel work | return. On paper, label user/kernel boundary and state whether another process is selected.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.
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.
The paper algorithm that prevents almost every error
- Write
time | running | ready queue | remaining. - If the queue is empty, jump time to the next arrival and enqueue it.
- Choose by the algorithm. Run only until the next event the algorithm cares about.
- Subtract executed time. Add all arrivals at the event timestamp.
- For RR, requeue the unfinished process after same-time arrivals under the course convention.
- 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.
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.”
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.
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.
time | running | ready queue | remaining. Update arrivals before requeueing a process at the same timestamp; box the convention.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.
larger number = higher and RR within equal level. That protects the answer from an otherwise ambiguous convention.IPC, synchronization and the remaining schedulers
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.
method | direction | local/remote | payload | synchronization. For a race trace, show the read–modify–write steps of both processes and the broken invariant.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.
time | running | ready(rem) | event. At every arrival, compare the newcomer’s remaining time with the runner’s remaining time.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.
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.
Permission checks are a decision tree
- Identify the acting user and supplementary groups.
- Select exactly one triad: owner if UID matches; otherwise group if any owning group matches; otherwise other. Linux does not combine triads.
- For every parent directory in a path, require
xto traverse it. - For the final operation, check the right on the relevant object: file content rights for reading/writing a file; directory
w+xfor creating, deleting, or renaming entries.
List entry names. It does not by itself let you access an entry.
Modify the directory’s name→inode mapping; normally useful only together with 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.
/ 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.w+x; traverse needs x; shell redirection happens before sudo; sed 's/old/new/g' file replaces every occurrence on each line.file = named data container; path = route through directories; filesystem = on-disk organization; VFS = unified tree over mounted filesystems; root =
/; buffer = temporary transfer memory.directory: r=list · w=create/delete/rename · x=traverse
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.
| Command | Result | Decisive check |
|---|---|---|
mkdir dir1/d3 | fail | alice is in group osn, but dir1 group has r-x, no w. |
mkdir dir2/d3 | success | dir2 group has rwx. |
mkfile dir2/f3.txt | fail | mkfile is not a standard Ubuntu command. |
touch dir2/f3.txt | success | w+x on dir2 permits creation. |
touch /dir2/f3.txt | fail | absolute /dir2 is not the shown directory. |
cat /tmp/mock/f1.sh | success | alice owns f1.sh and has r. |
cat f1.sh | success | same inode via current directory. |
echo exam > f2.txt | fail | alice matches group alice, which has r--, no w. |
sudo echo exam > f2.txt | fail | the 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.
identity → matching triad → target permission → parent directories. For redirection, evaluate who opens the file: the shell.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.
ls -ld/ls -la.#!/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.
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.
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.
Allocation strategies express the same trade-off as data structures
Fast sequential and random access; simple start+offset. Growth is awkward and external fragmentation appears.
Easy growth and no external fragmentation; following pointers makes random access slow and pointers cost space.
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
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.
SSD time = request latencies + bytes/rate
blocks = ⌈file size / block size⌉
superblock → root inode → root directory data → next inode → next directory data … → target inode. Cache hits can remove physical reads; state the cold-cache assumption.
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.
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.
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.| After action | Bitmap (blocks 0…15) |
|---|---|
| A already present | 1111 1110 0000 0000 |
| write B, 5 blocks | 1111 1111 1111 0000 |
| delete A | 1000 0001 1111 0000 |
| write C, 8 blocks | 1111 1111 1111 1100 |
| delete B | 1111 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.
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.
1000×60×60×24. On paper keep the read and write costs separate until the final line.Links, mounting and allocation choices
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.
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.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.
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.
Address translation by hand
- From page size, determine offset bits. For 4 KiB, offset = 12 bits = last three hexadecimal digits.
- Split virtual address into virtual page number and offset.
- Index the page table; inspect present/valid and access permissions.
- If resident and permitted, replace the page number with the frame number and preserve the offset unchanged.
- 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.”
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.
VA = page·page_size + offset
PA = frame·page_size + offset
1 bounds/page index → 2 present? no = page fault → 3 permission? no = protection fault → 4 substitute frame + unchanged offset.
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.
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.| Algorithm | P1 12 MB | P2 10 MB | P3 9 MB |
|---|---|---|---|
| first fit | C20→8 | A10→0 | D18→9 |
| next fit | C20→8 | D18→8 | F9→0 |
| best fit | G12→0 | A10→0 | F9→0 |
| worst fit | C20→8 | D18→8 | H15→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.
T3a: 2048 < 8192, so valid; PA = 16384+2048 = 18432 = 0x4800. T3b: 10000 ≥ limit 8192 → bounds fault.
| Access | Decision | Physical address |
|---|---|---|
| read 0x1A00 | page 1 present; RW allows read | 0xCA00 |
| read 0x2500 | page 2 absent | page fault |
| write 0x3100 | page 3 present; RW | 0x8100 |
| execute 0x6200 | page 6 present but R only | protection 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.
| reference | 0 | 1 | 7 | 2 | 3 | 2 | 7 | 1 | 0 | 3 |
|---|---|---|---|---|---|---|---|---|---|---|
| FIFO frames | 0--- | 01-- | 017- | 0172 | 3172 | 3172 | 3172 | 3172 | 3072 | 3072 |
| fault? | F | F | F | F | F | – | – | – | F | – |
| LRU frames | 0--- | 01-- | 017- | 0172 | 3172 | 3172 | 3172 | 3172 | 0172 | 0173 |
| fault? | F | F | F | F | F | – | – | – | F | F |
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.
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.
Replacement benchmarks and process memory layout
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.
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.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.
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.
Use a delay ledger
| Term | Formula/source | Count it when | Classic error |
|---|---|---|---|
| Generation | given by problem | host must create the packet | silently treating it as transmission |
| Transmission | bits / bit·s⁻¹ | for each link that serializes the packet under the model | bytes not converted to bits |
| Propagation | distance / speed | for each physical path | multiplying instead of dividing |
| Processing/queue | given or inferred | at stated devices | inventing 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
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.
BDP = bandwidth × RTT · throughput = D / (RTT + D/B)
jitter (course) = (1/n) Σ|xi−x̄|
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.
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.
100×10^6×45×10^-3÷(1518×8) → 370.55. Round down only because the question asks complete packets before the ACK.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.
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.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.
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 standard | Theoretical headline rate | Typical field |
|---|---|---|
| Wi‑Fi 7 / IEEE 802.11be | ≈46 Gbit/s with the full multi-stream configuration | local wireless LAN |
| Bluetooth Core 5.4 | 3 Mbit/s BR/EDR; 2 Mbit/s LE 2M PHY | peripherals, audio, low-power IoT |
| 5G / ITU IMT‑2020 + 3GPP NR | 20 Gbit/s down, 10 Gbit/s up under ideal peak conditions | mobile broadband, URLLC, massive IoT |
| twisted-pair copper / IEEE 802.3bq 40GBASE‑T | 40 Gbit/s over up to 30 m | LAN/data-centre short links |
| optical fiber / IEEE 802.3df‑2024 | 800 Gbit/s Ethernet | data-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.
Network types, devices and loss
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.
layer | identifier | scope | action.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.
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.
Short paths and simple expansion; central device is a bottleneck/single failure point.
Degree two and predictable wiring; a break harms a single ring, while a counter-rotating dual ring gives an alternate direction.
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?”
| Layer | Object/function | Anchor examples |
|---|---|---|
| 7 Application | user-visible protocol semantics | HTTP, DNS, DHCP |
| 6 Presentation | representation, encoding, compression, encryption | TLS/serialization as practical functions |
| 5 Session | dialog/session coordination | checkpoints, session control |
| 4 Transport | process-to-process delivery, ports, reliability/flow | TCP, UDP |
| 3 Network | routed logical addressing | IP, routers |
| 2 Data link | local-link frames and MAC access/addressing | Ethernet, switches |
| 1 Physical | signals and bit transmission | copper, 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.
diameter = max shortest-path length
connectivity = min removals to disconnect
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.
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.
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.
| # | Layer | Reason |
|---|---|---|
| 1 | Physical | electrical signal |
| 2 | Transport | segmentation |
| 3 | Session | establish/terminate dialog |
| 4 | Application | HTTP request |
| 5 | Transport | port identifies application |
| 6 | Transport | end-to-end ordering |
| 7 | Data link | MAC address |
| 8 | Network | IP/logical address |
| 9 | Data link | framing for medium |
| 10 | Presentation | encryption |
| 11 | Transport | end-to-end loss/duplicate recovery |
| 12 | Network | next-hop routing |
| 13 | Physical | bits ready for signal |
| 14 | Transport | end-to-end flow control |
| 15 | Data link | EtherType-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.
Topology sketches, service models and TCP/IP mapping
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.
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.
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.
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.
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
- Copy the bit string and draw equal-width cells.
- Write the convention: e.g. Manchester 0 = low→high, 1 = high→low.
- Draw the mid-cell transition for every Manchester bit and any boundary transition implied by adjacent cells.
- For 4B/5B, split into nibbles, show each table lookup, concatenate, and label it encoded bits—not voltage.
digital signal, synchronization, simplex/half/full duplex, modulation, differential pair, NRZ-L, Manchester, 4B/5B, PAM.
frames, source/destination MAC, EtherType, error detection, link flow control, media access. Switches learn/forward at L2.
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.
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.
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.
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.
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.
The changing-octet shortcut
- Convert the prefix to a dotted mask or identify the octet where network bits stop.
- Block size = 256 − mask value in that octet.
- Find the greatest block multiple not exceeding the IP octet: that is the network boundary.
- Broadcast boundary = network + block − 1; earlier octets stay fixed and later octets become 255.
- Write network, broadcast, and usable range separately.
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
- Include directly connected networks and a default route if supplied.
- For the destination, test every row:
(IP AND mask) == network. - Among all matches, choose the largest prefix length.
- 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.
addresses=2^h · usable=2^h−2
block size=2^(8−prefix bits in changing octet)
network=IP AND mask
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.
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.
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.
| Need | Host bits | Allocation | Range |
|---|---|---|---|
| A 500 | 9 → /23 | 192.168.0.0/23 | .0.0–.1.255 |
| B 100 | 7 → /25 | 192.168.2.0/25 | .2.0–.2.127 |
| C 50 | 6 → /26 | 192.168.2.128/26 | .2.128–.2.191 |
| D 10 | 4 → /28 | 192.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.
| Purpose | 2× hosts | Reverse index offset | Subnet |
|---|---|---|---|
| Professor offices | 48 | 0 | 10.112.32.0/26 |
| Deep Learning | 60 | 512 | 10.112.34.0/26 |
| HPC/Graphics | 56 | 256 | 10.112.33.0/26 |
| Network Lab | 74 | 768 | 10.112.35.0/25 |
| Seminar | 4 | 128 | 10.112.32.128/29 |
| Server IT | 12 | 640 | 10.112.34.128/28 |
| Server Intelligent Networks | 28 | 384 | 10.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.
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.
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.
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.
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.
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.
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.
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.
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.
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 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.
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.
| Question | Part | Points | What the marker can ask you to execute |
|---|---|---|---|
| Q1 | OS | 13 | architecture, timesharing, path, privilege, preemption, process context |
| Q2 | OS | 14 | Unix file model, permissions/redirection, sed, shell output |
| Q3 | OS | 8 | first fit, NFU, aging |
| Q4 | OS | 10 | Round Robin queue trace |
| Q5 | Networks | 10 | definitions, router/switch, FQDN, torus metrics |
| Q6 | Networks | 12 | delay types, RTT, transfer throughput |
| Q7 | Networks | 8 | OSI order/relevance, flow control |
| Q8 | Networks | 15 | routing/LPM, subnet capacity, UDP/TCP, TCP header fields |
Q1 · Operating Systems in General · 13 points
Open original continuation · Q1d–f
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.”
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.
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.Q2 · Linux · 14 points
Open original continuation · Q2c–d
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.txt → Error: standard Linux has no mkfile command (if touch was intended, directory owner alice has w+x). ii touch dir2/f3.txt → Success: group osn has rwx on dir2. iii cat f1.sh → Success: owner alice has read permission. iv echo 'exam' > f2.txt → Error: group alice has read only. v sudo echo 'exam' > f2.txt → Error: 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.
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.
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.Q3 · Memory Management · 8 points
Open original continuation · Q3b–c
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.
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.
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).Q4 · Scheduling · 10 points
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.
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.
time | run | ready queue | remaining. Run only min(q,remaining); add arrivals; append an unfinished runner; never draw the Gantt chart from intuition alone.Q5 · Network Structures · 10 points
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.
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.
Q6 · Network Performance · 12 points
Open original continuation · Q6b.ii
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-way → RTT=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.
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.
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.Q7 · Reference Models · 8 points
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.
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.
problem prevented → mechanism → layer.Q8 · Network Protocols · 15 points
Open original continuation · Q8a.ii–c
Open original continuation · Q8d TCP header
a.i (7), routing table for R:
| Destination | Next hop |
|---|---|
| 207.10.100.0/24 | direct, left interface |
| 128.1.0.0/16 | direct, right interface |
| 32.20.0.0/16 | 207.10.100.9 |
| 32.0.0.0/8 | 207.10.100.8 |
| 48.0.0.0/8 | 128.1.0.10 |
| 0.0.0.0/0 | 128.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.
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.
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.Exam execution toolkit
One answer stencil
- Name the method/rule.
- Expose queue, table, formula, or field boundary.
- Substitute values with units.
- Box the requested result.
- 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 switch | save one process’s CPU state and restore another’s | preemption | OS forcibly stops a runner so another can run |
|---|---|---|---|
| inode | file metadata and block pointers; name lives in directory | working set | pages actively needed during a recent interval |
| page fault | trap because referenced page is not presently usable | jitter | variation in delay; this course uses mean absolute deviation |
| diameter | largest shortest-path distance | connectivity | minimum removals required to disconnect the graph |
| FQDN | complete hierarchical DNS name, conceptually ending at root | flow control | prevents sender overrunning receiver |
| congestion control | reduces load to protect the network | LPM | choose matching route with most prefix bits |
| RTT | time from send to corresponding response/ack return | BDP | bits simultaneously in flight = bandwidth × RTT |
Source-to-lesson map · 31 PDFs / 540 pages
Use this as a reference trail, not a second study route.
| Source | Used in | Purpose |
|---|---|---|
| 00-Menti-Survey-Results.pdf | explanation level | baseline misconceptions and vocabulary calibration |
| 01-Introduction.pdf | Lesson 1, Q1 | architecture, modes, calls, interrupts |
| 02-Excerpt…History-of-Operating-Systems.pdf | Lesson 1 context | history only; low priority |
| 03-Processes.pdf | Lessons 1–2, Q1/Q4 | states, scheduling, context |
| 04-File-System.pdf | Lessons 3–4, Q2 | paths, permissions, inodes, allocation |
| 05-Memory-Management.pdf | Lesson 5, Q3 | fit, paging, replacement |
| 06-Introduction-to-Networks.pdf | Lesson 6 | packet/circuit switching |
| 07-Network-Performance.pdf | Lesson 6, Q6 | delay, RTT, throughput, jitter |
| 08-Network-Topologies.pdf | Lesson 7, Q5 | graph metrics and topology trade-offs |
| 09-Reference-Models.pdf | Lesson 7, Q7 | OSI functions and mapping |
| 10-Network-Protocols.pdf | Lessons 8–10, Q5/Q8 | link, IP, routing, TCP/UDP, DNS/DHCP |
| sheet01.pdf | Lesson 1 | VM setup limitation and architecture |
| sheet02.pdf | Lesson 1 | latency and OS concepts |
| sheet03.pdf | Lessons 1/3 | process model and shell commands |
| sheet04-scheduling_template.pdf | Lesson 2 | paper trace layout |
| sheet04.pdf | Lesson 2, Q4 | four scheduling algorithms |
| sheet05-collab-proj-env_class-ex.pdf | Lesson 3 | group directories and permissions |
| sheet05.pdf | Lesson 3, Q2 | paths, permissions, commands |
| sheet06.pdf | Lesson 4 | disk/SSD, bitmap, inode mechanics |
| sheet07.pdf | Lesson 5, Q3 | EAT, allocation, page replacement |
| sheet08-shell-script.pdf | Lesson 3, Q2 | branch/loop/function output |
| sheet08.pdf | Lesson 5 | context-switch EAT |
| sheet09.pdf | Lesson 6 | switching wait calculations |
| sheet10.pdf | Lesson 6, Q6 | RTT, BDP, throughput, jitter |
| sheet10_notes.pdf | Lesson 6 | supplied working; BDP discrepancy flagged |
| sheet11.pdf | Lesson 7, Q5/Q7 | fat tree, graph metrics, OSI |
| sheet12.pdf | Lesson 8 | signalling, line-code drawings, MAC |
| sheet13.pdf | Lesson 9, Q8 | binary, IP, VLSM |
| sheet13-solution.pdf | Lesson 9 | supplied answers independently simulated |
| sheet14.pdf | Lessons 9–10, Q8 | routing, TCP, DNS, DHCP |
| exam-SS23.pdf | briefing + Q1–Q8 | strongest archetype and point evidence |
Known source discrepancies · do not inherit these mistakes
- SS23 Q2d: functions are named
pbut calls sayprint; 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.
The full protocol-field and application safety net
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.
name → width/location → purpose.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.
inside tuple ↔ public tuple. For TCP label every flag, seq, ack and the state that remains open.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.
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.