5.1 Memory Management Flashcards

1
Q

Adresses

A

Logical
-Reference to a memory location independent of the current assignment of data to memory
Relative
-Address expressed as a location relative to some known point
Physical or Absolute
-The actual location in memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Paging

A

Partition memory into small equal fixed-size chunks and divide each process into the same size chunks
Chunks of a process are PAGES
Chunks of memory are FRAMES
OS maintains a page table for each page in the process
-Contains frame location for each page in process
-Memory address consists of a page number and offset within the page

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Segmentation

A

A program can be subdivided into segments
- Segments can vary in length & there is a max length to segments
Addressing has 2 parts
-A segment number & an offset

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Key Points in Memory Management

A

Memory references are logical addresses dynamically translated into physical addresses at runtime
A process may be broken up into pieces that do not need to be located continuously in main memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Execution of a Process

A

OS brings a few pieces of the program into main memory
Resident set - portion of process in main memory
An interrupt occurs when an address is needed that is not in main memory
OS places the process in a blocking state
Piece of process that contains the logical address is brought into main memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Implications of New Strategy

A

More processes may be maintained in main memory

A process may be larger than all of main memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Real & Virtual Memory

A
Real Memory
- Main memory, the actual RAM
Virtual Memory
- Memory on disk
- Allows for effective multiprogramming and relieves the user of tight constraints of main memory
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Thrashing

A

A state in which the system spends most of its time swapping pieces rather than executing instructions
To avoid this, the OS tries to guess which pieces are least likely to be used in the near future

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Principle of Locality

A

Program and data references within a process tend to cluster
Only a few pieces of a process will be needed over a short period of time
Therefore it is possible to make intelligent guesses about which pieces will be needed in the future, suggesting virtual memory may be effective

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Support Needed for VM

A

Hardware must support paging and segmentation

Operating system must be able to manage the movement of pages and/or segments between secondary and main memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Paging

A

Each process has its own page table
Each page table entry contains the frame number of the corresponding page in main memory
Two more things are needed
-Whether the page is in main memory or not
-Whether the contents of the page has been altered since it was last loaded

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Page Tables

A

Page tables are also stored in virtual memory

When a process is running part of its page table is in main memory

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Page Replacement

A

The page frame data table is used for page replacement

Pointers used to create several lists within the table

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Kernel Memory Allocator

A

The kernel generates and destroys small tables and buffers frequently during the course of execution, each of which requires dynamic allocation
Most of these blocks significantly smaller than typical pages

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Page Replacement

A

Based on the clock algorithm
The ‘use-bit’ is replaced with an 8-bit age variable
Periodically decrements the age bits
A form of least frequently used policy

How well did you know this?
1
Not at all
2
3
4
5
Perfectly