================ Start Lecture #8 ================

Note

Lab3 is on the web. Due in 3 NYU ``weeks'' (29 November).

End of Note

Chapter 4: Memory Management

Also called storage management or space management.

Memory management must deal with the storage hierarchy present in modern machines.

We will see in the next few lectures that there are three independent decision:

  1. Segmentation (or no segmentation)
  2. Paging (or no paging)
  3. Fetch on demand (or no fetching on demand)

Memory management implements address translation.

Homework: 6.

When is address translation performed?

  1. At compile time
  2. At link-edit time (the ``linker lab'')
  3. At load time
  4. At execution time

Extensions

Note: I will place ** before each memory management scheme.

4.1: Basic Memory Management (Without Swapping or Paging)

Entire process remains in memory from start to finish and does not move.

The sum of the memory requirements of all jobs in the system cannot exceed the size of physical memory.

** 4.1.1: Monoprogramming without swapping or paging (Single User)

The ``good old days'' when everything was easy.

**4.1.2: Multiprogramming with fixed partitions

The goal of multiprogramming is to improve CPU utilization, by overlapping CPU and I/O.

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

Relocation and Protection

Relocation was discussed as part of linker lab and at the beginning of this chapter. When done dynamically, a simple means 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

Homework: 3

MVT Introduces the ``Placement Question'', which hole (partition) to 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.