Multi programming with Variable Tasks - Introduction to Operating System - Lecture Notes, Study notes of Operating Systems

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

2011/2012

Uploaded on 11/06/2012

ahsen
ahsen 🇵🇰

4.6

(88)

84 documents

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
161
Operating Systems [CS-604] Lecture No.32
Operating Systems
Lecture No. 32
Reading Material
Chapter 9 of the textbook
Lecture 32 on Virtual TV
Summary
MVT
Paging
Logical to physical address translation
Multiprogramming with Variable Tasks (MVT)
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
pf3
pf4

Partial preview of the text

Download Multi programming with Variable Tasks - Introduction to Operating System - Lecture Notes and more Study notes Operating Systems in PDF only on Docsity!

Operating Systems [CS-604] Lecture No.

Operating Systems

Lecture No. 32

Reading Material

ƒ Chapter 9 of the textbook ƒ Lecture 32 on Virtual TV

Summary

ƒ MVT

ƒ Paging ƒ Logical to physical address translation

Multiprogramming with Variable Tasks (MVT)

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

External fragmentation

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.

Paging

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.

Paging Example

  • Page size = 4 bytes
  • Process address space = 4 pages
  • Physical address space = 8 frames
  • Logical address: (1,3) = 0111
  • Physical address: (6,3) = 1011