Sunday, August 25, 2019

Memory Management Essay Example | Topics and Well Written Essays - 1250 words

Memory Management - Essay Example The partitioning that is done in memory for its allocation can be fixed. There are two possible methods whereby which queues may be used to bring processes into the memory for execution. The first method is by using a single queue and the second method I by using multiple queues as shown in the fig. 1. Figure 1 Fixed memory Partitioning. Using multiple queues Using Single Queue Mechanism The first available memory location that is large enough to hold the process is allocated All processes get lined up into a single queue. The partition closest to the process that can hold it is assigned to that process. Advantages Load is balanced. Arrived processes are transferred evenly into all memory partitions. As soon as a memory partition gets free it is assigned to a waiting process. The allocation process is very quick. The allocation process does not waste memory space. Disadvantages Any memory size that may be more than the size of the process gets lost. Moreover the queues of small parti tions are often lined up with several processes while those with larger partitions are often left untouched. The drawback is that even though large sizes of memory are free small processes are not allocated that memory and they stay lined up in the queues of smaller memory sized partitions waiting for their turn to come. A large partition may be wasted on a small job resulting in loss of large amounts of memory. Unbalanced load. Some queues may be empty while others are fully loaded. 2. What is the swapping technique? Why is it needed for multiprogramming environment? Swapping generally means interchanging the contents of two different spaces using a third temporary empty content space. Swapping is used as a memory management technique for multiprogramming environment. For a program to execute it is mandatory to acquire physical memory or main/primary memory. In a uni-processor environment multiple programs can simultaneously be executed by overlapping an I/O of a program with the e xecution of another program. Due to the limited size of physical memory it is very difficult to accommodate all of the required programs in main memory. To accommodate new programs currently running programs are swapped out on the basis of their activity status. For example when a program asks for data from secondary storage, it has to wait for complete input. Meanwhile due to Direct Memory Access the CPU remains available for other programs. The operating system thus swaps out the waiting program with the one that needs to be executed with the CPU. Upon completion of data transfer the earlier program is invoked and swapped into the memory again. This is how swapping works for multiprogramming environment. 3. Discuss the main function(s) of each of the following operating system parts: a) Memory management Unit The Memory Management Unit is said to serve as a buffering agent between the Central Processing Unit and the memory of the system. The functions that are performed by this un it may roughly be categorized into three categories. These are: 1. Operating System Memory Management, 2. Hardware Memory Management and 3. Application Memory Management. Specifically speaking, it translates address from their virtual address format into their physical address format. b) Linker â€Å"Performs the function of linking the libraries to the object code in order to transform the object code into an executable machine.† (cool interview, 2012).

No comments:

Post a Comment

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