A little about memory
Before proceeding to the analysis, I will briefly talk about how memory manages. After that, it will be easier for you to understand what information is presented in the Windows 7 Resource Monitor.
The Windows 7 Memory Manager creates a virtual memory system that consists of available physical RAM and a swap file on the hard drive. This allows the operating system to allocate fixed-length blocks of memory (pages) with consecutive addresses in physical and virtual memory.
Launching Windows 7 Resource Monitor
To launch the Windows 7 Resource Monitor, open the Start menu (Start), type "Resmon.exe" in the search bar and click . In the window that opens, select the "Memory" tab (Memory, Fig. A).
Figure A The Memory tab in Windows 7 Resource Monitor provides detailed memory allocation information.
Table "Processes"
The Memory tab has a Processes table (Figure B) that lists all the running processes, with the memory used broken down into several categories.
Figure B The memory usage information for each process is broken down into several categories.
Column "Image"
The Image column contains the name of the process's executable file. The processes started by applications are very easy to recognize - for example, the "notepad.exe" process obviously belongs to Notepad (Notepad). Processes named "svchost.exe" represent various operating system services. The name of the service is given in parentheses next to the process name.
Process ID column
The Process ID (PID) column indicates the process number, a unique combination of numbers that identifies a running process.
Column "Completed"
The Commit column indicates the amount of virtual memory, in kilobytes, that the system has reserved for this process. This includes both the physical memory used and the pages stored in the paging file.
Column "Working set"
The Working Set column shows the amount of physical memory, in kilobytes, that the process is currently using. The working set is made up of shared and private memory.
Column "General"
The Shareable column shows the amount of physical memory, in kilobytes, that this process is sharing with others. Using the same memory segment or swap page for sibling processes saves memory space. In this case, only one copy of the page is physically stored, which is then mapped to the virtual address space of other processes that access it. For example, all processes initiated by the system DLLs - Ntdll, Kernel32, Gdi32, and User32 - use shared memory.
Column "Private"
The Private column indicates the amount of physical memory, in kilobytes, that is exclusively used by this process. It is this value that allows you to determine how much memory a particular application needs to work.
Column "Errors of the absence of a page in memory / sec."
In the column "Page out of memory errors / sec." (Hard Faults/sec) indicates the average number of memory page faults per second over the last minute. If a process tries to use more physical memory than is currently available, the system writes some of the data from memory to disk - the paging file. The subsequent access to the data saved to disk is called a page out of memory error.
What do page out errors indicate?
Now that you have an idea of what information is collected in the Processes table, let's see how to use it to monitor memory allocation. As applications start and work with files, the memory manager keeps track of the working set for each process and captures requests for additional memory resources. As a process's working set increases, the dispatcher matches these requests to the needs of the kernel and other processes. If there is not enough available address space, the dispatcher shrinks the working set by saving data from memory to disk.
Later, when reading this data from disk, a page out of memory error occurs. This is quite normal, but if errors occur simultaneously for different processes, the system needs additional time to read data from disk. Too frequent out-of-memory errors, respectively, reduce the performance of the system. You have probably experienced an unexpected slowdown in all applications, which then also suddenly stopped. Almost certainly, this slowdown was due to the active reallocation of data between physical memory and swap.
The conclusion follows from this: if out-of-page errors for a particular process occur too often and moreover regularly, the computer does not have enough physical memory.
To make it easier to monitor processes that cause frequent page out of memory errors, you can mark them with flags. This will move the selected processes to the top of the list, and the page out of memory error graph will be represented by an orange curve.
Keep in mind that memory allocation depends on a number of other factors, and monitoring out-of-page errors is not the best or the only way to identify problems. However, it can serve as a good starting point for observation.
Table "Physical memory"
The Processes table provides detailed information about memory allocation between individual processes, while the Physical Memory table gives a general picture of RAM usage. Its key component is the unique histogram shown in Fig. C.
Figure C. The bar graph in the Physical Memory table provides an overview of memory allocation in Windows 7.
Each section of the histogram is marked with its own color and represents a specific group of memory pages. As the system is used, the memory manager moves data between these groups in the background, maintaining a delicate balance between physical and virtual memory to keep all applications running efficiently. Let's take a closer look at the histogram.
Section "Reserved Equipment"
On the left is the "Hardware Reserved" section, marked in gray: this is the memory allocated for the needs of the connected equipment, which it uses to interact with the operating system. Memory reserved for hardware is locked and cannot be accessed by the memory manager.
Usually, the amount of memory allocated to the hardware is between 10 and 70 MB, but this figure depends on the specific configuration of the system and in some cases can reach several hundred megabytes. Components that affect the amount of reserved memory include:
;
Components motherboard- for example, an advanced programmable input / output interrupt controller (APIC);
sound cards and other devices that perform memory-mapped input/output;
PCI Express (PCIe) bus;
video cards;
various chipsets;
flash drives.
Some users complain that their systems have an abnormally large amount of memory reserved for hardware. I have never encountered such a situation, and therefore I cannot vouch for the effectiveness of the proposed solution, but many note that updating the BIOS version solves the problem.
Section "Used"
The In Use section, Figure C, labeled in green, represents the amount of memory used by the system, drivers, and running processes. The amount of memory used is calculated as the value of "Total" (Total) minus the sum of the indicators "Changed" (Modified), "Waiting" (Standby) and "Free" (Free). In turn, the value of "Total" is the indicator "Installed" (Installed RAM) minus the indicator "Reserved equipment".
Section "Changed"
Highlighted in orange is the "Modified" section, which shows modified but not used memory. In fact, it is not used, but can be activated at any time if needed again. If the memory has not been used for a long time, the data is transferred to the paging file, and the memory goes into the Standby category.
Section "Waiting"
The Pending section, shown in blue, represents memory pages that have been removed from the working sets but are still associated with them. In other words, the Pending category is actually a cache. Memory pages in this category are assigned a priority of 0 to 7 (maximum). Pages associated with high priority processes receive the highest priority. For example, shared processes have a high priority, so their associated pages are given the highest priority in the Pending category.
If a process needs data from a pending page, the memory manager immediately returns that page to the working set. However, all pages in the Pending category are available for writing data from other processes. When a process needs additional memory, and there is not enough free memory, the memory manager chooses a pending page with the lowest priority, initializes it, and allocates it to the requesting process.
Section "Free"
The Blue Free category represents pages of memory that have not yet been allocated to any process or that have been freed after the process exits. This section shows both not yet used and already freed memory, but in fact, not yet used memory belongs to another category - "Zero Pages" (Zero Page), which is so called because these pages are initialized to zero and ready for use.
About the problem of free memory
Now that you have a basic idea of how the memory manager works, let's take a quick look at a common misconception about Windows 7's memory management system. C, the free memory section is one of the smallest in the histogram. However, it is a mistake to assume on this basis that Windows 7 consumes too much memory and that the system cannot work properly if there is so little free memory.
In fact, it's quite the opposite. In the context of the Windows 7 approach to memory management, free memory is useless. The more memory involved, the better. By filling up memory to the maximum and constantly moving pages from one category to another using a priority system, Windows 7 improves efficiency and prevents data from entering the page file, preventing out-of-memory page faults from slowing down performance.
Memory monitoring
Want to see the control system Windows memory 7 in action? Reboot your computer and open the Windows 7 Resource Monitor immediately after startup. Go to the Memory tab and pay attention to the ratio of sections in the physical memory histogram.
Then start running applications. As you run, watch the histogram change. Running as soon as possible more apps, start closing them one by one and watch how the ratio of sections in the physical memory histogram changes.
By doing this extreme experiment, you will understand how Windows 7 manages memory on your particular computer and you can use the Windows 7 Resource Monitor to monitor memory allocation under normal day-to-day working conditions.
What do you think?
Do you like the idea of using the Windows 7 Resource Monitor to monitor memory allocation? Share your opinion in the comments!
You have connected a new device, but it is in no hurry to work, or the old device has stopped functioning, or does not work correctly. What to do in these cases? Reinstall everything? It's a hassle, and it's not always necessary. How to find out what is the reason and how to eliminate it? Very simple. The fact is that in the operating system of the Windows family, and not only, there is, someDevice Manager, in fact, a very necessary and useful manager, if you can call him that. Here it is, it will help us find out what is the cause of the problem, and my cheat sheet will fix the problem. So, in the aboveDevice Manager there are traces of errors in the operation of devices in the form of codes. Knowing the error code, it is easy to determine the cause of the problem. For the uninitiated, the codes are just incomprehensible and meaningless numbers. But to a knowledgeable user, they can tell a lot. I will try my best to shed some light on this subject.
To view device errors, we first need to enter the Device Manager itself. It is done like this. Sign inControl Panel from the menuStart ( can,My a computer , right-clickProperties — Device Manager, and it is also possible through the task of the command inexecute , but why complicate things). If we enter throughPanel management , then the path is:System - Hardware - Device Manager . Choose by entering the menuDevice Manager , the type of device we are interested in (keyboard, printer, modem, etc.), double-click on it, as a result we will see the devices included in this type. Select the device we need and double-click on it. We look at the column on the About tabgeneral, device status. If there is a problem with the operation of the device, it will be displayed here as an error code. So we see numbers and numbers. What do they stand for. Below I provide a complete list of errors, with a brief description of the error and possible solutions. The error code is highlighted in red, its description in blue and the elimination in black.
Code 1There is a problem with the device setup, the settings are not correct or the driver is missing. Click the button Update Driver , to start the wizardHardware upgrade . If there is no driver at all, install it.
Code 3The device driver is damaged, as an option there is not enough RAM for the device to work correctly.1. Remove the damaged driver and install a new one. To do this: Properties - Driver - Delete, then follow the instructions of the wizard. Reboot. We open againDevice Manager — Action — Update hardware configuration and follow the instructions of the master. 2. If the problem is lack of virtual memory, close running applications to unload memory. To check the state of the memory we need to get intoTask Manager , to do this, press the key combinationCtrl+Shift+Esc.We can see the virtual memory settings by right-clickingMy computer — Properties - Advanced - Performance - Settings (Parameters) . You can try to increase the swap file (I described how this is done in one of the previous articles on my blog), but this is far from a drastic measure. You have to increase RAM. How this is done is a separate topic that goes beyond the scope of this post.
Code 10The registry key has a device-specific settingFailReasonString,the value of this parameter is displayed in the error data, that is, if there is no parameter as such, then an error code appears, in other words, the device cannot be started. Update the driver as above. Or install a newer one.
Code 12There is no stock of resources required for this device. Disable other running devices, at least one, to do this, use the troubleshooting wizard, which, if you follow its instructions, will disable the conflicting device. (In short, let me remind you: Properties - General - Troubleshooting.)
Code 14Requires a PC restart for this device to work.
Code 16It is not possible to identify the resources that are necessary for the operation of the device, the device is not fully configured. You need to assign additional resources to the device. But this can be done without problems if the device belongs toPlug and play.
Properties - Resources. If there is a resource with the ? sign in the list of resources, select it to assign it to the selected device. If the resource cannot be changed, clickChange settings , if this function is not available, uncheck the boxAutomatic setting
Code 18Reinstall the device driver. We try to update the driver or remove it and do it, as in the example withcode 3.
Code 19Insufficient information in the registry about the device settings, or the settings are corrupted. RunTroubleshooting Wizard and follow his instructions, it will not help - reinstall the device, as mentioned above. (code 3). Or, if that doesn't work, downloadLast Known Good Configuration. If this does not help, you need the help of a specialist, as it is necessary to edit the system registry. Lacking knowledge and experience, on your own, there is nothing for you to do there, any system administrator will confirm this for you. Knowing and able, he knows how to do it, without me. And for the inexperienced, it's better not to try. The registry is the heart of the operating system and only an experienced specialist, or under his guidance, should carry out operations on it. In no way do I want to offend anyone, but if you have not worked with the system registry and if your computer is dear to you, my advice is to forget your way there. I do not write for professionals, they do not need it, but for the average user. Of course, I can write how and what to do there, but this will be an explanation on the fingers, and if you, as a result of the slightest mistake, damage your computer, I will be to blame. I don't need it at all, and neither do you.
Code 21 The device is removed from the system, that is, the operating system is trying to remove the device, but the process has not yet completed.
Pause for a few seconds and press the key
Code 22 The device is disabled. The device must be turned on.Action - Enable and follow further instructions.
Code 24 The device is missing or incorrectly installed, the driver has failed, the device may have been prepared for removal. Remove the device and reinstall.
Code 28 There is no driver. Install the driver. To do this, you need to Update the driver, the steps are as in the instructions for Code 1.
Code 29Disabled device . You need to allow the device to work in settingsBIOS,read the instructions for using the device.
Code 31The system was unable to load drivers for this device. . Update your drivers as described above.
Code 32The driver for this device is disabled in the system registry . Uninstall and reinstall the driver (described above)
Code 33The operating system cannot determine the resources for this devices . Set up the device or replace it.
Code 34The operating system cannot determine the settings devices . Review the hardware documentation that came with it and manually configure it on the Resources tab.
Code 35The PC firmware does not have the necessary information to properly device operation . Need to updateBIOS.For instructions on how to do this, contact the supplier, but it is better to use the services of an experienced craftsman.
Code 36The device requires an interrupt to operate.PCI,and the device is set to interruptisa,or vice versa . Need to change settingsBIOS,refer to an experienced master.
Code 37The operating system does not recognize the driver for this device. . Reinstall the driver (described above).
Code 38The OS cannot load the driver for the device because, the previous version of the driver remains in memory . You need to restart your PC. Run the Troubleshooting Wizard if it does not start (Properties - General - Troubleshooting) and follow the instructions of the wizard. After a mandatory reboot.
Code 39The OS cannot load the device driver. Driver is corrupted or not at all . Reinstall the driver as described above.
Code 40There is no access to the equipment, as there is no information in the system registry or the information contains an error . Reinstall the driver.
Code 41Device not detected . Run the Troubleshooting Wizard (described above), if it does not help, update the hardware configuration (see above) or update the driver. If not, please install a newer version of the driver.
Code 42The system already has such a driver. That is, there are two different devices with the same name, possibly due to a bug . Restart your PC.
Code 43Stopping the device due to problems in its operation . Run the Troubleshooting Wizard and follow its instructions.
Code 44An app or service has stopped the device . Restart your PC.
Code 45Device not connected . Connect your device.
Code 46This error appears when the operating system shuts down. Nothing needs to be done, the next time you start the OS everything will work.
Code 47 The device has been prepared for secure removal but has not yet been removed (e.g. flash) . Remove the device, then plug it back in, restart your PC.
Code 48The device, or rather its software, is blocked . Update the driver or install a new one.
Code 49The device cannot be started because it has a large system registry hive that exceeds the allowable registry settings . Delete devices that are not in use from the registry. You can do this: Device Manager - View - Show hidden devices. Here you will see hidden devices that are not connected to your PC. Select the devices you want to remove, click Properties for the device - Driver - Uninstall, then follow the instructions of the wizard and finally restart the PC.
Manual for removing any viruses from your PC with your own hands. All methods of removing viruses are really working and proven in practice, step-by-step instruction with illustrations - simple and accessible even for a schoolchild + video tutorials + ultraiso program to create bootloaders + useful links to tools in the fight against viruses. Download archive
Many computing systems incorporate some form of memory manager (also known as a memory manager, MMU), with which a multitasking operating system allocates memory to each task and provides protection from user programs. For example, a typical problem occurs when an application program makes an error in computing an address, perhaps using an index value that is too large or too small. If there is no protection in the system, this kind of error can change the codes included in the programs of the operating system, or modify the device tables, and even cause an unplanned start of the device with fatal consequences, such as an unauthorized write to the data file.
In addition to protecting the operating system from inadvertent destruction, the memory manager provides automatic program relocation. The memory manager converts the logical or program addresses of user programs into physical or hardware addresses. These addresses may be located in memory completely different from where logical addresses point. Address translation results in the complete removal of the operating system and protected I/O devices from the user's address space. Any attempt to read or write to memory outside the user's address space causes the processor to crash the user's program.
Information is usually transmitted in chunks consisting of a fixed number of bits; The 80386 MP uses chunks of 32 bits unless it is instructed to reduce chunk sizes to 16 bits. These portions are called words. The process of writing a word into a memory system is called memory entry, the process of getting a word from memory - reading from memory.
There are two memory access methods: random and sequential. Sequential access is used in those memory systems where words are accessed in some predetermined order. Random access, on the other hand, involves the possibility of accessing the words of a storage system in any order and in approximately the same time.
No matter how perfect the memory is, when the signal passes between devices, there are delays in its propagation. Propagation delay is defined as the time required for a logic signal to travel through a device or a sequence of devices forming a logic chain. This delay also takes into account the signal passing through all interconnecting lines between microcircuits.
Direct Memory Access (DMA)
Direct memory access allows external devices and memory to directly exchange data without program intervention. DMA provides maximum I/O speed and maximum process parallelism. While interrupt I/O and software-controlled I/O transfer data through the processor, in the case of DMA, data is transferred directly between the I/O device and memory.
In order to minimize the number of data buses, special measures are taken to allow the use of a conventional backbone for RPS. These measures consist in the fact that the processor releases the highway, and the external device captures it and uses it to transfer data.
For the duration of the RAP, the execution of the program is usually suspended. The trunk is released as soon as the RAP request control line is excited. The processor terminates the current operation, releases the address and data lines, and asserts a signal on one of the control lines to prevent inadvertent decoding of undefined control signals.
The I/O interface transfers data directly to memory using a special register. When it needs to transfer data, the interface asks the processor for a memory cycle. Once acknowledged, the interface sends the data directly to memory while the processor pauses for one memory cycle. The logic that performs this transfer is called channel.
The channel contains a register for storing the address of the memory location to or from which data is being transferred. In most cases, the channel also includes a word counter to count the number of direct transfers made. In addition, the channel must contain a circuit that provides the exchange of control signals, synchronization and other auxiliary operations. On fig. 13.4 shows the logical connections between the CPU and the PDP controller.
RAP components. The main components of a DMA are a request trigger, an address register, a counter, and a data register that is used by the peripheral. Forwarding data over a DMA channel includes several steps: 1) initialization of the DMA logic to perform the DMA during repeated backbone occupation cycles; 2) asynchronous with respect to the program operations activation of the RAP; 3) notification of the end of transfers (on a signal from the counter or as a result of a change in the state of the device); 4) calling the "cleanup" program at the end of transfers; 5) completion of the DMA with the help of an interrupt handler, which returns control to the main program.
Block data transfer. The DMA procedure for high-speed devices uses data transfer in blocks. By executing the current program, the processor initiates the transfer of a block of data and determines the number of words that make up the block. However, the actual transmission of words is performed under the control of a separate device - the PMA controller. The maximum block transfer rate over the DMA channel is limited only by the duration of the memory cycle (read or write) and the speed of the DMA controller.
RAP with occupation of the memory cycle. The program initiates a block transfer by placing the start address in the address counter and the number of words in the word counter. and issuing a run command. This type of RAP is often referred to as RAP with occupying the memory cycle, because it pauses program execution for approximately one machine cycle each time.
When using DMA with a memory cycle, data transfer is carried out in parallel with other processes performed by the CPU. The sequence of actions here is the same as for the block transfer, with the exception that the DMA controller takes up memory cycles from the processor and, therefore, slows down its operation (block data transfer over the DMA channel also takes memory cycles, unless DMA is used on a separate bus).
When a process starts in Windows, many of the pages that display EXE and DLL file images may already be in memory because they are being used by other processes. Writable image pages are labeled "copy-on-write" so they can be shared until they need to be modified. If the operating system recognizes an EXE that was already running, it can write the page link pattern (using a technique that Microsoft calls Super-Fetch). This technology tries to prefetch many necessary pages in advance (although the process has not yet received page faults on them). This reduces the latency of launching applications (reading pages from disk is superimposed on the execution of the initialization code of images). This technology improves disk output performance by making it easier for disk drivers to orchestrate read operations (to reduce the required seek time). This prefetching process is also used during system boot, as well as when a background application comes to the foreground and when the system resumes from hibernation.
Forward paging is supported by the memory manager, but is implemented as a separate system component. Swapped pages are not inserted into the process's page table, instead they are inserted into a standby list, from which they can be quickly inserted into the process (without disk access).
Unmapped pages are somewhat different - they are not initialized by reading from a file. Instead, the first time an unmapped page is accessed, the memory manager provides a new physical page (making sure its contents are zero-filled, for security reasons). On subsequent page faults, the unmapped page may need to be found in memory or read from the swap file.
Demand paging in the memory manager is controlled by page faults. Every error causes an interrupt to the kernel. The kernel then builds a machine-independent handle (which reports what happened) and passes it to the runtime memory manager. The memory manager then checks the access for validity. If the failed page falls within the committed area, then it looks up the address in the VAD list and finds (or creates) the process's page table entry. In the case of a shared page, the memory manager uses the prototype page table entry (associated with the segment object) to populate the new process page table entry.
The page table entry format differs depending on the processor architecture. For x86 and x64 processors, the elements of the displayed page are shown in fig. 11.17. If an element is marked as valid, then its content is interpreted by the hardware (so that the virtual address can be translated into a valid physical page). Unrendered pages also have their own elements, but they are marked as invalid and the hardware ignores the rest of the element. The software format is slightly different from the hardware format and is determined by the memory manager. For example, for an unmapped page (which must be laid out and zeroed before being used), this fact is noted in the page table entry.
Two important bits of the page table entry are updated directly by the hardware. These are the access bit (A) and the changed bit (D). These bits keep track of the use of a given page mapping to access the page, and whether the page can be modified by that access. This really improves system performance because the memory manager can use the access bit to implement Least-Recently Used (LRU) paging. The principle of LRU is that those pages that have not been used the longest have the least chance of being reused in the near future. The access bit allows the memory manager to determine that the page has been accessed. The "modified" bit tells the memory manager that the page may have been modified (or, more importantly, it has not been modified). If the page has not been modified since it was read from disk, then the memory manager does not need to write its contents to disk (before using it for something else).
Both the x86 and x64 architectures use a 64-bit page table entry (see Figure 11.17).
Each page fault can be classified into one of five categories:
1. The page is not fixed.
2. Attempt to access a page with permission violation.
3. Attempt to modify a copy-on-write page.
1. Need to increase the stack.
2. The page is fixed but not currently displayed.
The first and second cases are programming errors. If a program tries to use an address that does not have a valid mapping, or tries to perform an illegal operation (such as trying to write to a read-only page), this is called an access violation and usually results in the termination of the process. An access violation is often the result of invalid pointer values, including access to memory that has been freed and detached from the process.
The third case has the same symptoms as the second (an attempt to write to a read-only page), but its handling is different. Because the page was marked copy-on-write, the memory manager does not throw an access violation. Instead, it makes a private copy of the page for the current process, and then returns to the thread that attempted to write to the page. The thread retries the write operation, which will now complete without a page fault.
The fourth case occurs when a thread pushes a value onto its stack and hits a page that hasn't been allocated yet. The memory manager recognizes this as a special case. As long as there is room in the virtual pages reserved for the stack, the memory manager will supply new pages, zero them out, and map them to the process. When the thread resumes execution, it will retry the access, and this time it will succeed.
And finally, the fifth case is a normal page fault. However, it has several sub-variants. If a page is mapped to a file, then the memory manager must examine its data structures (such as the prototype page table associated with the segment object) to ensure that there is no copy of it in memory. If there is a copy (for example, in another process, in a standby list, or in a list of modified pages), then it will simply make it shared (it may have to mark it as copy-on-write to do this if the changes are not shared). supposed). If there is no copy yet, then the memory manager will allocate a free physical page and prepare it for copying a page of the file from disk into it, unless another page is being transferred from disk at that moment (in which case you just need to wait until this transfer is completed).
If the memory manager can handle a page fault by finding the correct page in memory (rather than reading it from disk), then the error is called a soft fault. If you need a copy from disk, then this is a hard fault. Soft bugs are much cheaper and have little impact on application performance (compared to hard bugs). Soft errors can occur because the shared page has already been mapped to another process, or simply a new zeroed page is needed, or the desired page has been removed from the process's working set but is reclaimed before being reused. Soft errors can also occur because pages have been compressed to effectively increase the size of physical memory. For most CPU configurations, it is more efficient to compress memory and I/O in current systems, rather than wasting expensive I/O (in terms of performance and power) that requires reading a page from disk.
When a physical page is no longer mapped to any process's page table, it is placed on one of three lists: free, modified, or reserved. Those pages that are never needed again (such as the stack pages of a terminating process) are freed immediately. Those pages that can page fault again are either in the modified list or in the reserve list (depending on whether the "modified" bit was set for any page table element that displayed this page since it was last read from disk). Pages from the modified list will eventually be written to disk and then moved to the reserve list.
The memory manager can allocate pages as needed (using a list of either free or reserved pages). Before allocating a page and copying it from disk, the memory manager always checks the lists of reserved and modified pages to see if the page is already in memory. The paging scheme in Windows converts future hard errors into soft ones (by reading pages that might be needed and putting them on the fallback list). The memory manager does a small amount of paging itself - it accesses groups of consecutive pages (rather than individual pages). Additional pages are immediately placed on the reserve page list. This is not a waste, since the overhead of the memory manager is much less than the cost of performing I/O operations. Reading a whole cluster of pages is slightly more expensive than reading a single page.
Page table elements in fig. 11.17 refer to physical (not virtual) page numbers. The kernel needs to use virtual addresses to update the page table entry (and page directory). Windows maps the page tables and page directories for the current process to the kernel's virtual address space using the self-map element in the page directory (Figure 11-18). By mapping a page directory entry to a page directory (self-map), we obtain virtual addresses that can be used to refer to page directory entries (Figure 11.18a) and page table entries (Figure 11.18b). The self-map takes up 8 MB of kernel virtual addresses per process (on x86 processors). For simplicity, the figure shows the x86 self-map element for 32-bit PTE records (Page-Table Entries). In fact, Windows uses 64-bit PTEs, so the system can use more than 4 GB of physical memory. With 32-bit PTE entries, the self-map element uses only one PDE entry (Page-Directory Entry) in the page directory and therefore takes up only 4 MB of addresses, not 8 MB.