


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
Multiprogramming with variable tasks, Paging, Logical to Physical address translation, Introduces external fragmentation, Compaction, Frames, Page Table, Hardware suppor for paging. Above mentioned are key points of this lecture handout. Virtual University handout for introduction to operating system are in detail and explanatory.
Typology: Study notes
1 / 4
This page cannot be seen from the preview
Don't miss anything!



Operating Systems [CS-604] Lecture No.
Chapter 9 of the textbook Lecture 32 on Virtual TV
Paging Logical to physical address translation
This is the generalization of the fixed partition scheme. It is used primarily in a batch environment. This scheme of memory management was first introduced in IBM OS/MVT (multiprogramming with a varying number of tasks). Here are the main characteristics of MVT. Both the number and size of the partitions change with time. Job still has only one segment (as with MFT) but now can be of any size up to the size of the machine and can change with time. A single ready list. Job can move (might be swapped back in a different place). This is dynamic address translation (during run time). Must perform an addition on every memory reference (i.e. on every address translation) to add the start address of the partition. Eliminates internal fragmentation. ¾ Find a region the exact right size (leave a hole for the remainder). ¾ Not quite true, can't get a piece with 10A755 bytes. Would get say 10A760. But internal fragmentation is much reduced compared to MFT. Indeed, we say that internal fragmentation has been eliminated. Introduces external fragmentation , i.e., holes outside any region. What do you do if no hole is big enough for the request? ¾ Can compact memory Transition from bar 3 to bar 4 in diagram below. This is expensive. Not suitable for real time systems. ¾ Can swap out one process to bring in another Bars 5-6 and 6-7 in the following diagram
Multiprorgamming with Variable Tasks (MVT), external fragmentation, and compaction
As processes come and go, holes of free space are created in the main memory. External Fragmentation refers to the situation when free memory space exists to load a process in the memory but the space is not contiguous. Compaction eliminates external fragmentation by shuffling memory contents (processes) to place all free memory into one large block. The cost of compaction is slower execution of processes as compaction takes place.
In the memory management techniques discussed so far, two Paging is a memory management scheme that permits the physical address space of a process to be non- contiguous. It avoids the considerable problem of fitting the various sized memory chunks onto the backing store, from which most of the previous memory-management schemes suffered. When some code fragments or data residing in main memory need to be swapped out, space must be found on the backing store. The fragmentation problems discussed in connection with main memory are also prevalent with backing store, except that access is much slower so compaction is impossible. Physical memory is broken down into fixed-sized blocks, called frames , and logical memory is divided into blocks of the same size, called pages. The size of a page is a power of 2, the typical page table size lying between 1K and16K. It is important to keep track of all free frames. In order to run a program of size n pages, we find n free frames and load program pages into these frames. In order to keep track of a program’s pages in the main memory a page table is used.
Hardware support for paging
Paging itself is a form of dynamic relocation. When we use a paging scheme, we have no external fragmentation; however we may have internal fragmentation. An important aspect of paging is the clear separation between the user’s view of memory and the actual physical memory. The user views that memory as one single contiguous space, containing only this program. In fact, the user program is scattered throughout the physical memory, which also holds other programs.