CISY 217 Virtual Memory - Demand Paging

Stephen Brower
9 Feb 201404:54

Summary

TLDRIn this video, Steven Brower discusses virtual memory, contrasting it with physical memory management techniques covered in Chapter 2, such as fixed and dynamic partitions. Virtual memory allows a system to reference more memory than physically available by using disk space. The concept of memory pages is introduced, where memory is divided into equal-sized pages that can reside either in physical memory or on disk. The page map table tracks whether pages are in memory or on disk, and the operating system swaps pages in and out of memory as needed, ensuring efficient memory use.

Takeaways

  • 🖥️ Virtual memory allows a system to reference more memory than physically exists.
  • 🧩 Memory is divided into equal-sized blocks called pages.
  • 💾 Virtual memory extends physical memory by using the disk as additional space.
  • ⚙️ The operating system manages memory, loading necessary parts into physical memory as needed.
  • 📋 A page map table tracks whether a page is in memory or on disk.
  • 📦 Jobs are allocated available memory pages as they run, which are tracked by the page map table.
  • ⏳ Pages not referenced for a while are removed from memory to make space for new pages.
  • 💡 If a job needs a page that's on disk, the operating system loads it into an available free page in memory.
  • 🔄 When pages are loaded from disk, the page map table is updated to reflect their new location in memory.
  • 📂 Pages can reside either in physical memory or on the disk, and the page map table indicates their current state.

Q & A

  • What is the main topic of discussion in Chapter 3?

    -The main topic of discussion in Chapter 3 is virtual memory, which allows a system to reference more memory than physically exists by utilizing the disk to extend memory capabilities.

  • What is the difference between memory partitioning in Chapter 2 and virtual memory in Chapter 3?

    -In Chapter 2, memory partitioning involves allocating fixed or dynamic partitions in physical memory, where all pages must be physically present. In Chapter 3, virtual memory introduces the concept of using disk space to extend memory, meaning not all pages need to be physically present in memory at all times.

  • What is the purpose of dividing memory into pages in virtual memory?

    -Dividing memory into pages in virtual memory allows for even-sized blocks of memory that can be stored either in physical memory or on the disk. This enables the system to manage memory more efficiently, swapping pages between disk and memory as needed.

  • How does the operating system manage memory pages in virtual memory?

    -The operating system manages memory pages by using a page map table, which tracks whether a page is in memory or on the disk. When a job needs to reference a page that is not in memory, the operating system retrieves the page from the disk and loads it into a free memory page.

  • What happens when a job needs to access a page that is currently on disk?

    -When a job needs to access a page on disk, the operating system identifies a free page in memory, retrieves the page from the disk, and loads it into that memory location. The page map table is then updated to reflect the new location of the page.

  • What is a page map table, and what information does it contain?

    -A page map table is used to track the status of each page in a job's memory. It indicates whether a page is in memory or on disk, and if in memory, it shows the specific memory frame where the page resides.

  • What happens to a memory page if it is not referenced for a while?

    -If a memory page is not referenced for a while, it may be removed from memory to free up space for other pages. The page can then be stored on disk until it is needed again.

  • In the example given, how many pages does job 1 require, and how are they allocated?

    -In the example, job 1 requires four pages, and they are allocated to free pages in memory, specifically to pages 4, 5, 6, and 7.

  • What happens to job 4 when it needs to reference a page that is currently on disk?

    -When job 4 needs to reference a page on disk, the operating system finds a free memory page, retrieves the page from disk, and loads it into memory. The page map table is updated to reflect that the page is now in memory.

  • How does virtual memory improve memory management compared to fixed or dynamic partitioning?

    -Virtual memory improves memory management by allowing more memory to be accessed than is physically available, using disk space to extend memory. Unlike fixed or dynamic partitioning, which requires all necessary pages to be in physical memory, virtual memory can store less frequently used pages on disk, optimizing memory usage.

Outlines

plate

This section is available to paid users only. Please upgrade to access this part.

Upgrade Now

Mindmap

plate

This section is available to paid users only. Please upgrade to access this part.

Upgrade Now

Keywords

plate

This section is available to paid users only. Please upgrade to access this part.

Upgrade Now

Highlights

plate

This section is available to paid users only. Please upgrade to access this part.

Upgrade Now

Transcripts

plate

This section is available to paid users only. Please upgrade to access this part.

Upgrade Now
Rate This

5.0 / 5 (0 votes)

Related Tags
Virtual MemoryMemory ManagementPagingOperating SystemsMemory PartitioningDynamic AllocationDisk StoragePage TableMemory OptimizationJob Processing