Final Topics
- Interacting with I/O devices
- Device controller, device driver
- Object-oriented device interfaces (such as block devices)
- Busy waiting vs. interrupt-driven vs. polling
- Request buffers, DMA rings
- Overhead, latency, throughput of I/O interaction methodologies
- Bottlenecks
- Memory management
- Internal fragmentation, external fragmentation
- Address space contents: code, global data, stack, heap
- Virtual memory
- Page map function
- Page faults
- Virtual address space vs. physical address space
- Architectural support
- Achieve allocation flexibility
- Achieve isolation: separate per-process address spaces
- Achieve illusion of larger memory: swapping
- Page replacement algorithms: optimal, FIFO, LRU
- Belady's anomaly
- Implementing LRU
- Achieve performance
- Copy-on-write fork
- Demand paging
- Memory mapped files
- Prefetching
- Extended page map functions (include access type, access privilege)
- Architectural implementation: x86
- Disks
- Platter, surface, track, sector, cylinder
- Seek, rotational latency, transfer rates
- File systems
- Kernel memory representation
- Object-oriented file system interface
- Inode, file structures
- Buffer cache
- Performance: caching, layout, prefetching
- Robustness (recovery from failures): replication, redundancy, ordering
- Efficiency: space overhead
- Data vs. metadata
- Boot sector, superblock
- File allocation table
- Inode design (Unix): free block bitmap, indirect blocks
- Disk scheduling algorithms: FCFS, Shortest Seek Time First, SCAN/LOOK, Circular LOOK (elevator scheduling)
- Directory implementation: links, mounting, symbolic links
- File system correctness/consistency
- Invariants: No object is used for more than one purpose; Every allocated object is marked allocated; Every free object is marked free; Every referenced object is initialized
- Fsck
- Write ordering
- Journaling: transactions
- RAID
- Mean time to failure
- Distributed systems
- Loosely coupled vs. tightly coupled
- Distributed shared memory
- RPC: stubs, automatic stub generators
- Asynchronous RPC (and AJAX)
- Writing a server with sockets
- Server architectures: single process, multiprocess, multithreaded, single process event-driven
- Receive livelock and interrupts
- Distributed file systems and NFS
- NFS and RPC, server design
- Buffering and caching
- Consistency models: write-to-read vs. close-to-open
- Stateless protocol
- Security
- Prevent unauthorized access & ensure authorized access
- Defining authorization: principal, resource/object, access right & access matrix
- Principle of least privilege
- Unix access matrices (e.g. for processes, for files): user IDs, group IDs
- Access control lists, capabilities
- Cryptography: symmetric (private-key), asymmetric (public-key)
- Replay attack