Module 4 Flashcards
It is a technique that allows the execution of processes that may not be completely in memory.
Virtual Memory
True or Flase
In Virtual Memory, programs can be larger than physical memory.
True
Virtual Memory _________ main memory into a large uniform array of storage.
Abstracts
Virtual Memory ___________ logical memory from physical memory and allows users to have a large virtual memory with a small physical memory.
Separates
True or False
Virtual Memory frees the concerns of memory storage limitations.
True
True or False
In Virtual Memory, multiple programs do not need to be in main memory at the same time.
True
What are the benefits of Virtual Memory?
- A program would no longer be constrained by the amount of physical memory available.
- More programs could run at the same time.
- Less I/O is needed to load or swap each program into memory (i.e. it runs faster).
This system is similar to a paging system with swapping.
Demand-Paging System
This is when the OS or pager swaps only the necessary pages into memory.
Lazy Swapping
In Demand-Paging, there is an additional bit in the page table which is the __________.
Valid-Invalid Bit
It is when the page is in memory/primary memory.
Valid Bit
It is when the page is in secondary storage.
Invalid Bit
Using a page not in physical memory will result in a __________.
Page-Fault
This will cause a trap indicating an invalid address error.
Page-Fault
Steps in Handling Page-Fault:
Step 1: The system could start executing a process with no pages in memory in extreme
cases. It would immediately fault for the page with the first instruction.
Step 2: After the first page is brought into memory, the process would continue to execute,
faulting as necessary until every page that it needed was actually in memory.
Step 3: This is pure demand paging: never bring a page into memory until it is required.
Step 4: The principle of locality of reference ensures that programs do not access a new
page of memory with each instruction execution.
Step 5: The effectiveness of the demand paging is based on the locality of reference.
Step 6: Analysis of programs shows that most of their execution time is spent on routines in
which many instructions are executed repeatedly.
Step 7: It is important to keep the page-fault rate low in a demand-paging system. Otherwise,
the effective access time increases, slowing down process execution dramatically.
Step 8: A problem occurs if there is a need to transfer a page from disk to memory but there is
no memory space or free frames available. In other words, memory is over-allocated.
What step is this in handling Page-Fault?
The system could start executing a process with no pages in memory in extreme
cases. It would immediately fault for the page with the first instruction.
Step 1
What step is this in handling Page-Fault?
After the first page is brought into memory, the process would continue to execute,
faulting as necessary until every page that it needed was actually in memory.
Step 2
What step is this in handling Page-Fault?
This is pure demand paging: never bring a page into memory until it is required.
Step 3
What step is this in handling Page-Fault?
The principle of locality of reference ensures that programs do not access a new
page of memory with each instruction execution.
Step 4
What step is this in handling Page-Fault?
It is important to keep the page-fault rate low in a demand-paging system. Otherwise,
the effective access time increases, slowing down process execution dramatically.
Step 7
What step is this in handling Page-Fault?
Analysis of programs shows that most of their execution time is spent on routines in
which many instructions are executed repeatedly.
Step 6
What step is this in handling Page-Fault?
A problem occurs if there is a need to transfer a page from disk to memory but there is
no memory space or free frames available. In other words, memory is over-allocated.
Step 8
How many steps are there in handling Page-Fault?
8 Steps
True or False
The operating system could terminate the user process. However, demand paging is the operating system’s attempt to improve the computer system’s utilization and throughput.
True
True or False
Users should not be aware their processes are running on a paged system; paging should be logically transparent to the user.
True
In this scheme, the operating system removes or replaces one of the existing pages in memory to give way for the incoming page.
Page Replacement