Here is a general outline of the key concepts (arranged by topic) that you should know for the Final.
The exam will have the following format:
Definitions: Identify the term described the sentence or phrase.
Long Answers:
Virtualization
Big Picture
Memory
Concurrency
Big Picture
Processes vs Threads
Synchronization
Persistence
Big Picture
File System
The exam is completely offline. This means there will not be any need for a computer. Furthermore, the test is closed book, closed notes, but open mind.
Furthermore, the exam is also comprehensive. This means there may be questions from the first part of the semester as well. Refer to the Midterm Checklist for possible topics and questions.
This check list is meant to be representative, rather than exhaustive (ie. there may be questions that show up on the exam that are not shown below).
What is an address space?
What is virtual memory?
How do we allocate memory?
What are some common memory errors?
Who needs to keep track of memory?
What data structures do we use to keep track of memory?
What are some strategies for managing memory?
What are the problems with base and bounds?
How does segmentation address these problems?
How do we translate a virtual address to a physical address?
How does paging address the problems in segmentation?
What exactly is a page? page frame? page table?
How do we translate a virtual address to a physical address?
What problem do TLBs address and how do they solve it?
What problem do multi-level page tables address and how do they solve it?
How does the operating system provide the illusion of infinite virtual memory?
How does the operating system handle page faults?
What exactly is thrashing?
What is the challenge of persistence?
How does the operating system mediate data transfers between the CPU and disk storage?
What are the advantages and disadvantages of hard disks versus solid state drives?
What problems does RAID address?
What different types of RAID are there and what are the advantages and disadvantages of each?
How is a typical Unix file system organized?
What exactly is an inode?
How are blocks allocated?
Why does the OS use up all your RAM?
What problem does FFS solve and how does it solve it?
What problem does LFS solve and how does it solve it?
What is the problem of crash consistency and how do file systems deal with it?
What is the problem of data integrity and how do file systems deal with it?
What are the three tenets of the Unix Philosophy themes
or principles of operating systems?
What impact does the hardware have on these themes?
Given a virtual memory system with the following properties:
4 bytes per PTE and PDE
Sketch all the data structures needed to support a multi-level paged virtual memory system by filling in the table below. When appropriate, write the solution as a power of 2 and simplify it terms of K, M, G, or T units.
Pages | |
---|---|
Number of addressable bytes | |
Number of pages in address space | |
Number of VPN bits in virtual address | |
Number of offset bits in virtual address |
Page Table | |
---|---|
Number of PTES | |
Number of bytes for just page table | |
Number of pages for just page table |
Page Table | |
---|---|
Number of PDEs | |
Number of PDI bits in VPN | |
Number of PTI bits in VPN | |
Number of bytes for just page directory | |
Number of pages for just page directory |
Should this multiple level page table have an additional level? Yes No
For each of the following assertions regarding concurrency, determine whether or not the statement it is true or false. Provide either evidence of the assertion's correctness or a counter-example to disprove it.
Context switches are more expensive than normal function calls.
Semaphores can be used in place of mutexes but not condition variables.
Deadlock only requires circular dependency and mutual exclusion.
Each thread in a process has its own individual stack space.
Suppose you worked at a pharmacy and had to gather and dispense requested pills to customers. Rather than gather the pills for each customer yourself, you decide to delegate the work of gathering the pills and dispensing them to customers to other workers (ie. you just dispatch the work to your subordinates).
Describe using a diagram, pseudo-code, or prose, how you would simulate the scenario above using processes (each subordinate is a process).
Describe using a diagram, pseudo-code, or prose, how you would simulate the scenario above using threads (each subordinate is a thread).
The CSE makerspace allows students to do projects with Arduinos and Raspberry Pis... but only has a limited about of capacity:
Up to 4 projects can be done in the makerspace at once.
Model this synchronization problem using POSIX threads, mutexes, condition variables, or semaphores. Assume each project group is represented by a thread that calls their corresponding enter and leave functions whenever they enter or leave the makerspace.
Global Variables
void project_enter() void project_leave()
Consider a traditional Unix filesystem.
What sort of events would lead to inconsistencies in the filesystem?
Which types of inconsistencies would fsck
be able to resolve?
Consider a multi-indexed filesystem with a 32-bit block address, 4KB block size, and an inode structure with 4 direct pointers and one indirect pointer:
What is the largest disk this file system can use?
What is the largest file that this file system could store?
Assuming a disk of 128GB, how big is the free block bitmap?
How many data blocks are required to store 18474
bytes?