Skip to content

Undervisningsplan

Uke 34

Course intro, SkyHiGh, Linux and C-programming
Lab tutorials

Denne første uken er det om å gjøre å komme igang med Linux og C-programmering, se "Lab tutorials"-linken over for hva du bør gjøre, og se denne videoen hvis du ikke har satt opp en virtuell maskin i SkyHiGh før: video lecture (note: the yaml-file to use is not correct in the video, use the one called single_linux.yaml instead of single_linux_20.04.yaml).

Uke 35

Computer architecture (compendia chp 1, potensregning)
ALU, CU, I/O, bus, MMU, controller, firmware, bit vs Byte, data vs instruction, instruction set, micro architecture, register, AX/BX/CX/DX/SP/BP/IP/IR/FLAG/PSW, address, interrupt, interrupt handler/routine, stack/push/pop, context switch, assembly directive/label, clock-speed/frequency/period, Hz, pipeline, micro-operations, out-of-order execution, branch prediction, superscalar, SMT/hyperthreading, von Neumann-bottle neck, spatial/temporal locality, cache line, write through/back cache
Review questions and problems
Lectures:
kapittel 1 del 1 CPU Minne IO
kapittel 1 del 2 CPU klokke minne stack
kapittel 1 del 3 Assembly
kapittel 1 del 4 Avansert CPU Hyperthreading
kapittel 1 del 5 Cache

Uke 36

Introduction and processes (compendia chp 2, textbook chp 2, 4)
process, process API, thread/multi-threaded, process states (ready/running/blocked), PCB, process list/table, address space, file, design goals, timesharing, batch, soft/hard real-time, service/user process, CPU/IO/Memory-bound processes, GNU, POSIX, bit/Byte, KB/MB/GB/TB/PB/EB, ms/us/ns, gcc
Review questions and problems, Lab tutorials
Lectures:
kapittel 2 del 1 OSTEP ORG kapittel 2
kapittel 2 del 2 OSTEP ORG kapittel 4
Intro pointers in C

Uke 37

System calls (compendia chp 3, textbook chp 5, 6, (see also this: page 1-8))
fork, copy-on-write, exec, wait, signal, limited direct execution, instructions/system calls/commands, kernel mode, user mode, mode switch/transition, preemptive multitasking, trap table (interrupt vector table), sync/async interrupts, software/exception/hardware interrupt, timer interrupt, Process ID (PID), (call) stack, kernel stack, privileged operation/instruction, cooperative vs preemptive (timer interrupt)
Review questions and problems, Lab tutorials
Lectures:
kapittel 3 del 1 OSTEP ORG kapittel 5
kapittel 3 del 2 OSTEP ORG kapittel 6

OBLIG 1

Uke 38

Scheduling (compendia chp 4, textbook chp 7, 8, 9.1, 10.1, 10.3)
clock interrupt, preemptive vs non-preemptive, turnaround time, response time, workload, FCFS/FIFO, convoy effect, SJF, STCF, Round Robin, time quantum, jiffie, MLFQ, priority levels, boost, dynamic priority, fair-share/lottery scheduling, CPU-pinning/affinity, gang-/co-scheduling
Review questions and problems, Lab tutorials
Lectures:
kapittel 4 del 1 OSTEP ORG kapittel 7
kapittel 4 del 2 OSTEP ORG kapittel 8
kapittel 4 del 3 OSTEP ORG kapittel 9.1 10.1 10.3

OBLIG 1

Uke 39

Address spaces and paging (compendia chp 5, textbook chp 14, 16.1, 16.4, 17.1, 18) (browse chp 13 and 15)
address space, kernel/user space, multiprogramming, stack/heap memory, malloc(), free(), valgrind, translation, relocation, base and bound/limit registers, segments, free list, bitmap, external/internal fragmentation, paging, offset, page, page frame, virtual/physical address, page table, page table entry (PTE), present/absent bit, referenced bit, modified/dirty bit, memory trace
Review questions and problems, Lab tutorials
Lectures:
kapittel 5 del 1 OSTEP ORG kapittel 13 14
kapittel 5 del 2 OSTEP ORG kapittel 15 16.1 16.4 17.1
kapittel 5 del 3 OSTEP ORG kapittel 18
Adresser og bits

OBLIG 1 ENDELIG FRIST 24.SEPT

Uke 40

Memory management (compendia chp 6, textbook chp 19 (skip 19.7), 20 (skip 20.2), 21, 22) (browse chp 23.2)
TLB, hit/miss, hit rate, temporal/spatial locality, TLB entry, ASID, multi-level page table, PTBR, PDBR, CR3, inverted page table, swap, page fault, minor/major page fault, optimal/fifo/random/LRU/clock page replacement, demand-paging vs pre-paging/pre-fetching, thrashing, working set, hugepages
Review questions and problems, Lab tutorials
Lectures:
kapittel 6 del 1 OSTEP ORG kapittel 19
kapittel 6 del 2 OSTEP ORG kapittel 20
kapittel 6 del 3 OSTEP ORG kapittel 21
kapittel 6 del 4 OSTEP ORG kapittel 22 23 2
Extra video to help you understand memory: How a Clever 1960s Memory Trick Changed Computing (Laurie Kirk, Reverse engineer at Microsoft)

