JP

Operating Systems - Memory Management and File System

Review and Learning Outcomes

  • The lecture focuses on completing the topic of Memory Management and beginning the discussion on File Systems.
  • Key Topics:
    • Memory Management:
    • Address Translation
    • Flexible Address Translation
    • Efficient Address Translation
    • File System:
    • Disk Scheduling
    • Disk Performance
  • Homework 6 key is available on Blackboard.
  • Quiz 6 will cover lectures 16-19.
  • Exam 2 is scheduled for Tuesday, April 8, covering lectures 11-19. A sample exam is posted on Blackboard.

TLB and Page Table Translation

  • The translation process combines the Translation Lookaside Buffer (TLB) with hardware page tables.
  • Concepts:
    • Virtual Address → Physical Address conversion using TLB and Page Table.
    • Components:
    • TLB - stores recently used mappings of virtual to physical addresses.
    • Page Table - maps virtual pages to frame numbers in physical memory.
  • If the TLB hit occurs, the physical address is obtained quickly; otherwise a page table lookup occurs.

TLB Lookup and Operation

  • TLB operates by checking each virtual page number against all TLB entries simultaneously.
  • Outcomes:
    • If a match occurs, corresponding physical page frame and permissions are retrieved.
    • In case of a TLB miss, the system performs a hardware multi-level page table lookup to find the physical address.

Addressing Mechanisms in Caches

Virtually Addressed vs. Physically Addressed Caches

  • Virtual Addressing:
    • First level cache is accessed using virtual addresses to enhance speed.
    • TLB is queried in parallel to get the physical address in the event of a cache miss.
  • Physically Addressed Caches:
    • Use physical addresses exclusively for accessing the cache.
    • Similar processes occur for hits and misses as in virtually addressed caches.

Cache Access Operations

  • Virtually Addressed Cache:
    • Access patterns in memory and exception handling for valid/invalid addresses.
  • Physically Addressed Cache:
    • Similar access, but the focus is on physical addresses and consistency with physical memory.

Superpages

  • Superpages are defined as sets of contiguous pages in physical memory that correspond to a contiguous region of virtual memory.
  • The operation of TLB is optimized when virtual pages fall within the superpage, allowing for more efficient address translation.

Summary

  • The lecture has concluded the coverage of Memory Management and will transition to the discussion of File Systems.