OS - Chapters 7-8

  1. Types of address binding
    • Static - Binding before execution
    • Dynamic - Binding at runtime
  2. How is an address dynamically bound
    • Processor generates a logical address
    • Logical address is passed through an address map
    • Physical address can reference main memory
  3. What does the relocation register contain?
    The starting memory (physical) address of the current program
  4. Two methods of logical to physical address translation
    • Address map
    • Reloaction register addittion
  5. Memory partitioning schemes
    • Fixed
    • Variable
  6. Characteristics of fixed partitioning schemes
    • Main memory is divided into physical partitions
    • Partitioning happens at OS initialization
    • Partitions might have different sizes
  7. Characteristics of dynamic partitioning schemes
    • OS assigns exact amount of space requested
    • Partitions variable by length and number
  8. If the holes in memory are not adjacent, how to combine them to get a large memory block? List two approaches.
    • Linked list implementation
    • Bitmap - Where each bit represents some portion of the memory and indicates whether it is free or occupied.
  9. How to quickly calculate pa = f*2^([w])? Give two solutions.
    • Left shift the frame number by W bits, then add W to it
    • Concatenate F and W into one number
  10. List the placement algorithms when it is time to load or swap a process into memory
    • First Fit
    • Next Fit
    • Best Fit
  11. How does first fit placement work?
    Scan from the beginning and choose the first available block that is large enough.
  12. List three replacement algorithms for deciding which page to evict when no no free page frames are available in memory.
    • FIFO
    • Least Recently Used (LRU)
    • Random
  13. Breifly explain the buddy system
    Any hole can be divided into two holes. These two holes are called buddies and can be combined together to get a hole of their original size.
  14. What is a page (Virtual Memory)?
    A fixed-size portion of virtual memory
  15. What is a frame (virtual memory)?
    A fixed-size portion of physical memory
  16. How to pages map to frames?
    A page table
  17. Anatomy of a page address
    • Some bits representing page address (leftmost)
    • Some bits representing offset (rightmost)
  18. How to calculate maximum size of virtual memory?
    2^(total number of bits in address)
  19. What does the page table register hold?
    The starting address of the page table of the currently running process
  20. What can a segment contain?
    An entire logical component (function, module or stack)
  21. Purpose of segmentation
    Allows programmer to view memory as consisting of multiple address spaces or segments
  22. What is the STR, what does it do?
    • Segment Table Register
    • Contains starting address of the segment table
  23. Function to convert a page or segment to a physical address
    • foo(s, w) {
    •   pa = *(PTR + w) + w;
    •   return pa;
    • }
  24. How does combined segmentation and paging work?
    • Memory is broken up into segments (programmer discretion)
    • Segments are broken up into fix-sized pages (same size as frames)
  25. Minimum size of a segment
    Page size
  26. Three parameters needed to calculate physical address in combined paged and segmented systems
    • Segment address
    • Page (Within segment - as an offset)
    • Offset (within page)
  27. Relative performance of the three process swapping methods
    LRU > FIFO > Random
Author
Ant
ID
359880
Card Set
OS - Chapters 7-8
Description
Updated