Sec 9.1 - 9.2 Dyanmic Loading: When a routine is needed, it's dynamically loaded by the caller, doesn't need special support from OS. Unused routine is never loaded. Dyanmic Linking: Linking is postponed. Libraries can be shared by processes. Need support from OS. Overlays: Old, implemented by user. Swapping: Better. Sec 9.3 Strategies to address dynamic storage allocation problem: first-fit/best-fit/worst fit (first and best are better) internal/external fragmentation Sec 9.4 Paging Hierachial paging Hashed page tables (64-bit logical space needs a prohibitive number of memory access with hierachial paging) Clustered page tables (similar to above, except that multiple paged are clustered together) Inverted page tables (a larged amount of physical memory is occupied by the normal page tables used together with hashed tables to look up) My opinion on hashed table and inverted table: the former is required by each single process, the latter is shared by the whole system. Sec 9.5 Segmentation ------------------------------------------------------ Sec 10.1 - 10.2 Demand Paging Sec 10.3 Optimizations to Process Creation: 1. Copy-on-write an extreme opt: vfork 2. Memory-mapped files Two major problems: page-replacement & frame-allocation (decide how many frames to allocate to each process) Sec 10.4 modify bit/ dirty bit reference string distinguish LRU/LFU Pay attention to the stack implementation of LRU, it's actually a queue. The difference from FIFO is that it's dynamically adjusted. stack algorithms Sec 10.5 frame-allocation Sec 10.6 Thrashing Locality model: as a process executes, it moves from locality to locality. They are defined by the program structure and its data structures. Two solutions to thrashing: Working-set page-fault frequency Sec 10.8 Other considerations ----------------------------------------------------- Chap. 11 File-System Interface Please refer to the slides. ----------------------------------------------------- Sec 12.1 Layered File System Structure, FCB Sec 12.2 on-disk structures: 1. boot control block for booting 2. partition control block for allocating and freeing 3. directory structure 4. FCB's for files in-mem structures VFS Sec 12.3 Directory Impl Sec 12.4 Allocation Methods Contiguous - A modification: Extent based Linked effective only for sequential access space overhead (solution: clusters) reliability a variation: File Allocation Table (random access is improved, doesn't have to access each disk block) Indexed inode Sec 12.5 Free Space Management Free-space list -- records all free disk blocks, but not necessarily implemented as a list Sec 12.6 - 12.9 Other considerations page cache is far more efficient than disk cache (which results in double caching), known as unified VM unified buffer cache synchronous writes - can be used in metadata writes, and database systems optimizations for sequential access - free-behind, read-ahead Consistency checking ¨C compares data in directory structure with data blocks on disk, and tries to fix inconsistencies. log-based transaction-oriented FS NFS