Assignment 4
Team 1: page fault on malloc Using phase 4 of Shibata's team , write a program that continually gets memory (malloc) and writes on a structure, creating a linked list (where each cell is in this structure), i.e., a cell (this structure) must point to the former one. After some time, due to virtual memory, data must go to disk in order to free memory to more data through do_swap_page. How does the Linux choose the page to evict? Let the program run freely. What error do you get? Insert a breakpoint closer to the interrupt vector when this error happens. Explain. Obs: observe the effect of differente sizes of the physical memory in qemu. Explain how virtual memory was allocated by /proc/$PID/maps (the process may be blocked by a getchar). Team 2: allocating a physical page frame Using phase 4 of Shibata's team , implement the program "large" that uses 2 times the physical memory (adjust memory size in qemu). This program declares a large vector. For each eleme...