OBLIG 2

Uke 41

Threads and locks (compendia chp 7, textbook chp 26, 27, 28.1-9, 28.12-13)
PCB vs TCB, single- vs multi-thread, pthread create/join, atomicity, critical section, race condition, deterministic, mutual exclusion, mutex lock, test-and-set, xchg, compare-and-swap, cmpxchg, lock prefix, spin/busy waiting, spin or switch, yield, two-phase lock
Review questions and problems, Lab tutorials
Lectures:
kapittel 7 del 1 OSTEP ORG kapittel 26
kapittel 7 del 2 OSTEP ORG kapittel 27
kapittel 7 del 3 OSTEP ORG kapittel 28
kapittel 7 del 4 OSTEP ORG kapittel deadlock

OBLIG 2 ENDELIG FRIST 8.OKT

Uke 42

Condition variables, semaphores, concurrency (compendia chp 8, textbook chp 30, 31)
pthread cond_wait/cond_signal, producer-consumer, semaphore, sem_wait (down), sem_post (up), binary semaphore, ordering/synchronizing semaphore, reader-writer, starvation, dining philosophers, barrier, monitor, deadlock
Review questions and problems, Lab tutorials
Lectures:
kapittel 8 del 1 OSTEP ORG kapittel 30
kapittel 8 del 2 OSTEP ORG kapittel 31
kapittel 8 del 3 OSTEP ORG kapittel barrier java atomicint

OBLIG 3

Uke 43

I/O and HDD/SSD (compendia chp 9, textbook chp 36.1-36.7, 37.1-37.4, RAID, 44.1-6, 44.10-12)
Memory and I/O buses/interconnect, PCI/USB/SATA, micro-controller, I/O device, programmed I/O, interrupt-based I/O, DMA, I/O instructions (isolated I/O), memory-mapped I/O, I/O stack, block device, storage stack, block addresses, sector, HDD, platter, surface, spindle, RPM, track, cylinder, disk arm, disk head, seek time, rotational delay, SSD, SLC/MLC/TLC, NAND flash, flash translation layer, trim, write amplification, wear levelling, RAID 0/⅕, iops, sequential/random read/write
Review questions and problems, Lab tutorials
Lectures:
kapittel 9 del 1 OSTEP ORG kapittel 36 1 36 7
kapittel 9 del 2 OSTEP ORG kapittel 37 1 37 4
kapittel 9 del 3 OSTEP ORG kapittel 44 1 6 44 10 12
kapittel 9 del 4 RAID IOPS

OBLIG 3

Uke 44

File systems (compendia chp 10, textbook 39.1-4, 39.7-18, 40, 42.1-2)
inode, open(), read(), write(), close(), STDIN/STDOUT/STDERR, file descriptor, fsync, metadata, strace, link/unlink, mkdir(), opendir(), readdir(), closedir(), rmdir(), hard link, symbolic link, permission bits (rwx), SetUID, SetGID, sticky bit, chmod(), chown(), mkfs, mount, inode/data bitmap, metadata, superblock, single/double/triple indirect pointers/addressing, extents, EXT, page cache, sleuthkit, fsck, journalling, idempotent
Review questions and problems, Lab tutorials
Lectures:
kapittel 10 del 1 OSTEP ORG kapittel 39
kapittel 10 del 2 OSTEP ORG kapittel 40
kapittel 10 del 3 OSTEP ORG kapittel 40 eksempel
kapittel 10 del 4 OSTEP ORG kapittel 42 1 2

OBLIG 3 ENDELIG FRIST 29.OKT

Uke 45

Virtual Machines and Containers (compendia chp 11, Hardware Virtualization: the Nuts and Bolts (stop before "Standardization please!"))
unikernel, sensitive/privileged instructions, trap-and-emulate, binary translation, basic blocks, paravirtualization, hardwaresupported virtualization, vmx/svm/ept/npt/vpid/asid/vt-d, shadow/guest/physical page table, page walk, CR3, cgroup, namespaces, union mounts, Docker
Review questions and problems, Lab tutorials
Lectures:
kapittel 11 del 1 Virtuelle maskiner
kapittel 11 del 2 Containere

Uke 46

Operating System Security (compendia chp 12, textbook 53)
security policy, CIA, secure systems design principles, reference monitor, identification, authentication, authorization, capability, ACL, ACE, access token, security descriptor, privileges, MAC, DAC, mandatory integrity control, DACL, SACL, integrity levels, SID, secure attention sequence, UAC, namespace virtualization, UID/GID, sudo, buffer overflow, heap spraying, nop sled, stack canary, DEP, NX, return-to-libc, ASLR
Review questions and problems, Lab tutorials, Return-to-libc
Lectures:
kapittel 12 del 1 OSTEP ORG kapittel 53
kapittel 12 del 2 Aksesskontroll 1
kapittel 12 del 3 Aksesskontroll 2
kapittel 12 del 4 Beskyttelse mot programvaresårbarheter 1
kapittel 12 del 4 Beskyttelse mot programvaresårbarheter 2

Uke 47

Repetisjon

Uke 48

Eksamen

Eksamen onsdag 0900-1200, ingen hjelpemidler annet enn Godkjent kalkulator, Potensregningsarket og tilgang til Guacamole.