# 1002020.12.07 20:34

(1)

## 第 8 章 主存管理 作业

### 100

(1) 205

(2) 100

(3) 300

(4) 100

(5) 185

(6) 170

(7) 205

(8) 40

(9) 185

(10) 100

(11) 300

1.  Given six memory partitions of 100 MB, 170 MB,40 MB, 205 MB, 300 MB, and 185 MB (in order), how would the ﬁrst-ﬁt, best-ﬁt, and worst-ﬁt algorithms place processes of size 200 MB, 15 MB, 185 MB, 75 MB, 175 MB, and 80 MB (in order)?

First-ﬁt:

a.      200M process put in ______M partition

b.      15M process put in ______M partition

c.      185M process put in ______M partition

d.      75M process put in ______M partition

e.      175M process must ______M partition

f.       80M process put in ______M partition

Best-ﬁt

a.      200M process put in ______M partition

b.      15M process put in ______M partition

c.      185M process put in ______M partition

d.      75M process put in ______M partition

e.      175M process put in ______M partition

f.       80M process put in ______M partition

Worst-ﬁt:

a.      200M process put in ______M partition

b.      15M process put in ______M partition

c.      185M process put in ______M partition

d.      75M process put in ______M partition

e.      175M process ______M partition

f.       80M process put in ______M partition

(2)

(12) 300

(13) 300

(14) 205

(15) 205

(16) 185

(17) must wait

(18) 170

(1) 3

(2) 13

(3) 41

2. Assuming a 1-KB page size, what are the page numbers and offsets for the following address references (provided as decimal numbers):

b. 42095    page numbers: ______  , offsets:______

c. 215201   page numbers: ______  , offsets:______

(3)

(4) 111

(5) 210

(6) 161

(1) 649

(2) 2310

(3) invalid

(4) 1727

(5) invalid

3. Considering thesegment table, what are the physical addresses for the following logicaladdresses?

Segment   Base  Length 0         219    600 1         2300  14 2         90     100 3         1327  580 4         1952  96

(4)

(1) 1024

(2) 32

4. The BTV operating system has a 21-bitvirtual address, yet on certain embedded devices, it has only a 16-bit physicaladdress. It also has a 2-KB page size. How many entries are there in each ofthe following?

a. A conventional, single-level page table . Answer:______ （填写10进制数）

b. An inverted page table.   Answer: ______ （填写10进制数）

(1) 20

(2) 18

5. Consider a logical address space of 256pages with a 4-KB page size, mapped onto a physical memory of 64 frames.

a. How many bits are required in the logical address?

b. How many bits are required in the physical address?

(1) 100

(2) 64.5

6.  Consider a paging system with the page table stored in memory.

a. If a memory reference takes 50 nanoseconds, how long does a paged memory reference take?

b. If we add TLBs, and if 75 percent of allpage-table references are found in the TLBs, what is the effective memory reference time? (Assume that ﬁnding a page-table entry in the TLBs takes 2 nanoseconds, if the entryis present.) Answer:

a. ______ ns b. ______ ns

(5)

Updating...