We explored memory management in operating systems in more depth this week. One of the main topics was free space management, where we explored how memory is given to programs and how unused space can cause problems. We learned about memory allocation strategies like first fit, best fit, and worst fit, and how they affect fragmentation. We also talked about how memory can be split and merged (called splitting and coalescing) to use space more efficiently.
We moved on to paging, which is a way to divide memory into fixed-size pieces to avoid external fragmentation. Paging uses a page table to map virtual addresses to physical addresses. This lets programs use memory even when there’s not enough space in one block. But checking the page table every time can be slow, so systems use a Translation Lookaside Buffer (TLB), which is like a shortcut that stores recent address translations to make memory access faster.
We also learned about more advanced page table methods like multi-level page tables and inverted page tables. This was a bit challenging topic for me but I understand that these help save space because a single linear page table can be too large. We also covered page replacement policies like FIFO, LRU, and optimal replacement. These are strategies to decide which page to remove from memory when new data needs to be loaded. I found LRU interesting because it tries to keep the most recently used data in memory.
No comments:
Post a Comment