CS 153 Design of Operating Systems Spring 2015 Final Review
2 Final l 7pm-10pm, Tuesday, June 9 th l Material for final u All topics covered after midterm »Memory management, file systems, RPC, Android OS security »One or two small problems from Android OS security u One problem from the pre-midterm materials »Same as midterm l Based upon lecture slides and corresponding material from textbook (mostly the slides, textbook helps further understanding) l Read questions carefully! l Closed book, no notes, no laptops, no cellphones l Of course, no cheating
OS in a nutshell l Reality: u Several concurrent programs that share hardware u Hardware can comprise any CPU, hard disk drive, RAM l Abstraction offered by OS: u Every program runs as a separate process that »Consists of several threads »Has its own 2^32 byte virtual address space »Reads and writes files u Every program is completely agnostic to hardware and other programs 3
4 Overview of Topics l Memory management l Paging l Page replacement l Disk I/O l File systems l Advanced topics u LFS, RAID, RPC, NFS, Android OS security
5 Memory Management l Why is memory management useful? u Why do we have virtual memory if it is so complex? l What are the mechanisms for implementing MM? u Physical and virtual addressing u Partitioning, paging, and segmentation u Page tables, TLB l What are the policies related to MM? u Page replacement l What are the overheads related to providing memory management?
6 Virtualizing Memory l What is the difference between a physical and virtual address? l What is the difference between fixed and variable partitioning? u How do base and limit registers work? l What is internal fragmentation? l What is external fragmentation? l What is a protection fault and page fault?
7 Paging l How is paging different from partitioning? l What are the advantages/disadvantages of paging? l What are page tables? l What are page table entries (PTE)? u What are all of the PTE bits used for? »Modify, Reference, Valid, Protection l Know these terms u Virtual page number (VPN), page frame number (PFN), offset l Know how to break down virtual addresses into page numbers, offset
8 Segmentation l What is segmentation? l How does it compare/contrast with paging? l What are its advantages/disadvantages with respect to partitioning, paging? l What is a segment table? l How can paging and segmentation be combined?
9 Page Tables l Page tables introduce overhead u Space for storing them u Time to use them for translation l What techniques can be used to reduce their overhead? l How do two-level (multi-level) page tables work?
10 TLBs l What problem does the TLB solve? l How do TLBs work? l Why are TLBs effective? l How are TLBs managed? u What happens on a TLB miss fault? l What is the difference between a hardware and software managed TLB?
11 Page Faults l What is a page fault? l How is it used to implement demand paged virtual memory? l What is the complete sequence of steps, from a TLB miss to paging in from disk, for translating a virtual address to a physical address? u What is done in hardware, what is done in software?
12 Advanced Mem Management l What is shared memory? l What is copy on write? l What are memory mapped files?
13 Page Replacement l What is the purpose of the page replacement algorithm? l What application behavior does page replacement try to exploit? l When is the page replacement algorithm used? l Understand u Belady’s (optimal), FIFO, LRU, Approximate LRU, LRU Clock, Working Set, Page Fault Frequency l What is thrashing?
14 Disk l Physical disk structure u Platters, surfaces, tracks, sectors, cylinders, arms, heads l Disk interface u How does the OS make requests to the disk? l Disk performance u What steps determine disk request performance? u What are seek, rotation, transfer?
15 Disk Scheduling l How can disk scheduling improve performance? l What are the issues in disk scheduling? u Response time, throughput, fairness l Review u FCFS, SSTF, SCAN, C-SCAN
16 File Systems l Topics u Files u Directories u Sharing u Protection u Layouts u Buffer Cache l What is a file system? l Why are file systems useful (why do we have them)?
17 Files and Directories l What is a file? u What operations are supported? u What characteristics do they have? u What are file access methods? l What is a directory? u What are they used for? u How are they implemented? u What is a directory entry? l How are directories used to do path name translation?
18 Protection l What is file protection used for? l How is it implemented? l What are access control lists (ACLs)? l What are capabilities? l What are the advantages/disadvantages of each?
19 File System Layouts l What are file system layouts used for? l What are the general strategies? u Contiguous, linked, indexed? l What are the tradeoffs for those strategies? l How do those strategies reflect file access methods? l What is an inode? u How are inodes different from directories? u How are inodes and directories used to do path resolution, find files?
20 File Buffer Cache l What is the file buffer cache, and why do operating systems use one? l What is the difference between caching reads and caching writes? l What are the tradeoffs of using memory for a file buffer cache vs. virtual memory?
21 Advanced Topics l What is FFS, and how is it an improvement over the original Unix file system? l What is LFS, and how is it an improvement over FFS? l What is RAID, and how does it help file system performance and reliability? l What is RPC, and how is it implemented? l What is NFS, how does it relate to file systems and RPC? l How does Android provide isolation among apps?