VE482 — Introduction to Operating Systems Assignment 6 solved


Category: You will receive a download link of the .ZIP file upon Payment


5/5 - (1 vote)

Ex. 1 — Simple questions
1. Consider a swapping system in which memory consists of the following hole sizes in memory order:
10 KB, 4 KB, 20 KB, 18 KB, 7 KB, 9 KB, 12 KB, and 15 KB. Assuming first fit is used, which
hole is taken for successive segment requests of: (i) 12 KB, (ii) 10 KB and (iii) 9KB. Repeat for
best fit and quick fit.
2. If an instruction takes 10 nsec and a page fault takes an additional n nsec, give a formula for the
effective instruction time if page faults occur every k instructions.
3. A small computer has four page frames. At the first clock tick, the R bits are 0111. At t
subsequent clock tics, the values are 1011, 1010, 1101, 0010, 1010, 1100 and 0001. Assuming
the aging algorithm is used with an 8-bit counter what is the value of the four counters after the
last tick.
Ex. 2 — Page tables
In the lecture it was mentioned that the translation from virtual address into physical address could be
sped up using the TLB. Unfortunately this solution is not of much help in the case of large page tables.
Investigate the two following alternative solutions: inverted page tables and multilevel page tables.
Ex. 3 — Research
Write about a page on the topic of codes bugs that lead to security holes; In particular illustrate the
discussion using common examples. Do not forget to reference your sources of information.
Ex. 4 — Minix 3
The goal of this exercise is to understand how the memory is handled in Minix 3, an in-depth study is
not required.
1. List the files related to the virtual memory implementation
2. How large is the page table?
3. What is each page table entry containing?
4. What basic functions are used to handle virtual memory?
Ex. 5 — Linux
Write a very short C program that leads to trashing.
Ex. 6 — Dirty COW
Search and explain what the Dirty COW bug is.