首页 > 试题广场 >

Consider a system where the vi

[问答题]

Consider a system where the virtual memory page size is 2K (2048 bytes), and main memory consists of 4 page frames. Now consider a process which requires 8 pages of storage. At some point during its execution, the page table is as shown below:

Virtual page

Valid

Physical page

0

No

1

No

2

Yes

1

3

No

4

Yes

3

5

No

6

Yes

0

7

Yes

2

Answer the following questions:

(1) List the virtual address ranges for each virtual page.

(2) List the virtual address ranges that will result in a page fault.
( 3 ) Give the main memory (physical) addresses for each of the following virtual addresses (all numbers decimal): (i) 8500, (ii) 1400, (iii) 5000, (iv) 2100.

(1)

7    14k-16k

6    12k-14k

5    10k-12k

4    8k-10k

3    6k-8k

2    4k-6k

1    2k-4k

0    0k-2k

(2)  0k-2k, 2k-4k, 6k-8k, 10k-12k

(3)

8500

1400

5000

2100

页面大小

页号

偏移量

页号

偏移量

页号

偏移量

页号

偏移量

2KB

4

308

0

1400

2

904

1

52

8500

页号 P = INT [8500/2048] = 4

偏移量 offset = 8500 MOD 2048 = 308

其他类似

发表于 2017-05-17 01:18:00 回复(0)