請問97政大資科計算機系統
第4題跟第5題的第2小題要怎麼解阿?
題目如下
4. Consider a file consisting of 40 blocks. Assume that the file control block
(and the index block, in case of indexed allocation) is already in memory.
Calculate how many disk I/O operations are required for contiguous, linked,
and indexed(single-level) allocation strategies, if, for one block, the
following conditions hold. In the contiguous allocation case, assume that
there is no room to grow in the beginning, but there is room to grow in the
end. Assume that the block information to be added is stored in memory.
(1)The block is added at the beginning.
(2)The block is added in the middle.
(3)The block is removed from the middle.
(4)The block is removed from the end.
答案寫說
contiguous linked indexed
(1) 81 1 1
(2) 41 22 1
(3) 38 22 0
(4) 0 40 0
5.(2)
Consider a demand-paging system with a paging disk that has an average
access and transfer time of 10 ms.Addresses are translated through a page
table in main memory,with an access time of 2 μs per memory access.
Thus,each memory reference through the page table takes two access.
To improve this time,we have added an associated memory that reduces access
time to one memory reference,if the page-table is in the associative memory.
Assume that 80 percent of the access are in the associative memory,and that,
of the remaining ,20 percent(or 4 percent of the total) cause page faults.
What is the effective memory access times?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 61.230.138.209