Main Memory Part 2 Flashcards

1
Q

In Contiguous Memory Allocation, segments vary in ______, and the OS needs to find free space in memory for new address spaces

A

length

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

In contiguous memory allocation, the OS maintains lists on _________ space and _____ space to find holes to choose for new processes

A

allocated, free

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

What are the 3 fits an OS can give to a new process?

A
  • First-fit
  • Best-fit
  • Worst-fit
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

In first-fit, the OS allocates _____ hole that is big enough

A

first

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

In best-fit, the OS allocates the _________ hole that is big enough.

A

smallest

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

In best-fit, the OS must ______ the entire list, unless ordered by ____

A

search, size

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

In best-fit, the OS produces the smallest _______ hole

A

leftover

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

In worst-fit, the OS allocates the ________ hole

A

largest

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

In worst-fit, the OS produces the _______ leftover hole

A

largest

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

Contiguous allocation is simple to ________ but can cause memory ________

A

implement, fragmentation

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

An issue that arises from external fragmentation is that there might be enough total memory space for ________, but it is not _________

A

allocation, contiguous

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

How does compaction solve the issue of external fragmentation?

A

It copies data to one contiguous chunk of memory

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

The main disadvantage of compaction is that is is _____

A

slow

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

What is internal fragmentation?

A

When allocated memory is larger than requested

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

Why does internal fragmentation occur?

A

It occurs when the system has fixed allocation sizes

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

Compaction cannot help internal fragmentation because the OS cannot control the memory once it is handed to the requesting ______

A

process

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

What are 4 memory allocation mechanisms?

A
  • Splitting
  • Coalescing
  • Tracking allocated memory
  • Tracking free memory
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Splitting is when the OS finds a free chunk of ________ and splits it into two

A

memory

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

Splitting is useful when the ________ memory size is smaller than the size of free memory

A

requested

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

Coalescing is when the OS merges ________(______) memory chunks into a big chunk

A

returned, adjacent

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

The memory allocated is interfaced with ______ and ____

A

malloc, free

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

Allocated memory can store size information needed for _________ free space by storing it in a ______ block together with the allocated memory

A

managing, header

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

To track free memory,, the OS can _____ the list in memory

A

embed

24
Q

REVIEW TRACKING FREE MEMORY SLIDES

A

REVIEW TRACKING FREE MEMORY SLIDES

25
Q

In contiguous allocation, _________ for a segment or process must be contiguous

A

addresses

26
Q

Non-contiguous allocation uses ________ to store processes

A

paging

27
Q

Pages allows the underlying _______ memory and _______ to be decoupled

A

physical, segment

28
Q

In non-contiguous allocation with paging, processes are ________ memory wherever it is available

A

allocated

29
Q

Page frames are produced by dividing _______ ______

A

physical memory

30
Q

The amount of page frames are usually a power of _

A

2

31
Q

Pages are produced by dividing ______ ______

A

logical memory

32
Q

Pages and page frames should be the same _____

A

size

33
Q

For a program of size n pages, the OS needs to find _ free frames

A

n

34
Q

What do page tables do?

A

Translates logical to physical addresses

35
Q

With paging, addresses generated by the ___ is divided into page _______ and page ______

A

CPU, number, offset

36
Q

What is a page number?

A

An index into the page table which contains the base address of each page in physical memory

37
Q

What is a page offset?

A

A number that when combined with the base address defines the physical address sent to the memory unit

38
Q

If the logical address space is 2^m bytes, what is the page size and number of pages?

A
  • Page size: 2^n

- # of pages: 2^(m-n)

39
Q

REVIEW PAGING EXAMPLE

A

REVIEW PAGING EXAMPLE

40
Q

In the implementation of a page table, the page table is kept in _____ ________

A

main memory

41
Q

In the implementation of a page table, the _________ _____ register points to the page table

A

page-table base

42
Q

In the implementation of a page table, the __________ ______ register indicates the size of a page table

A

page-table length

43
Q

In the implementation of a page table, what is a downside when keeping page tables in memory?

A

Every data/instruction access requires two memory accesses

44
Q

In the implementation of a page table, why does every data/instruction require two memory accesses?

A

One for page table and one for data/instruction

45
Q

In the implementation of a page table, slow data/instruction access can be solved with a …

A

translation look-aside buffer (TLB)

46
Q

A translation look-aside buffer has ____–_____ associative memory, and _____ page table entries of currently running processes

A

fast-lookup, caches

47
Q

The fast-lookup associative memory in the TLB typically contains ___ to _____ entries

A

32, 1024

48
Q

The translation look-aside buffer is part of the _______ __________ unit

A

memory, management

49
Q

REVIEW PAGING WITH TLB SLIDE

A

REVIEW PAGING WITH TLB SLIDE

50
Q

When paging with TLB, when a TLB miss occurs, the page table is ________ and an entry is added to TLB for future _____ reference

A

consulted, fast

51
Q

When paging with TLB, is the TLB is full during a miss, it _______ an existing entry

A

replaces

52
Q

When paging with TLB, come entries cannot be _______, such as pages containing _____ code

A

removed, kernel

53
Q

When paging with TLB, each entry stores an _______ ________ _______

A

address space identifier

54
Q

When paging with TLB, ASIDs are an _______ for processes

A

identifier

55
Q

When paging with TLB, ASIDs are referred to when translating _______

A

addresses

56
Q

When paging with TLB, ASIDs allow the TLB to hold page table entries for ______ processes

A

multiple

57
Q
Given
- e = time for lookup in TLB
- tm = memory access time
- a = hit ratio,
what is the effective access time for paging with TLB?
A

e + (2 - a)tm