Question: int update(unsigned int process_id, pte_t pte) { int replace(unsigned int victim, frame_t frame, pte_t pte) { Complete the above functions (in C) to implement a

int update(unsigned int process_id, pte_t pte) \{ int replace(unsigned int victim, frame_t frame, pte_t pte) \{ Complete the above functions (in C) to implement a 3-bit LRU (least recently used) algorithm for page replacement. (Structs for Reference): pte: int: num, frame, bits, op, page_count unsigned int: is_frame_in_use, ref, dirty, op, frame, page \} pte_t frame: int: num, allocated, page, op unsigned int: is_frame_in_use, frame, page, Iru \} frame_t update: When a page is mapped to a frame, you can then add the frame to an ending circular list. replace: You can cycle through page entries until an Iru value of 0 is reached. The value can be shifted one bit to the right. If an Iru value of 0 does not exist, the first entry with the lowest seen value can be ejected
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
