Week 9 - Memory Management Flashcards

1
Q

Name the different ways addresses are represented during a program’s life?

A

Source code: Symbolic.
Compiled code: Bind to relocatable addresses.
Linker/Loader: Bind relocatable to absolute addresses.

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

Describe Logical versus Physical address space?

A

Logical: Address generated by CPU.
Physical: Loaded into memory address register of memory.

Logical must be mapped to physical before use.

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

Explain Dynamic Linking and its advantages?

A

Linking postponed until execution time.
Stub used to locate appropriate memory resident routine, replacing itself with address of routine.
Advantages: Libraries, including updates and shared libraries.

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

Describe Multiple-Partition Allocation?

A

Divide memory into partitions, each containing a process.
Number of partitions limits degree of multiprogramming.

Processes loaded into free partitions (holes).
Holes can be variable sized for efficency.

Problem - External and Internal Fragmentation.

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

What are the solutions to the Dynamic Storage-Allocation Problem?

A

First-Fit: Allocate first hole that is big enough.
Best-Fit: Allocate smallest hole that is big enough (must search entire list).
Worst-Fit: Allocate largest hole (must search entire list).

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

Describe Coalescing?

A

Reduces external fragmentation.

Combine adjacent free blocks into one large block.

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

Describe Compaction?

A

Reduces external fragmentation.
Shuffle all free memory into one block.
Disadvantage: CPU idle.

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

What is the equation for Effective Access Time?

A

EAT = Hit Ratio x Memory Access + Non-Hit Ratio x Memory Access

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

How can memory be protected in Paging?

A

Valid/Invalid Bit.

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

Describe Virtual Memory?

A

Mechanism to separate user logical memory from physical memory.
Allows addresss space to be shared by several processes.

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

What are the advantages of Virtual Memory?

A

Allows for more efficent process creation.
Allows for more programs to run concurrently.
Less I/O needed to swap or load processes.

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

Described Demand Paging?

A

Only brings page into memory when needed.
Similar to paging with swapping.
Lazy Swapper: Never swaps a page into memory unless needed.

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

Name the three Page Replacement algorithms?

A

FIFO: Adding more frames can cause more page faults (Belady’s Anomaly).
Optimal Page Replacement: Replace page that will not be used for the longest time, how to predict?
LRU: Replace page that hasn’t been used for the longest time.

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

What is Thrashing?

A

Low CPU utilization, caused by a process being busy swapping pages in and out.
OS thinks it needs to increase degree of multiprogramming, adds another process but not enough pages…

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