1 / 35

Chapter 9

Chapter 9. Managing Memory. You Will Learn…. About the evolution of OS memory management How Windows 9x manages memory addresses and virtual memory How Windows NT/2000/XP manages memory How to troubleshoot OS problems with memory. OS Memory Management Evolution.

jolene
Télécharger la présentation

Chapter 9

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. Chapter 9 Managing Memory

  2. You Will Learn… • About the evolution of OS memory management • How Windows 9x manages memory addresses and virtual memory • How Windows NT/2000/XP manages memory • How to troubleshoot OS problems with memory A+ Guide to Software: Managing, Maintaining and Troubleshooting, Third Edition

  3. OS Memory Management Evolution • Decisions made by IBM and Microsoft in the early 1980s still affect Windows 9x memory use • Early CPUs had only 20 address lines • Largest memory address the CPU could handle was 11111111111111111111 (1,048,575, 1,024K, 1 MB) • DOS and applications used first 640K • BIOS and device drivers used 640K to 1024K A+ Guide to Software: Managing, Maintaining and Troubleshooting, Third Edition

  4. DOS and Windows 9x Memory A+ Guide to Software: Managing, Maintaining and Troubleshooting, Third Edition

  5. Further Evolution • Later CPUs and motherboards used 24 address lines and more • Memory above 1024K became available, called extended memory • Memory addresses expressed using hexadecimal notation • Upper memory address numbers begin with A through F A+ Guide to Software: Managing, Maintaining and Troubleshooting, Third Edition

  6. First Megabyte of Memory in Windows 9x A+ Guide to Software: Managing, Maintaining and Troubleshooting, Third Edition

  7. How Memory Addresses are Used • Memory addresses are assigned to memory and used for communication • Device drivers • The OS • Application software • All components identify data to be shared by referring to its memory address A+ Guide to Software: Managing, Maintaining and Troubleshooting, Third Edition

  8. Data Identified by Its Memory Address A+ Guide to Software: Managing, Maintaining and Troubleshooting, Third Edition

  9. Windows 9x Memory Management • Supports 32-bit, protected mode applications • Still permits 16-bit, real mode device drivers and applications • Uses a virtual DOS machine (VDM) • OS totally controls memory access • Enables the use of virtual memory, where memory is stored in swap file A+ Guide to Software: Managing, Maintaining and Troubleshooting, Third Edition

  10. Real Mode and Protected Mode Memory Access A+ Guide to Software: Managing, Maintaining and Troubleshooting, Third Edition

  11. Evolution of Memory Management A+ Guide to Software: Managing, Maintaining and Troubleshooting, Third Edition

  12. How Windows 9x and DOS Manage Memory Addressing • ROM BIOS on the motherboard • Some circuit boards • Device drivers • The OS • Applications Memory mapping is the process of assigning memory addresses as the PC is booted to: A+ Guide to Software: Managing, Maintaining and Troubleshooting, Third Edition

  13. How Windows 9x and DOS Manage Memory Addressing(continued) • Conventionalmemory or base memory: the first 640K • Upper memory: from 640K to 1024K • Extended memory: above 1024K • High memory area (HMA): the first 64K of extended memory A+ Guide to Software: Managing, Maintaining and Troubleshooting, Third Edition

  14. Memory Address Map A+ Guide to Software: Managing, Maintaining and Troubleshooting, Third Edition

  15. Conventional Memory • Designed to hold all memory addresses accessible to the user • Operating system • Application software • Data • Turned out to be grossly inadequate • Couldn’t be rectified in subsequent DOS versions, because upper memory had been dedicated to hardware devices A+ Guide to Software: Managing, Maintaining and Troubleshooting, Third Edition

  16. Upper Memory • Memory addresses from 640K to 1024K • Video RAM and ROM • Sixteen-bit BIOS programs for legacy expansion boards • Often has unassigned addresses • Memory management involves using unassigned upper memory addresses for device drivers and TSR programs A+ Guide to Software: Managing, Maintaining and Troubleshooting, Third Edition

  17. Expanded Memory and the High Memory Area • Memory above 1 MB • Managed as a device • Need device driver (memory extender) • Need applications written to use it • High memory area is the first 64K • Exists because of a bug in Intel 286 processors • DOS 5 and above could store portions of the OS in the HMA A+ Guide to Software: Managing, Maintaining and Troubleshooting, Third Edition

  18. Utilities that Manage Memory • Himem.sys is device driver for memory above 640K • Loaded automatically by Windows 9x • Emm386.exe loads device drivers and other programs into upper memory • Can be loaded by an entry in Config.sys A+ Guide to Software: Managing, Maintaining and Troubleshooting, Third Edition

  19. Using Himem.sys • Manages memory as a device • Loaded with a Device= command in Config.sys A+ Guide to Software: Managing, Maintaining and Troubleshooting, Third Edition

  20. Himem.sys in Config.sys A+ Guide to Software: Managing, Maintaining and Troubleshooting, Third Edition

  21. Using Emm386.exe • Used to manage memory addresses in upper memory • Use the MEM command to examine memory allocation • Goal of memory management is to maximize the amount of free conventional memory A+ Guide to Software: Managing, Maintaining and Troubleshooting, Third Edition

  22. A PC Not Using Upper Memory A+ Guide to Software: Managing, Maintaining and Troubleshooting, Third Edition

  23. Creating and Using Upper Memory Blocks • Himem.sys must be loaded first • Emm386.exe is loaded next • DOS=HIGH loads DOS into HMA • DOS=UMB creates upper memory blocks (consecutive memory addresses in upper memory assigned to physical memory) A+ Guide to Software: Managing, Maintaining and Troubleshooting, Third Edition

  24. Config.sys Set to Use Upper Memory A+ Guide to Software: Managing, Maintaining and Troubleshooting, Third Edition

  25. Loading Device Drivers High • Devicehigh= in Config.sys loads a device driver into a UMB • Loadhigh (LH) command in Autoexec.bat loads a program into a UMB A+ Guide to Software: Managing, Maintaining and Troubleshooting, Third Edition

  26. How Windows 9x Manages Virtual Memory • Virtual memory uses hard drive space so that it acts like memory • Windows stores virtual memory in a swap file • Increases the amount of memory available • Works considerably slower than real memory A+ Guide to Software: Managing, Maintaining and Troubleshooting, Third Edition

  27. Virtual Memory Options A+ Guide to Software: Managing, Maintaining and Troubleshooting, Third Edition

  28. Virtual Memory Options(continued) • Windows 9x automates virtual memory management • To improve performance, set the maximum and minimum size to same value, preventing the size from changing • Set size to 2.5 times amount of RAM • Location of the swap file can be changed A+ Guide to Software: Managing, Maintaining and Troubleshooting, Third Edition

  29. Memory Paging • Virtual Memory Manager (VMM) • Page is a 4K segment of memory • Memory paging is the process of moving pages in and out of physical RAM • Symptoms of disk thrashing • Very high CPU use • Very slow system response • Constant hard drive use A+ Guide to Software: Managing, Maintaining and Troubleshooting, Third Edition

  30. Windows NT/2000/XP Memory Management • Windows NT/2000/XP eliminates the complexity of DOS and Windows 9x • All memory addresses used the same way • Loses some backwards compatibility • Virtual memory manager • Allocates memory in 4K pages • Swap file is named Pagefile.sys A+ Guide to Software: Managing, Maintaining and Troubleshooting, Third Edition

  31. Windows NT/2000/XP Memory Management (continued) A+ Guide to Software: Managing, Maintaining and Troubleshooting, Third Edition

  32. How Windows NT/2000/XP Manages Virtual Memory • Set initial and maximum sizes of the file to the same value • Balance file size with disk space use • Optimize performance by moving the paging file off the boot volume • Paging file must be on the same disk as the OS to capture memory dumps A+ Guide to Software: Managing, Maintaining and Troubleshooting, Third Edition

  33. Changing Paging File Settings A+ Guide to Software: Managing, Maintaining and Troubleshooting, Third Edition

  34. Troubleshooting Memory • Check for viruses • Download latest OS and application patches from manufacturer’s Web site • Test memory modules • Memtest86 can be downloaded from http://www.memtest86.com • Determine whether sufficient memory is installed A+ Guide to Software: Managing, Maintaining and Troubleshooting, Third Edition

  35. Summary • Evolution of OS memory management • Windows 9x memory address and virtual memory management • Windows NT/2000/XP memory management • Troubleshooting OS memory problems A+ Guide to Software: Managing, Maintaining and Troubleshooting, Third Edition

More Related