class: title # Virtual Memory Wrap-Up ## CSC 213 – September 26, 2025 --- # Agenda for Today 1. Department Events 2. Upcoming Work 3. Hexadecimal Review 4. Address Translation on x86 5. Wrap Up --- # Department Events ## CS Table: Open Source Software Supply-Chain Security .indent[ Tuesday, September 30th at noon in JRC 224C ] ## Flu Shot Clinic .indent[ October 2nd and 3rd from 9am–4pm in the Natatorium Lobby Register with Hy-Vee at
] *To receive 0.25% extra credit, send an email to let me know you attended no more than 48 hours after the event.* --- class: section, blue # Upcoming Work --- # Malloc Lab **Due:** Wednesday, October 8th by 11:59pm **Late Deadline:** Wednesday, October 15th by 11:59pm ## Questions? --- class: section, blue # Hexadecimal Review --- class: section, gray # Whiteboard: Hex Digits --- # Hexadecimal Math Consider two pointer values: - `p = 0x7FF25310` - `q = 0x7FF2430C` 1. Which pointer has a lower address? 2. If these pointers are the start and end of an array, how large is the array in bytes? *(Hint: the end of an array is a pointer just past the last byte.)* 3. How many bytes do you think an element of the array takes up? --- # Pointer Alignment Which of these pointers are aligned to multiples of 8 bytes? What about 16 or 32 byte alignment? 1. `0x55500410` 2. `0xCA7F00D5` 3. `0x00400008` 4. `0x7FFD1040` 5. `0x64430CC0` 6. `0x1D2C3B4A` --- class: section, blue # Address Translation on x86 --- # Real Parameters for 32-bit x86 Let's consider how the basic paging scheme we discussed last time would work on a 32-bit x86 machine. The design of x86 gives us two important parameters: **Pointer Size:** 32 bits (four bytes) **Page Size:** 4096 bytes (4KB) -- From those parameters, we can determine more information about the address space: 1. How large is an address space? In other words, how many bytes can we address with a 32-bit pointer? 2. How many pages make up an address space? 3. Let's assume a single entry in a page table takes up 4 bytes (32 bits). How large will one page table be? --- class: section, gray # Whiteboard: Multi-Level Page Tables --- class: section, blue # Wrap Up --- # Reminders ## Lab The malloc lab is due in just under two weeks. Be sure to make some progress this weekend or early next week! ## Assignment There is no assignment this week. ## Need Help? My regular office hours schedule is now posted. Don't forget about this weekend's mentor session on Sunday from 3–5pm. ## Reading - **Interlude: Files and Directories** (OSTEP, Chapter 39)