Exercize 4

Part 1

Implement scripts pfstat.d and pfstat.stp which will print count of pagefaults grouping by a mmapped file name (if it reachable). Print statistics once per second. Use proc_starter experiment from exercize 3 to demonstrate it and try to explain results you are getting (you may need to include additional outputs for that).

Part 2

Implement scripts kmemstatp.stp and kmemstat.d which will gather stats on allocations and frees on per-cache basis for a SLAB allocator. Use an file_opener experiment from exercize 1 to demonstrate your script and find a correlation between number of requests per-second generated by an experiment and cache allocations. What caches are primarily used while file is opened?