1.
A computer has the following parameters. The CPU has a clock rate of 1 GHz.
The cache has a block size of W bytes and an average access time of X ns/byte.
The virtual memory has a page size of Y KB, and the average disk transfer rate
is Z KB/ms.
(a)Give each of the four parameters a reasonable and representative numerical
value, and then use the values to estimate the time to serve a page fault
and
that to serve a cache miss.
(Please note the units of the parameters and make additional assumptions if
necessary.)
(b)Use the above estimations to explain why page faults will result in context
switches while cache misses usually only stall the CPU.
這題到底是要算甚麼東西呢??
------------------------------------------------------------------------------
2.
Determining the optimal page size of a memory requires balancing some
competing
factors. The memory overhead of paging consists of the page table (increased
as
page size gets smaller) and the internal fragmentation waste (increased as
page
size gets larger). Suppose that the average process size is 2M bytes, page
entry
size is 4 byres, the average wasted memory in the last page of each process
due
to internal fragmentation is a half page.
a.What is the optimal page size, in bytes?
b.What is the minimum overhead, in bytes, for an average process?
這題要怎麼求overhead??
------------------------------------------------------------------------------
3.
A system enables the MMU(memory management unit) and supports logical
addressing
and virtual memory management. Which of the following statement is NOT
correct?
(A)To add more physical memory may increase the logical address space of a
program.
(B)To add more physical memory may increase the number of entries in page
tables
if the inverted page table scheme is employed.
(C)A system with more swapping spaces in the backing store can execute more
programs on the system simultaneously.
(D)A system with more swapping spaces can grant more memory requests generated
by programs.
答案是B
可是inverted page table裡面不是以physical momery為記錄對象嗎??
所以有多少frame就有多少entry??
這樣B應該是對的啊?
------------------------------------------------------------------------------
以上又臭又長的問題
希望大心的高手幫我解惑一下
THX~~
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 223.140.176.223