Memory Management Flashcards

1
Q

What is relocation?

A

Programmer doesn’t know where program will be placed when being executed. It my be swapped to disk and returned to main memory at different location. Memory references must be translated to actual physical addresses.

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

What is protection with regard to memory management?

A

Processes musn’t be allowed to reference memory locations in another process. Therefore it’s impossible to check absolute addresses in a program as program could be relocated. It must then be checked during execution.

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

What is sharing with respect to memory management?

A

It allows several processes to access the same memory. Co-operating processes share access to same data structure. It says it’s better to allow each process access to same copy of the program rather than have it’s own seperate copy.

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

What are the five memory management techniques?

A

Fixed partitioning, dynamic partitioning, demand pages allocation, segmented memory allocation, virtual memory

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

What is fixed partitioning?

A

Divide memory into equal or non equal partitions. If all partitions full OS swaps a process with lesser process. Inefficient, results in fragmentation.

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

What are overlays?

A

Solution for when process is too large for partition. A part (resident part) of program always present in memory, rest of program swapped in and out as needed.

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

What are advantages and disadvantages of equal-sized partitions versus non-equal?

A

Equal: easier to implement, processes bigger than partition require overlay, smaller processes still require partition unit.
Non-equal: more flexibility, less waste, accommodates large processes without overlay.

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

What is first placement algorithm for fixed partitioning?

A

Seperate queue for each partition. Processes added to queue for smallest partition they fit in. Minimizes fragmentation. Most efficient for individual partition.

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

What is problem with first placement algorithm?

A

Not efficient for system as a whole. Process throughout decreased as processes must queue even when there are larger free partitions available.

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

What is second algorithm for process placement?

A

One queue rules them all. Process routed to smallest available partition.

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

What so dynamic partitioning?

A

Allows OS to create partition of any size. Eliminates internal fragmentation. However unusable gaps appear over time (external fragmentation). Compaction minimizes external fragmentation. Must be done regularly.

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

What is first placement algorithm for dynamic partitioning?

A

Best fit: chooses block by size, leaves smaller fragmented holes compaction required more often.

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

What is second placement algorithm for dynamic partitioning?

A

First-fit: fastest,

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

What is third algorithm for placement in dynamic partitioning?

A

Next-fit: largest block of memory is broken up into smaller blocks, compaction required to obtain large block at end of memory

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

What is paging?

A

The OS divides processes into equal sized chunks (pages) and slots them into equal sized memory frames. Must maintain a page table and memory map. Advantage: process doesn’t need to wait for one whole memory space

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

What are drawbacks of paging?

A

Process size is limited to physical memory size. Also internal fragmentation results.

17
Q

What is demand paging?

A

Process not loaded in it’s entirety to memory. Process can therefore be larger than memory. Some pages reside in secondary storage.

18
Q

What is a page interrupt handler?

A

The swapping. Of pages from secondary storage to main memory is controlled by page interrupt handler.

19
Q

What are the three main requirements of the memory management system which the OS provides?

A

Relocation, Sharing, Protection