CST334 Week 3


This week’s module focused heavily on memory virtualization, and honestly, this has been the first week where all the topics felt like they finally connected into one big picture. We covered address spaces, the C memory API, address translation, base-and-bounds, segmentation, and paging. At first, each of these topics felt separate, but the deeper I got into the readings and the PA3 instructions, the more I started seeing how they all fit together under the idea of how the OS makes memory feel simple even though the hardware underneath is anything but.

One of the clearest ideas this week was the concept of an address space. I always understood virtual vs. physical memory at a high level, but reading OSTEP 13 made it click that an address space is basically the illusion the OS gives each process, its own clean slate, even though everything is ultimately sharing the same physical RAM. That idea tied directly into the C Memory API, because malloc, free, and even pointers all rely on the OS handling the messy parts behind the scenes.

The hardest part for me this week was understanding base-and-bounds versus paging. Base-and-bounds feels straightforward: take a virtual address, add a base, and check that it’s within a limit, simple. But then paging showed up and completely changed the game by slicing memory into fixed-size pieces and using page tables. Reading PA3 and realizing I’m actually going to implement both systems made it more real. Paging especially feels complicated because of all the bit manipulation, PFNs, VPNs, offsets, valid bits, and permission bits. It’s a lot to keep track of. But weirdly, doing the assignment makes the theory easier to understand. My “aha” moment was realizing that paging is more flexible because it doesn’t require processes to have contiguous physical memory, which solves fragmentation and makes multiprogramming way easier.

Right now, the main thing I’m unsure about is the reserve test, RESERVE_resource_exhaustion_recovery, I am not sure what this test is checking for!  Another question I have is how modern systems expand on these older ideas, especially with 64-bit address spaces and multi-level page tables. I hope we will cover that soon!

Overall, this week tied together a lot of foundational concepts. It helped me understand how the OS creates the illusion of simplicity, even though underneath it’s juggling address spaces, tables, translations, and protection. Seeing how these ideas show up directly in the programming assignment makes me feel like I can connect these ideas to real world concepts!


Comments

Popular posts from this blog

Week 4 - Goals!

Week 2 - Second week of class!

Week 4 - Interview with Industry Expert