Sunday, October 20, 2019

Basic Memory Management Without Swapping Computer Science Essay

Basic Memory Management Without Swapping Computer Science Essay Program execution is the main propose of computer system .During execution programs are together with the data they access with in main memory. To keep track of what memory is in use and what memory is free is called memory management. Allocate the free memory to the process when any process needed the free space and de-allocates it when they don’t need the free space. Ideally, programmers want memory that is Fast Large Nonvolatile There are two classes of memory management systems, those that transfer processes to and from disk during execution are the swapping or paging .And those that don’t are the simple and might find this scheme in embedded device, phone, smart card, or PDA. Basic Memory Management without Swapping or Paging There are three simple ways of organizing memory, operating system with one user process. How to divide memory Two approaches are one divide the memory into fix equal partitions and the other is partition size can be loaded into any other par tition. Equal-sized partitions Any unused space in the partition is wasted called internal fragmentation. And process which is larger than partition cannot be run. Fixed size partitions In fixed partition processes are in queues that are fits in it, but some partitions may be idle because jobs are available in small partitions and only the large partition free. Memory management in Operating systems Linux Memory Management: There are two main component of Linux memory management. The first one component is to assign and freeing the space, after using the physical memory. The second component deals with virtual memory. Physical memory management Linux divide its physical memory into three different parts because it has different hardware characteristics. These three parts are the following: Zone DMA Zone NORMAL Zone HIGHMEM. Page allocator is the primary physical memory manger in Linux. For every zone separate allocator is exist which allocate and freeing the space for the zone. The allocator uses the Buddy system to keep all records about physical pages which is available at the time in memory. Memory splitting into Buddy system Virtual memory management There are many types of virtual memory regions in Linux. Backing store for the region is the first property of this memory. Which describe the pages region that from where it is to come. Mostly region is back by nothing which represents the demand-zero memory. Windows Memory Management: The window provide many ways to the application for using memory like virtual memory, heaps, memory mapped files and thread local storage. Virtual memory VirtualAlloc() is the method which is used to allocate the virtual memory and virtualFree() method is use to de-allocate the space into virtual memory. The virtual address in which the memory is allocated through these functions applications are enable. They operate on multiple pages which are in memory and the starting address must be greater than 0*10000. Heaps Applications used the memory space also through heap. In this environment address space is already reserve. When API process is start (also called initialized) it creates the 1-MB default heap.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.