Week 5 Flashcards

1
Q

Why is memory management important?

A

Memory management is important because we must keep many processes in memory to increase computing performance

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

What are the two types of addresses?

A
  1. Logical address -
    - Generated by the CPU.
    - Does not exist physically
    - Used as a reference to access the physical address
  2. Physical address -
    - References a location in the memory
    - Not directly accessible to the user program.
    - A logical address needs to be mapped to make the address accessible
    - The mapping is done by memory management unit (MMU)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is logical address space?

A

Logical address space is the set of all logical addresses generated in reference to a program by the CPU

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

What is physical address space?

A

Physical address space is the set of all the physical addresses mapped to the logical address

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

What is contiguous memory allocation?

A

Contiguous memory allocation is an early method in which each process is contained in a single section of memory that is contiguous to the section containing the next process.

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

What is a hole?

A

A hole is a block of available memory. Holes of various sizes are scattered throughout memory.

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

What are the three types of storage allocation?

A
  1. First-fit - Allocate the first hole that is big enough
  2. Best-fit - Allocate the smallest hole that is big enough. Must search entire list. This produces the smallest leftover hole
  3. Worst-fit - Allocate the largest hole. Must also search the entire list. This produces the largest leftover hole
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is fragmentation?

A

Fragmentation is where as processes get loaded and removed from memory these spaces get broken into small pieces of memory that can’t be allocated to the coming processes.

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

What is internal fragmentation?

A

Internal fragmentation is where a process is allocated into a memory block but part of that memory is left unused. For example, a 3MB process put into a 4MB memory hole would leave 1MB leftover

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

What is external fragmentation?

A

External fragmentation is where there is enough total space available for a new process but because the memory is not contiguous the new process cannot be loaded into memory

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

What is compaction?

A

Compaction is a method used to reduce external fragmentation by shuffling memory contents to place all free memory together in one large block. Compaction is only possible if relocation is dynamic

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

What is paging?

A

Paging involves breaking physical memory into fixed-sized blocks called frames and breaking logical memory into blocks of the same size called pages. A process is then divided into small pages and these pages are allocated non-contiguously into the memory. When a process is to be executed it is divided into same fixed sized blocks as the memory frames. There is no external fragmentation as it allows use to store data in a non-contiguous way

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

What are the parts of a logical address?

A
  1. Page number (p) - It tells the exact page of the process which the CPU wants to access
  2. Page offset (d) - It tells the exact word on that page which the CPU wants to read
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are the parts of a physical address?

A
  1. Frame number - It tells the exact frame where the page is stored in physical memory
  2. Page offset (d) - It tells the exact word on that page which the CPU wants to read. It requires no translation as the page size is the same as the frame size so the place of the word which CPU wants to access will not change
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the page table?

A

A page table contains the address of each frame in physical memory, and the offset is the location in the frame being referenced

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

What is swapping?

A

Swapping is where a process is temporarily swapped out of memory to a backing store, and then brought back into memory for continued execution

17
Q

What is a backing store?

A

A backing store is a fast disk that is large enough to accommodate whatever parts of processes need to be stored and retrieved