1 / 17

SEMINAR

SEMINAR. On. VIRTUAL MEMORY. Presented. by. BALARAM NANDI REGD-0505209365 SIT. Virtual Memory. Virtual memory is a technique that allows the execution of processes that may not be completely is the memory.

ronda
Télécharger la présentation

SEMINAR

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. SEMINAR On VIRTUAL MEMORY Presented by BALARAM NANDI REGD-0505209365 SIT

  2. Virtual Memory Virtual memory is a technique that allows the execution of processes that may not be completely is the memory. Virtual memory is the separation of user logical memory form physical memory.This separation allows an extremely large virtual memory to be provided for programmers when only a small physical memory is available.

  3. Advantages of virtual memory A program would no longer be constrained by the amount of physical memory that is available. Each user program could take less physical memory, more program could run at the same time. Less I/O would be needed to load or swap each user program into memory, so each user program would run faster.

  4. Working of Virtual Memory The basic idea of virtual memory is considered to be a series of fixed size called PAGE. Special address translation hardware allows a given page to appear at a different arbitrary address to a given program. The operating uses this ability to create the illusion that every running program has its own private memory space starting at address 0. When program tries to access a page that is not in physical memory , the operating system stops it ,swaps the missing page ,and then restarts the program . this scheme is called Demand Paged Virtual Memory .Virtual memory also makes it trivial to protect programs from each other.

  5. Basic Method Of Paging Physical memory is broken into fixed size blocks called frames. Logical memory is also broken into blocks of same size called pages. When a processes, is to be executed its pages are loaded into any available memory from the backing store. Every address generated by the CPU is divided into two parts : a page number (p) and a page offset (d). The page no. is used as an index into a page table. The page table contends the base address of each page in physical memory. This base address is combine with the page offset to define the physical memory address that is sent to the memory unit.

  6. Paging Hardware Physical Address Logical Address f CPU d p d Physical memo f Page Table

  7. LET US TAKE AN EXAMPLE OF PAGE SIZE OF 4 BYTE AND AND PHYSICAL MEMORY OF 32 BYTE 0 • 0 a • b • c • d i j k l 4 • e • f • g • h 5 m n o p 0 8 6 1 12 1 2 8 i 9 j 10 k 11 l 2 3 16 Page Table 12 m 13 n 14 o 15 p 20 a b c d e f g h 24 Logical Memory 28 Physical Memory

  8. Demand Paging Demand paging is a concept which means that each page of a process is brought in only when it is needed,that is on demand. Valid-Invalid scheme To distinguish between the pages which are currently in the memory and in the disk we use valid – invalid scheme. Page Fault Access to the page marked invalid cause a page fault trap.

  9. What are Page Faults Only those parts of the program and data that are currently in active use need to be held in physical RAM. Other parts are then held in a swap file of page file. When program tries to access some address that Is not currently in physical RAM, it generates an interrupt, called Page Fault.

  10. Page Replacement • Find the location of desired page on the disk. • Find a free frame • If there is a free frame use it. • Otherwise use a page replacement algorithm to select a victim page. • Write the victim page to the disk; change the page and frame table accordingly • Read the desired page into the free frame. • Restart the user process. Valid-invalid bit Frame Swap out victim page Change to Invalid 1 2 o i i Victim v f 4 3 Swap Desired Page in Reset Page table for new page Page table

  11. Where do I set the placing and size of the page file ? In the “Performance” Section. On the Advanced page of the result, the current total physical size of all page files that may be in existence is shown. Click change to make settings for the Virtual memory operation. Here you can select any drive partition and set either ‘Custom’; “System Managed’ or ‘No page file’ ; then always click Set before going on to the next partition.

  12. How to stop your drive from grinding all the time on a PC When a pc keeps grinding as if it’s always accessing the hard drive , then there is a computer trick ,everyone who has a computer with 128MBor more memory should try . This can be remedied by defragmenting the drive with a windows program which organizes the disk and puts all related data together .

  13. Understanding Virtual Memory First, we need to get a couple of things out of the way • XP is Virtual memory Operating system. • There is nothing you can do to prevent virtual memory in the NT kernel. No matter your configuration, with any giver amount of ram, you cannot reduce the amount of paging by adjusting any user interface in these virtual memory operating systems. You can redirect operating system paging, and you can circumvent virtual memory strategy, but you cannot reduce the amount of paging in the NT family of kernel.

  14. Why Does The Page File Need To Be Bigger Than The Information Written To It ? Memory allocation in NT is a two-step process—virtual memory addresses are reserved first, and committed second… The reservation process is simply a way NT tells the Memory Manager to reserve block of virtual memory pages to satisfy other memory requests by the process… There are many cases in which an application will want to reserve a large block of its address space for a particular purpose but might not want to use all of the space.

  15. The UVM, a new virtual memory system Introducing UVM, a new virtual memory system specifically designed to provide the I/O and IPC systems with a range of flexible data movement mechanisms. Implemented in the NetBSD operating system, UVM completely replaces the Mach based 4.4BSD VM system. In addition to featuring flexible data movement mechanisms, UVM also improves virtual memory performance entirely within the framework of BSD and thus maintains all the features and standard parts of the traditional Unix environment that programmers have come to expect. The first release of UVM in NetBSD runs on several platform including 138-PC,DEC Alpha, Sun Sparc, Motorola m68k, and DEC VAX systems. It is already being used on systems around the world.

  16. Problems with Virtual Memory It may sometimes happen that the system give ‘out of memory’ messages on trying to load a program, of give a message about Virtual memory space being low. Possible causes of this are; • The setting for Maximum Size of the page file is too low, or there is not enough disk space free to expand it to that size. • The page file has become corrupt, possibly at a bad shutdown. In the Virtual Memory settings, set to “No page file, “ then exit System properties, shut down the machine, and reboot. Delete PAGEFILE.SYS, set the page file up again and reboot to bring it into use. • The page file has been put on different drive without leaving a minimal amount on C:.

  17. THANK YOU

More Related