




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
A description of the final exam notes
Typology: Study Guides, Projects, Research
Uploaded on 04/25/2023
2 documents
1 / 8
This page cannot be seen from the preview
Don't miss anything!
Translation lookaside buffer (TLB) A cache for storing pages that exhibit locality Types of locality Temporal and spacial Software-Managed TLB All 16 elements belong to one process. When the process switches, the OS will swap out the old process's cache with the new process's cache. Hardware-Managed TLB Tell the hardware to handle the caching. Each cache entry has to have a process tag. The cache would be "polluted" with entries from different processes. 3 reasons for cache "misses" Compulsory (never seen before), conflict (hash collision), and capacity (entry has been evicted) Inverted page table Instead of a PTE per page, make one per frame Demand paging Only load pages when requested Pre-paging Guess what pages a process will likely need and load them "Optimal" page replacement algorithm Evict the page that won't be needed until furthest in the future
"Not Recently Used" page replacement algorithm Evict the page that is the oldest, preferring pages that are not dirty (unreferenced clean; unreferenced dirty; referenced clean; referenced dirty) What is the problem with the "FIFO" page replacement algorithm? It has a bad notion of time: it uses page load time instead of page use time. "Second Chance" page replacement algorithm If the oldest page has a reference bit of 1, give it a second chance by making it newest and marking it as unreferenced. "Clock" page replacement algorithm Same as Second Chance, but uses a circular queue. To mark a page as newest, just move the pointer past it. "Least Recently Used" page replacement algorithm Evict the least recently used page, based on a timestamp What is the problem with the "Least Recently Used" page replacement algorithm? Storing and reading timestamps of the granularity that we need would take too much time "Aging Scheme" page replacement algorithm Approximation of LRU. Periodically shift all referenced bits onto an 8-bit counter and set the referenced bits to 0. To evict a page, just choose the page that's counter is smallest. Working Set The set of pages used by the k most recent memory references. w(k, t) is the size of the working set at time t.
When is virtual memory touched?
DMA Controller (pros/cons) Direct Memory Access. Pro: doesn't deliver interrupts to the OS until the operation is complete. Cons: might require more power, costs money to manufacture. I/O Software Goals
Record the min and the max. When we reach one of the extremes, reverse directions. Fairness note: jobs in the center of the disk have a lower variance of wait time than those at the outside (true for SCAN and LOOK). C-SCAN Since SCAN and LOOK both weight things to the center of the disk, we could instead just scan to the top without reading along the way. This full-disk seek doesn't have to be as precise as the other reads, and it can be faster. C-LOOK Adds the min/max look, just like LOOK did for SCAN. This reduces the total number of cylinders scanned over, but it does mean that the full scan has to be a bit more precise. What are some reasons why we might find ourselves in the OS besides preemption or blocking?
What's the formula for calculating how many levels in a tree you need to store a file of a certain size? log[base branching factor](file size / block size) Problems with using linked lists for free space tracking