$25
Non-programming exercises:
Write in a neat and legible handwriting
Clearly explain the reasoning process
Write in a complete style (subject, verb and object) Progamming exercises:
Write a README file for each program
Upload an archive with all the programs onto Canvas
Ex. 1 — Simple questions
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.
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
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 half 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.
Explain what Meltdown and Spectre are. Focus on the hardware and OS part of those attacks.
Also explain the idea behind the fixes.
Search and explain what the Dirty COW bug is.
Ex. 4 — Linux
Write a very short C program that leads to thrashing.