Memory management without virtual memory Flashcards

1
Q

What is the thing called in the operating system that manages the memory hierarchy?

A

Memory manager

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

What does the memory manager do?

A

Keep track of what bits of memory are being used.
Allocate memory accordingly.
Dealloacate memory when a process is done.

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

What is the easiest form of memory management?

A

Running one program at a time and allocating memory to it.

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

What does multiprogramming allow for?

A

If one process is blocked waiting for something like I/O, a process switch occurs and the CPU gets on with something else. This reduces the amount of time that the CPU is idle.

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

Name one basic form of memory management?

A

Separating the memory into partitions.

Putting a process into a queue of the smallest portion large enough to hold it.

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

Why is separating memory into partitions and a queue potentially problematic?

A

Because you could have one large memory partition and lots of small jobs. If the queue system was rigid, you’d have a situation where, despite their being memory space in a large partition, you couldn’t allocate it.

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

How else might a queue be used in memory allocation?

A

Single queue for all jobs. If partition space becomes free, then job loaded and run.

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

Why might a single queue and jobs be bad?

A

Because it prioritises large jobs. This means small jobs might be shut out of being run, which in interactive systems could be the difference between speedy running and sluggish running.

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

How might you get around a problem of small jobs and a single queue?

A

1) Always have a small partition space for small jobs.

2) Have a rule that if a jobs is skipped a certain number of times, it gets a point. And then it gets allocated memory.

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

Define swapping:

A

bringing in each process in its entirety, running it for a while, then putting it back on disk

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

How does virtual memory work, at a high level

A

Allows programs to run even when they are only partially in main memory.

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

Why is dynamic partitioning with swapping good

A

Good memory utilisation

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

Why is dynamic partitioning and swapping challenging

A

Allocating and deallocating memory has to be managed and tracked

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

What is memory compaction?

A

When all processes are moved downward as far as possible.

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

Why is memory compaction rare?

A

Requires a lot of CPU time.

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

What happens if a process grows?

A

Potentially problems. Especially if it attempts to hit another process.

17
Q

How is memory divided with bitmaps

A

allocation units

18
Q

what corresponds with each allocation unit in a bitmap

A

allocation bit which is 0 if the unit is free and 1 if it is occupied

19
Q

why is size of allocation unit in bitmap important?

A

smaller allocation unit = larger bitmap

20
Q

what is the main problem with bitmaps?

A

when a process is brought into memory, memory manager must search to find a run of bits in the map. this is slow.

21
Q

Define first fit allocation

A

Memory manager looks for first big enough hole.

It’s fast.

22
Q

Define next fit

A

works in the same way as first fit allocation only that it keeps track of the hole it last filled = less searching.

23
Q

Define best fit

A

best fit searches entire list and takes smallest adequate hole.

24
Q

Define worst fit

A

find the biggest hole and put the process in there