> CS385 Operating System Concepts and Design
> Lecture 1: Introduction
> Lecture 2: First steps in C
> Lecture 3: printf and types in C
> Lecture 4: function calls and the stack
> Lecture 6: parameter passing and memory management
> Lecture 7: mostly hw3
> Lecture 8: a bit of subversion, and linking
* Lecture 9: linking and maybe loading
* Lecture 10: hw4, and dynamic linking/loading
> Lecture 11: scripts, processes/threads, input/output
> Lecture 12: a first visit to kernel mode
> Lecture 13: synchronization primitives
* Lecture 14: pthreads
> Lecture 15: deadlock, priority inversion
> Lecture 18: schedulers and queueing
> Lecture 19: Linux CPU schedulers
* Lecture 20: boot: from power-on to first process
* Lecture 21: first instruction to first user process
> Lecture 22: inter-process communication and memory management
> Lecture 23: Virtual Memory
> Lecture 25: caching and performance
> Lecture 26: paging
* Lecture 29: memory management wrap-up
> Lecture 30: intro to storage management
> Lecture 31: Virtual file system
> Lecture 32: File system datastructures
> Lecture 33: filesystem consistency
> Lecture 34: btrees, B+trees and btrfs
> Lecture 35: btrfs - b-tree filesystem
> Lecture 36: filesystem wrap-up
> Lecture 37: homework 9 discussion + hw10
> Lecture 38: permissions management
> Lecture 39: user and data authentication
> Lecture 40: cryptography
> Lecture 41: signatures
> Lecture 42: code vulnerabilities - buffer overflows and related attacks
> Lecture 43: code vulnerabilities - viruses, worms, shell/SQL injection
V Lecture 44: semester wrap-up
* call number 17428
V C programming
* function calls
* call stack
V memory allocation
* local variables and parameters - stack
* malloced stuff - heap
* statics - compile time
* statics - load time
* stack
* mmap()
* heap
* statics
* executable code
V pointer arithmetic
* size of primitive types
* primitives vs. structs vs. enums vs. unions
* size of some type
* ptr + numbr =
* ptr[10] = *(ptr + 10)
V linking and loading
* start with C program with pre-processor directives
* preprocessor -> .c
* compiler -> assembly file -> .S
* assembler -> binary object -> .o
V linker -> executable
* replace symbols with addresses
* at runtime:
* loader -> binary in memory
V dynamic linker -> finished process image
* resolve symbols
* Global offset table -> GOT
V dynamically linked libraries
* position independent code
V process management
V processes vs. threads
V process
* address space
* file descriptors
* stack
* register contents
V thread
* stack
* register contents
V init first user process: process id 0
* fork()
* execve()
V sharing the CPU
V cooperative time sharing
* yield()
* I/O wait() - automatic yield
V pre-emptive scheduling
* timer interrupt
V scheduling
V O(1) scheduler
V 1
* firefox
V 2
* mail
* 3
V starvation
* ready queue
V CFS - completely fair scheduler
* run in order of time left
V concurrency
* disks
* tape recorders
* transmitters
* memory
V mutual exclusion primitives
V semaphores
* initialize with a number
V wait: reduce the number by one
* if the number is 0, wait
V signal: increase number by one
* wake up whoever is waiting
V mutex
* binary semaphore
* lock()
* unlock()
V hardware support required
V test-and-set
* atomic operation
* cache consistency
V race conditions
V a ++
* read value of a into register
* add 1 to register
* write register to a
V deadlock
* mutual exclusion
* hold and wait
* circular wait
* no pre-emption
V dining philosophers problem
V monitor
* object that abstracts away concurrency problems
* contains one or more locks
* methods lock/unlock the locks
V cpu modes
V userland - user level - ring 3
V privileged instructions
* descriptor table (virtual memory)
* interrupt table
* control registers
* memory accesses are restricted by the page table
* I/O operations are restricted
* return from interrupt / syscall - opcode
V supervisor mode - ring 0
* enter it through system call (syscall), interrupt
V system calls
* like function calls, except doesn't jump to a specified address
* instead, dispatch via entry point - system call number in register
V main memory
* virtual memory management
V virtual memory pages
* map to physical memory frames
V page table
* page table directories (1 or more levels)
V page table
V page table entries
* phy memory frame number
* invalid
* accessed
V page replacement
* page fault
* least recent use
* tlb - translation lookaside buffer
V caches
* registers
* l1 - small but very fast, 4 kb
* l2 - 32-128k, pretty fast, 12 cycle?
* l3 - shared between all cpus, larger (1-12megs), 40 cycles
* main memory - 30 ns
V secondary storage
* 5-8 ms
V memory allocators
V slab allocators
* in-kernel common data structures
V buddy allocator
* in-kernel
* contiguous sets of pages
V malloc-style allocators
* userland
* allocate memory using sbrk()
* freed chunks are added to a list of free elements
V secondary storage
V file system
* allocation mechanism
* FAT - file allocation table
V inode
* indirect node / index node
* direct pointers / direct blocks
* indirects -> table -> directs
* double indir
* triple indir
V btree-based filesystems
* on-disk tree datastructure
* btrfs
* free space management
V extents
* clusters of blocks
V security
V protection
V privilege management
* resources & users
* access control lists
V standard unix model
* owner
* group
* others
* 0755
V authentication
* password
* biometrics
V encryption / signatures
* authenticating and hiding contents
V exploits and vulnerabilities
V buffer overflow attacks
* gets()
* scanf()
* strcpy()
* privilege escalation
* SQL injection / shell code injection
*