






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Learn some concepts of operating system=>Memory Management.
Typology: Study notes
1 / 11
This page cannot be seen from the preview
Don't miss anything!







**1. MTUI James P. BCS/0172/T.
As noted by Silberschatz, Galvin & Gagne (2011) , that swapping is the useful technique that enables the computer to execute programs and manipulate data files larger than main memory. They argue again, A process must be in memory to be executed. A process, however, can be swapped temporarily out of memory to a backing store and then brought back into memory for continued execution. For example, assume a multiprogramming environment with a round-robin CPU-scheduling algorithm. When a quantum expires, the memory manager will start to swap out the process that just finished and to swap another process into the memory space that has been freed. In the meantime, the CPU scheduler will allocate a time slice to some other process in memory. When each process finishes its quantum, it will be swapped with another process. Ideally, the memory manager can swap processes fast enough that some processes will be in memory, ready to execute, when the CPU scheduler wants to reschedule the CPU. In addition, the quantum must be large enough to allow reasonable amounts of computing to be done between swaps. A variant of this swapping policy is used for priority-based scheduling algorithms. If a higher-priority process arrives and wants service, the memory manager can swap out the lower- priority process and then load and execute the higher-priority process. When the higher-priority process finishes, the
process with pending I/O, or execute I/O operations only into operating-system buffers. Transfers between operating-system buffers and process memory then occur only when the process is swapped in.
As identified by TECHNOPEDIA ( 2016 ), Contiguous memory allocation is a classical memory allocation model that assigns a process consecutive memory blocks (that is, memory blocks having consecutive addresses). Contiguous memory allocation is one of the oldest memory allocation schemes. When a process needs to execute, memory is requested by the process. The size of the process is compared with the amount of contiguous main memory available to execute the process. If sufficient contiguous memory is found, the process is allocated memory to start its execution. Otherwise, it is added to a queue of waiting processes until sufficient free contiguous memory is available. When refer to Silberschatz, Galvin & Gagne (2011), They said, main memory must accommodate both the operating system and the various user processes. We therefore need to allocate main memory in the most efficient way possible. This section explains one common method, contiguous memory allocation. The memory is usually divided into two partitions: one for the resident operating system and one for the user processes. We can place the operating system in either low memory or high memory. The major factor affecting this decision is the location of the interrupt vector. Since the interrupt vector is often in low memory, programmers usually place the operating system in low memory as well. Thus, in this text, we discuss only the situation in which the operating system resides in low memory. The development of the other situation is similar. We usually want several user processes to reside in memory at the same time. We therefore need to consider how to allocate available memory to the processes that are in the input queue waiting to be brought into memory.
3. PAGING. “Paging is a memory-management scheme that permits the physical address space of a process to be noncontiguous. Paging avoids external fragmentation and the need for compaction. It also solves the considerable problem of fitting memory chunks of varying sizes onto the backing store; most memory management schemes used before the introduction of paging suffered from this problem. The problem arises because, when some code fragments or data residing in main memory need to be swapped out, space must be found on the backing store.
The backing store has the same fragmentation problems discussed in connection with main memory, but access is much slower, so compaction is impossible. Because of its advantages over earlier methods,
paging in its various forms is used in most operating systems.” (Silberschatz, Galvin & Gagne. 2011, (305-307)).
Traditionally, support for paging has been handled by hardware. However, recent designs have implemented paging by closely integrating the hardware and operating system, especially on 64-bit microprocessors.
4. STRACTURE OF THE PAGE TABLE. As suggested by Ahsen (2012), explore some of the most common techniques for structuring the page table. As following-: i. Hierarchical paging/Multilevel Paging. Most modern computers support a large logical address space: (232 to 264). In such an Environment, the page table itself becomes excessively large. Consider the following Example: Logical address = 32-bit Page size = 4K bytes (212 bytes) Page table entry = 4 bytes Maximum pages in a process address space = 232 / 4K = 1M
iii. Inverted Page Table.
SILBERSCHATZ, A., GALVIN, P. & GAGNE, G., (2002) Operating system Concepts essentials. Jefferson City: R.R Donelley.
AHSEN, P. (2012) Operating system Activities. [Online] Sterling: docsity Page. Available from: http://www.docsity.com/en/Structure_of_the_Page_Table_-Introduction_to_Operating_System- Lecture_Notes/204004. [Accessed: 6/3/2015].
TECHNOPEDIA™, (2007) Contiguous memory allocation. [Online] June 24th 2007. TECHNOPEDIA™ Discussion List. Available from: http:// www.techopedia.com/definition/3769/contiguous-memory-allocation [Accessed: 3rd^ June 2016].