Week 27: CST 334 - Operating Systems
WK03: Weekly Learning Reflection
This week we covered several chapters from OSTEP: Address Spaces, the C Memory API, Address Translation with Base-and-Bounds, Segmentation, and Paging. All of these topics focused on how operating systems virtualize memory and how the hardware supports that process.
Address spaces made a lot of sense to me. The idea that each process gets its own 'private' view of memory, even though they all share the same physical RAM, was clear and understandable. I especially liked how the book explained time-sharing and virtualization - how the OS switches between processes so quickly that it feels like they are running at the same time.
The C Memory API was also straightforward. We reviewed malloc, calloc, and the importance of free. I feel comfortable with the basics, especially how these functions interact with the heap. The main takeaway is simple: when you allocate memory, you must remember to free it.
Address translation and the MMU concepts also made sense. The base-and-bounds approach felt very direct: you check whether a virtual address is within the bounds, and then add the base to get the physical address. Segmentation was similar in concept, and I understood both the motivation behind it and the problems it tries to solve, including ways to avoid external fragmentation.
The hardest topic for me this week was paging. The overall idea - dividing memory into fixed-size pages -seemed clear when I read the chapter. But once I started practicing and writing code, it became much more challenging. Keeping track of PFNs, PTEs, metadata bits, and how page tables fit together was harder than expected. The concept is clean, but the implementation has many moving parts.
My "aha" moment was realizing how all these techniques build toward the OS goal of safely and efficiently sharing memory between processes. Overall, this week tied together well with concepts from earlier chapters and other classes, especially C programming and hardware architecture. I'm starting to see how virtualization is implemented both in software and hardware, and how important these abstractions are.
Comments
Post a Comment