Chapter Nine Notes Flashcards

1
Q

Base and limit registers

A
  • Define logical address space
  • CPU must check every memory access generated in user mode to be sure it is between base and limit for that user.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Multistep processing of a user program includes (top to bottom)

A

1) Source program
2) Compiler or assembler
3) Object Module
4) Other object modules
-> linkage editor
5) load module
6) system library -> loader
7) dynamically loaded system library -> in-memory binary memory image

Compile time: 2)
Load time: 4) - 6)
Execution time: 7)

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

Logical address space

A

set of all logical addresses or virtual addresses

Generated by the CPU; also referred to as virtual address

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

Physical address space

A

set of all physical addresses generated by program corresponding to logical address

address seen by the memory unit

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

Contiguous Allocation

A

With contiguous allocation main memory is usually divided into two partitions:
- Resident operating system, usually held in low memory with interrupt vector
- User processes then held in high memory, each process contained in single contiguous section of memory.

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

Variable partition

A

allows for dynamic resizing of memory partitions for efficiency (sized to a given process’ needs)

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

First-fit

A

Allocates the first hole that is big enough

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

Best fit

A

Allocates the smallest hole that is big enough; must search entire list, unless ordered by size

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

Worst-fit

A

Allocate the largest hole; must also search entire list

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

Given memory partitions of 100K, 500K, 200K, 300K, and 600K (in order), how would each of the first-fit, best-fit, and worst-fit algorithms place processes of 212K, 417K, 112K, and 426K (in order)? Which algorithm makes the most efficient use of memory?

A

First-Fit:
212K is put in 500K partition.
417K is put in 600K partition.
112K is put in 288K partition (new partition
288K = 500K - 212K).
426K must wait.

Best-Fit:
212K is put in 300K partition.
417K is put in 500K partition.
112K is put in 200K partition.
426K is put in 600K partition.

Worst-Fit:
212K is put in 600K partition.
417K is put in 500K partition.
112K is put in 388K partition.
426K must wait

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

External fragmentation

A

As processes are loaded and removed from memory, the free
memory space is broken into little pieces.
* External fragmentation exists when there is enough total
memory space to satisfy a request but the available spaces are
not contiguous: storage is fragmented into a large number of
small holes.

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

50 percent rule

A

For every N allocated blocks 0.5 N blocks are lost, so unusable memory: 0.5 N/(0.5N + N) = 1/3

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

Internal fragmentation

A

Memory allocated to a process may be slightly larger than the requested memory. The difference between these two numbers is internal fragmentation aka unused memory that is internal to a partition.

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

Paging

A

a memory management scheme that allows a computer to store and retrieve data from secondary storage (usually a hard disk) in smaller, fixed-size blocks called “pages.” These pages are typically of equal size and are used to manage both physical and virtual memory.

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

Page table

A

The virtual address space is divided into fixed-size pages, and the physical memory is divided into frames of the same size. The operating system maintains a data structure called a page table, which maps virtual pages to physical frames. The page table keeps track of the correspondence between virtual and physical addresses.

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

Page fault

A

When a program tries to access a page that is not currently in physical memory (a page fault), the operating system must bring the required page from secondary storage into a free frame in RAM.

17
Q

Calculate internal fragmentation when:

Page size = 2048 bytes
Process size = 72766 bytes
35 pages + 1086 bytes

A

Internal fragmentation of 2048 - 1086 = 962 bytes
Worst case fragmentation = 1 frame - 1byte

18
Q

Effective Access Time

A

Consider a = 80%, e is negligible for TLB search (not considered in the following
calculation), 100ns for memory access, then
* EAT = 0.80 x 100 + 0.20 x 200 = 120ns

Consider more realistic hit ratio -> a = 99%, e = 0 ns for TLB search, 100ns for
memory access
* EAT = 0.99 x 100 + 0.01 x 200 = 101ns
* This increased hit rate produces only a 1 percent slowdown in access time.

19
Q

Two level page table scheme

A

outer page table -> page table -> memory