Operating Systems Virtual Memory

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

What is the procedure for handling a page fault?

1. We check an internal table (usually kept with the process control block) for this process to determine whether the reference was a valid or an invalid memory access. 2. If the reference was invalid, we terminate the process. If it was valid but we have not yet brought in that page, we now page it in. 3. We find a free frame (by taking one from the free-frame list, for example). 4. We schedule a disk operation to read the desired page into the newly allocated frame. 5. When the disk read is complete, we modify the internal table kept with the process and the page table to indicate that the page is now in memory. 6. We restart the instruction that was interrupted by the trap. The process can now access the page as though it had always been in memory. Each page fault generates the large amount of overhead needed for processing the interrupt, saving registers, replacing a page, queuing for the page device, and updating tables. To minimize the number of faults, we need to have a large page size.

What is a page fault?

Access to a page marked invalid causes a page fault. Meaning that the page was not brought into main memory.

What is Global Allocation and Local Allocation?

Global replacement allows a process to select a replacement frame from the set of all frames, even if that frame is currently allocated to some other process; that is, one process can take a frame from another. Local replacement requires that each process select from only its own set of allocated frames.

What is Thrashing?

If a process does not have "enough" pages, the page-fault rate is very high. This leads to: - Low CPU utilization - Operating system thinks that it needs to increase the degree of multiprogramming - Another process added to the system Thrashing = a process is busy swapping pages in and out. A process is thrashing if it is spending more time paging than executing.

Drawback, advantages of Global Allocation and Local Allocation?

One problem with a global replacement algorithm is that a process cannot control its own page-fault rate. The set of pages in memory for a process depends not only on the paging behavior of that process but also on the paging behavior of other processes. Therefore, the same process may perform quite differently (for example, taking 0.5 seconds for one execution and 10.3 seconds for the next execution) because of totally external circumstances. Such is not the case with a local replacement algorithm. Under local replacement, the set of pages in memory for a process is affected by the paging behavior of only that process. Local replacement might hinder a process, however, by not making available to it other, less used pages of memory. Thus, global replacement generally results in greater system throughput and is therefore the more commonly used method.

What is the purpose of a inverted page table?

The purpose of this form of page management is to reduce the amount of physical memory needed to track virtual-to-physical address translations. We accomplish this saving by creating a table that has one entry per page of physical memory, indexed by the pair <process-id, page-number>

What is Virtual Memory?

Virtual memory is a technique that allows the execution of processes that are not completely in memory. One major advantage of this scheme is that programs can be larger than physical memory. Further, virtual memory abstracts main memory into an extremely large, uniform array of storage, separating logical memory as viewed by the user from physical memory.

What is Demand Paging?

With demand-paged virtual memory, pages are loaded only when they are demanded during program execution.

What is Belady's anomaly?

for some page-replacement algorithms, the page-fault rate may increase as the number of allocated frames increases. We would expect that giving more memory to a process would improve its performance. In some early research, investigators noticed that this assumption was not always true. Belady's anomaly was discovered as a result.


Kaugnay na mga set ng pag-aaral

ATI Introduction to Health Assessment Test

View Set

MICRO Week 8, MICRO Week 13 & 14, Week 11 Micro, MICRO Week 9, MICRO week 10, Week 10 Micro

View Set

collaboration in and across teams

View Set

clinical decision making practice questions

View Set

CH 6 ECON: Demand, Supply, and Prices

View Set

bsan 101 Excel Chapter 1: Testbank Quiz

View Set

Federal Income Tax I--Chapter 10-12 Test

View Set