cd week_three
Journal Entry Week 3
This week definitely felt like a big jump in difficulty again. Last week was about processes and CPU scheduling, but now we’re getting into memory and how the OS actually manages it. We have moved from how programs run to where everything is stored and how we find it, and that got complicated pretty fast.
Topics We Covered
- Address spaces and virtual memory
- Base and bounds
- Segmentation
- Paging
- Address translation
- Memory allocation (malloc/free in C)
- Fragmentation (internal vs external)
Explaining the Topics
Virtual memory and address spaces: each process thinks it has its own memory, but it’s actually mapped to physical memory.
Base and bounds: simple offset + limit system (bounds).
Segmentation: splits memory into logical chunks like code, heap, stack.
Paging: divides memory into equal-sized pages and frames; uses VPN + offset.
C memory: malloc/free connects to how memory is actually used.
Least-Understood Topics
- Paging conversions (VPN + offset math)
- Page table size and efficiency
Nature of My Confusion
What makes sense:
- Paging splits memory into equal chunks
- VPN selects page
- Offset selects location inside page
What’s still confusing:
- Bit math and log2 calculations
- Tracking VPN vs offset vs PFN
- How page tables are efficiently used
“Aha” Moments
- All methods are just different forms of address translation
- Paging swaps page number but keeps offset the same
Questions / What Comes Next
- How are page tables optimized?
- Will we learn caching next?
- How does paging work with disk?
How does this impact performance?
Connections to Other Classes
- C programming (pointers, memory)
- Computer architecture (bits, binary)
Final Thoughts
This week was the hardest so far but also very interesting. It feels like we’re really understanding how memory works in real systems.
Still confusing, but starting to come together.
Comments
Post a Comment