Memory Management Flashcards

1
Q

What are the 3 memory management tasks

A
  • Memory allocation
  • Protection
  • Sharing
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is memory allocation

A

Memory management techniques need to allocate memory to processes in an efficient way.

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

What is protection in memory management

A

All processes need to be protected against interference from other processes.

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

What is sharing in memory management

A

Processes may sometimes need to share data.

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

What are the 6 memory management techniques

A

1 fixed partitioning
2 dynamic partitioning
3 simple segmentation
4 virtual memory segmentation
5 simple paging
6 virtual memory paging

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

What is fixed partitioning

A
  • Memory is divided into partitions of a fixed size; the size may vary between partitions
  • A process can be loaded into any partition whose size is equal to or greater than the size of the process
  • One-to-one mapping between partitions and processes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is internal Fragmentation

A

Internal fragmentation refers to wasted space inside partitions when the size of the process is smaller than the size of the partition.

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

What are the pros of fixed partitioning

A

Easy to understand and implement

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

What are the cons of fixed partitioning

A
  • Internal fragmentation
  • A pre-specified upper limit on the number of processes
  • A pre-specified upper limit on the size of the largest process
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How does dynamic partitioning work

A
  • The partition sizes adjust to the sizes of processes
  • One-to-one mapping between partitions and processes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What does external fragmentation refer too

A

External fragmentation refers to wasted space in between partitions.

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

What does compaction refer to

A

to methods for relocating processes so that they occupy contiguous memory regions, thereby consolidating all free memory into a single contiguous block.

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

What are the pros of dynamic partitioning

A
  • No internal fragmentation
  • No limit on the number of processes or on the size of the largest process
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are the cons of dynamic partitioning

A
  • External fragmentation
  • Time is wasted on compaction
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How does simple segmentation work

A
  • Each program is divided into segments (e.g., text and data segments)
  • Segments are loaded into memory as in dynamic partitioning
  • All segments need to be loaded into memory, but they do not need to be contiguous
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are the pros of simple segmentation

A
  • Easier to fit processes in memory than with dynamic partitioning
  • No internal fragmentation
  • No limit on the number of processes or on the size of the largest process
17
Q

What are the cons of simple segmentation

A
  • External fragmentation (less than dynamic partitioning)
  • Time is wasted on compaction
18
Q

What is virtual memory segmentation

A

Virtual memory refers to the use of disk storage as if it was main memory

19
Q

How does virtual memory segmentation work

A

Segments are loaded into memory as in dynamic partitioning, except that not all segments need to be loaded at the same time

20
Q

What are the pros of visual memory segmentation

A
  • Easier to fit processes in memory than with simple segmentation
  • No internal fragmentation
  • No limit on the number of processes or on the size of the largest process
21
Q

What are the cons of virtual memory segmentation

A
  • More overhead required for virtual memory
  • External fragmentation (less than dynamic partitioning)
  • Time is wasted on compaction
22
Q

Explain simple paging

A

Memory is divided into fixed-size frames of equal size
* Each process is divided into pages of the same size
* Internal fragmentation is small since

  • it only affects the last frame of each process
  • the frame/page-size is fairly small
23
Q

What are the pros of simple paging

A
  • No external fragmentation
  • All pages fit perfectly into frames
24
Q

What are the cons of simple paging

A
  • (small) Internal fragmentation
  • Each process requires a page table (which consumes memory)
25
Q

What is virtual memory paging

A

Pages are loaded into frames as in simple paging, except that not all pages need to be loaded at the same time.

26
Q

What are the pros of visual memory paging

A
  • Easier to fit processes in memory than with simple paging
  • No external fragmentation
  • All pages fit perfectly into frames
27
Q

What are the cons of virtual memory paging

A
  • More overhead required for virtual memory
  • (small) Internal fragmentation
  • Each process requires a page tables (which consumes memory)
28
Q

Protection and sharing segmentation and paging

A

Protection/sharing is generally easier with segmentation than with paging since

  • the segment table is smaller than the page table
  • segments are more natural units for protection/sharing