Question: int FUNCTION(unsigned int pid) { Complete the function (in C) to deallocate page table memory (page replacement) used by a process in termination (e.g. due

int FUNCTION(unsigned int pid) \{ Complete the function (in C) to deallocate page table memory (page replacement) used by a process in termination (e.g. due to a segmentation or protection fault). Given Structs: pte: int: num, frame, bits, op, page_count unsigned int: is_frame_in_use, ref, dirty, op, frame, page \} pte_t pde: pte_t *pte_page; \} pde_t frame: int: num, allocated, page, op unsigned int: is_frame_in_use, frame, page \} frame_t Hint: You can travel the page directory and find allocated pages (stored pte_page) for freeing
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
