Week 7: Memory Management: Variable partitions Flashcards

1
Q

What is swapping?

A

Moving processes between main memory and hard disk to manage limited memory in timesharing systems.

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

Why is swapping less effective with fixed partitions?

A

If a large process is swapped out of a large partition, there may
only be small processes ready to run

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

How does variable partition multiprogramming improve memory usage?

A

Partitions are dynamically created and freed based on the size of processes.

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

What are the trade-offs of variable partitions?

A

Increased complexity in allocation, deallocation, and memory tracking.

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

What is the allocation data structure required to
deal with a variable number of free and used partitions?

A

The Linked List

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

How does the first fit allocation strategy work?

A

The linked list is scanned to find the first free space large enough for the process. The remaining space, if any, is split into a new free block.

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

How does the next fit allocation strategy work?

A

It’s a variation of the first fit. Instead of starting from the beginning again, the next fit continues scanning from the last allocated block

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

How does the best fit allocation strategy work?

A

The best fit algorithm always searches the entire linked list to find the smallest hole big enough to satisfy the memory request

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

What is the downside of the best fit strategy?

A

It often creates tiny, useless memory holes due to breaking blocks into exact sizes.

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

How does the worst fit strategy work, and why is it ineffective?

A

It allocates the largest free block, but simulations show it performs poorly

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

What is quick fit, and when is it useful?

A

It maintains separate lists for common block sizes, speeding up allocation. However, it still suffers from fragmentation.

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

How do BitMaps work?

A

Memory is divided into fixed-size blocks, and a bit map tracks usage (0 for free, 1 for allocated).

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

What is the downside of BitMaps?

A

it are less flexible and slower for large memory requests.

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

What is fragmentation in memory management?

A

Fragmentation occurs when free memory is divided into small, non-contiguous blocks, making it difficult to allocate large processes.

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

What is the difference between internal and external fragmentation?

A
  • Internal Fragmentation: Wasted space inside allocated memory blocks.
  • External Fragmentation: Wasted space in free memory due to scattered small blocks.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How does coalescing free space work?

A

Adjacent free memory blocks are combined into a single larger block.

17
Q

How does compacting free space work?

A

All the free space available is joined together at any time so that all allocated memory is together (at the start) and all free memory is together (at the end)

18
Q

Why is compacting more challenging than coalescing?

A

Compacting requires moving processes in memory, which is time-consuming and often requires swapping processes out and back in.

19
Q

In what situation is compacting necessary?

A

When scattered free memory blocks are insufficient for a large process, despite having enough total free memory.

20
Q

What challenge arises if only the exact memory size is allocated to a process?

A

If a process needs more memory, adjacent space must be free, or other processes must be moved/swapped to expand the block.

21
Q

What is a potential solution to the dynamic allocation problem?

A

Allocating extra memory initially, though determining the right amount can be difficult.