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: Briefly define terms using one or two sentences.
Long Answers:
Virtualization
Concurrency
Persistence
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?
Given a virtual memory system with the following properties:
64 byte Pages
Sketch all the data structures needed to support a multi-level paged virtual memory system. Be sure to include all the tables in memory, and clearly indicate the total size of each table, the number of entries in each table, the size of each entry, and the number of bits in each field.
Consider a multi-indexed file system with a 32-bit block address, 4KB block size, and an inode structure with 4 direct pointers and one indirect pointer:
How many data blocks are required to store 18474
bytes?
It's Christmas time and Santa is making his list of naughty and nice kids 1. Having taken operating systems and actually paid attention (perhaps even going to class a few times), he decides to use his mad concurrency skills to parallelize the construction of this list. This means he orders each of his many elves to monitor different children 2 and then put them on the appropriate list. To do this, they have the following API:
/* Child structure */ typedef struct Child; struct Child { char *name; Child *next; }; /* Santa's List structure */ typedef struct SantasList SantasList; struct SantasList { Child *nice_children; Child *naughty_children; }; /* Santa's List functions */ SantasList * santaslist_create(); bool santaslist_add_nice(SantasList *sl, const char *name); bool santaslist_add_naughty(SantasList *sl, const char *name);
Each elf is given a list of children to check and then must call
santaslist_add_naughty
or santaslit_add_nice
on each child
depending on the conduct of the subject in question. These functions
should add the specified child to their respective sets. If a child
is already in the opposite set, then the method should return false
to indicate a conflict and refrain from adding the child to the set.
Since Santa is supes busy, he has decided to outsource 3 the
implementation of this system to you. Therefore, you need to
implement santaslist_create
, santaslist_add_nice
, and
santaslist_add_naughty
such that it behaves as described above and
is free of race conditions, deadlocks, and starvation. Failure to do
so may mean you will get some coal in your stockings this year
4...