================ Start Lecture #16 ================

4.1.3: Modeling Multiprogramming

Homework: 1, 2 (typo in book; figure 4.21 seems irrelevant).

4.1.4: Analysis of Multiprogramming System Performance

Skipped

4.1.5: Relocation and Protection

Relocation was discussed as part of linker lab and at the beginning of this chapter. When done dynamically, a simple method is to have a base register whose value is added to every address by the hardware.

Similarly a limit register is checked by the hardware to be sure that the address (before the base register is added) is not bigger than the size of the program.

The base and limit register are set by the OS when the job starts.

4.2: Swapping

Moving entire processes between disk and memory is called swapping.

Multiprogramming with Variable Partitions

Both the number and size of the partitions change with time.

Homework: 3

MVT Introduces the ``Placement Question''

That is, which hole (partition) should one choose?

4.2.1: Memory Management with Bitmaps

Divide memory into blocks and associate a bit with each block, used to indicate if the corresponding block is free or allocated. To find a chunk of size N blocks need to find N consecutive bits indicating a free block.

The only design question is how much memory does one bit represent.

4.2.2: Memory Management with Linked Lists

Memory Management using Boundary Tags

Homework: 5.

MVT also introduces the ``Replacement Question''

That is, which victim should we swap out? Note that this is an example of the suspend arc mentioned in process scheduling.

We will study this question more when we discuss demand paging in which case we swap out part of a process.

Considerations in choosing a victim