Memory Management Tanenbaum Ch' 4 - PowerPoint PPT Presentation

1 / 13
About This Presentation
Title:

Memory Management Tanenbaum Ch' 4

Description:

Other types of memory: ROM, EEPROM, Flash RAM. 3. Basic Memory Management ... Allocate as much memory as needed by each process ... – PowerPoint PPT presentation

Number of Views:80
Avg rating:3.0/5.0
Slides: 14
Provided by: jas583
Category:

less

Transcript and Presenter's Notes

Title: Memory Management Tanenbaum Ch' 4


1
Memory Management (Tanenbaum Ch. 4)
2
The Memory Hierarchy
Access Time
Capacity
lt 1 KB
1 nsec
Registers
1 MB
On-chip Cache
2 nsec
64-512MB
Main Memory
10 nsec
5-50GB
Magnetic (Hard) Disk
10 msec
Magnetic Tape
20-100GB
100 sec
Other types of memory ROM, EEPROM, Flash RAM
3
Basic Memory Management
(Palm computers)
(MS-DOS)
BIOS
  • An operating system with one user process

4
Multiprogramming with Fixed Partitions
  • Separate input queues for each partition
  • Single input queue

5
Problems with Fixed Partitions?
6
Problems with Multiprogramming?
  • Relocation the mechanism for fixing memory
    references in memory
  • Cannot be sure where program will be loaded in
    memory address locations of variables, code
    routines cannot be absolute
  • Protection one process should not be able to
    access another processes memory partition
  • Solutions
  • Relocation during loading
  • Program Status Word (protection)
  • Base and limit (protection and relocation)

7
Swapping
  • Dynamic partitions
  • Allocate as much memory as needed by each process
  • Swap processes out to disk to allow more
    multi-programming

8
Swapping - example
  • Memory allocation changes as
  • processes come into memory
  • leave memory
  • Shaded regions are unused memory

9
How much memory to allocate?
  • (a) Allocating space for growing data segment
  • (b) Allocating space for growing stack data
    segment

10
Issues in Swapping
  • When a process terminates
  • Compact memory?
  • Move all processes above the hole down in memory.
  • Can be very slow 256MB of memory, copy 4 bytes
    in 40ns ? compacting memory in 2.7 sec
  • Almost never used
  • Result OS needs to keep track of holes.
  • Problem to avoid memory fragmentation.

11
Swapping Data Structure Bit Maps
  • Part of memory with 5 processes, 3 holes
  • tick marks show allocation units
  • shaded regions are free
  • Corresponding bit map

12
Properties of Bit-Map Swapping
  • Allocation unit is k bits
  • bitmap uses M/k bits. Could be quite large.
  • E.g., allocation unit is 32 bit
  • Bit map uses 1/33 of memory
  • Searching bit-map for a hole is slow

13
Swapping Data Structure Linked Lists
  • Variation keep a list of blocks (processP,
    holeH)
Write a Comment
User Comments (0)
About PowerShow.com