Week 5-6 Flashcards

1
Q

How does the MMU communicate to RAM and the CPU

A

CPU > Logical address > MMU > physical address > RAM

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

Main memory is divided into what two parts?

A

Operating system space and User memory

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

What are holes and why do they happen when we talk about continuous allocation?

A

• Holes are parts of the memory that are not allocated to a process, they happen when processes get allocated and then quit

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

What are the three general approaches to storage allocation

A
  • First fit - Use the first hole that is big enough
    • Best fit - use the smallest block that is big enough
    • Worst fit - use the biggest block
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

When does fragmentation happen?

A

• Happens when there are small spaces in memory left over from allocation

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

What is the difference between static and dynamic linking?

A

Static linking is when modules are linked at compile time (shared libraries are pre-allocated)
Dynamic linking is when modules are linked as needed in the operating system (Shared libraries are actually shared, OS must be prepared for this)

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

What is a Overlay and what is swapping?

A

Overlay: When only needed instructions are kept in memory so when more memory is needed it takes over an older instruction that isn’t used
Swapping: When a process is moved to a backing store (hard drive) for use later.

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

The point of using pages and frames is to:

A

map memory

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

Physical memory is divided into _______ (512 bytes to 8K sizes typically)
Logical memory is divided into _______ (512 bytes to 8K sizes typically)

A

Frames

Pages

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

An address from a page table is divided into what two parts?

A
  • Page number (index of a page table)

* Page offset (location within the page)

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

Does each process have a page table? (T/F)

A

(True)

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

What keeps track of allocated and free frames?

A

Frame table

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

What is a TLB and why is it used?

A
  • translation look-aside buffer

* Maps pages to frames in the MMU

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

Do pages need to = frames?

A

NO

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

What is demand paging?

A

When pages of data are not copied from disk to RAM till then are really needed.

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

What is copy on write?

A

data blocks on disk are allocated copy-on-write; as long as there are no changes, you keep the original blocks; a change changed only the affected blocks. Everyone has a single shared copy of the same data until it’s written, and then a copy is made. Used by the fork process.

17
Q

What is a dirty bit?

A

It is when a page has been changed. OS only writes to dirty pages