Chapter 8 Flashcards

(22 cards)

1
Q

What do base and limit registers do?

A

Base tells where your memory starts; limit tells how far you’re allowed to go.

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

What is the base register?

A

It holds the starting physical address of the memory region assigned to a process.

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

What is the limit register?

A

It holds the size (or upper bound) of the memory region the process may access.

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

How does address protection work with base/limit?

A

Every memory access is checked to see if it’s within the allowed range

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

What happens if a process accesses memory outside its valid range?

A

A protection fault/ trap occurs and the OS treats it as a fatal addressing error.

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

Why are base and limit registers considered privileged?

A

Only the OS kernel can change them to prevent processes from expanding their own access rights.

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

What is address binding?

A

deciding how a program’s addresses get matched to physical memory

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

What are the three main binding stages?

A

Compile-time binding, load-time binding, and execution-time binding.

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

What is compile-time binding?

A

The compiler generates absolute addresses because the load location is known at compile time.

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

Pro of compile-time binding?

A

Simple and fast at run time because no relocation is needed.

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

Con of compile-time binding?

A

Inflexible—if the load location changes, the program must be recompiled.

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

What is load-time binding?

A

The compiler generates relocatable code; Addresses are decided when the program is loaded into memory.

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

Pro of load-time binding?

A

More flexible than compile-time—no recompilation needed for different load locations.

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

Con of load-time binding?

A

If the process must move after loading, it typically must be reloaded.

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

What is execution-time binding?

A

Addresses are determined at run time, allowing a process to be relocated while executing.

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

Pro of execution-time binding?

A

Most flexible—supports swapping and moving to any available memory location.

17
Q

Con of execution-time binding?

A

Requires hardware support for dynamic address translation.

18
Q

What is a logical (virtual) address?

A

The address generated by the CPU from a program’s perspective.

19
Q

What is a physical address?

A

The real address in RAM used by the memory hardware.

20
Q

Why map logical to physical addresses?

A

To give each process a private, consistent address space while allowing the OS to place processes safely in physical memory.

21
Q

What is the MMU (Memory Management Unit) used for?

A

Hardware that maps what the program thinks an address is to where it actually lives in RAM.

22
Q

Static linking vs dynamic linking?

A

Static linking copies library code into the executable (bigger, multiple copies). Dynamic linking uses a small stub and links the library at run time (saves memory/disk).