Operating System Fundamentals


Figure 4.2 The worst fit strategy assigns the largest



Download 2.34 Mb.
View original pdf
Page41/66
Date06.03.2023
Size2.34 Mb.
#60834
1   ...   37   38   39   40   41   42   43   44   ...   66
OperatingSystemFundamentals
best answers from c, Lesson 2 C# Windows Forms
Figure 4.2
The worst fit strategy assigns the largest
free memory chunk so that it leaves behind
the largest possible fragment
Logical Address
Base Address
+
Physical Address
From program
From the OS
The addition is done by the
CPU
Figure 4.3
Allocation of Physical Memory

Operating System Fundamentals
58 Virtual Memory Despite the fact that most modern computers have between 1 GB and 4 GB of RAM, it is possible to run out of memory. This can happen when you are running too many processes at the same time, or when a process requires more memory than is currently available (unused. One solution to this problem is to use virtual memory. Virtual memory means that the operating systems memory manager will use a portion of another storage device to act as if it is extra RAM. Inmost cases, this virtual memory space will be on a permanent storage device such as a hard disk. However, some newer operating systems (such as Windows Vista and Windows 7) also allow you to use a removable media device like a USB flash drive as virtual memory (called Windows Ready Boost). The memory manager will manage this resource so that it gives the illusion that your computer has more RAM than is actually installed.
How Virtual Memory Works
Virtual memory works by breaking down large programs into smaller units called pages. The memory manager will store these pages on an area of the storage device (hard disk) that has been allocated for use as virtual memory. This area is called a Page File (or Paging File. All of the pages that are currently loaded in main memory (RAM) will be listed in a Page Table, which is maintained by the memory manager. If a process requests a page that is not currently loaded into RAM (in the Page Table, then a page fault will be generated. The memory manager will attempt to resolve the page fault by locating the requested page in virtual memory and then loading it into RAM (and listing it in the Page File. The memory manager will then try tore- execute the instruction that caused the fault.

Download 2.34 Mb.

Share with your friends:
1   ...   37   38   39   40   41   42   43   44   ...   66




The database is protected by copyright ©ininet.org 2024
send message

    Main page