Main Memory Part 2 Flashcards

(57 cards)

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

24
Q

REVIEW TRACKING FREE MEMORY SLIDES

A

REVIEW TRACKING FREE MEMORY SLIDES

25
In contiguous allocation, _________ for a segment or process must be contiguous
addresses
26
Non-contiguous allocation uses ________ to store processes
paging
27
Pages allows the underlying _______ memory and _______ to be decoupled
physical, segment
28
In non-contiguous allocation with paging, processes are ________ memory wherever it is available
allocated
29
Page frames are produced by dividing _______ ______
physical memory
30
The amount of page frames are usually a power of _
2
31
Pages are produced by dividing ______ ______
logical memory
32
Pages and page frames should be the same _____
size
33
For a program of size n pages, the OS needs to find _ free frames
n
34
What do page tables do?
Translates logical to physical addresses
35
With paging, addresses generated by the ___ is divided into page _______ and page ______
CPU, number, offset
36
What is a page number?
An index into the page table which contains the base address of each page in physical memory
37
What is a page offset?
A number that when combined with the base address defines the physical address sent to the memory unit
38
If the logical address space is 2^m bytes, what is the page size and number of pages?
- Page size: 2^n | - # of pages: 2^(m-n)
39
REVIEW PAGING EXAMPLE
REVIEW PAGING EXAMPLE
40
In the implementation of a page table, the page table is kept in _____ ________
main memory
41
In the implementation of a page table, the _________ _____ register points to the page table
page-table base
42
In the implementation of a page table, the __________ ______ register indicates the size of a page table
page-table length
43
In the implementation of a page table, what is a downside when keeping page tables in memory?
Every data/instruction access requires two memory accesses
44
In the implementation of a page table, why does every data/instruction require two memory accesses?
One for page table and one for data/instruction
45
In the implementation of a page table, slow data/instruction access can be solved with a ...
translation look-aside buffer (TLB)
46
A translation look-aside buffer has ____--_____ associative memory, and _____ page table entries of currently running processes
fast-lookup, caches
47
The fast-lookup associative memory in the TLB typically contains ___ to _____ entries
32, 1024
48
The translation look-aside buffer is part of the _______ __________ unit
memory, management
49
REVIEW PAGING WITH TLB SLIDE
REVIEW PAGING WITH TLB SLIDE
50
When paging with TLB, when a TLB miss occurs, the page table is ________ and an entry is added to TLB for future _____ reference
consulted, fast
51
When paging with TLB, is the TLB is full during a miss, it _______ an existing entry
replaces
52
When paging with TLB, come entries cannot be _______, such as pages containing _____ code
removed, kernel
53
When paging with TLB, each entry stores an _______ ________ _______
address space identifier
54
When paging with TLB, ASIDs are an _______ for processes
identifier
55
When paging with TLB, ASIDs are referred to when translating _______
addresses
56
When paging with TLB, ASIDs allow the TLB to hold page table entries for ______ processes
multiple
57
``` Given - e = time for lookup in TLB - tm = memory access time - a = hit ratio, what is the effective access time for paging with TLB? ```
e + (2 - a)tm