[理工] [OS] 99中山資工&97台大軟體設計
Consider a file system on a disk that has both logical and physical block sizes
of 512 bytes.Assume that the information about each file is already in memory.
For each of the three allocation strategies(Contiguous,linked,indexed),answer
the questions:
(a)How is the logical-to-physical address mapping accomplished in this system?
(For the indexed allcation,assume that a file is always less than 512 blocks
long.)
這題該怎麼答..?
(b)If we are currently at logical block 10(the last block accessed was block
10) and want to access logical boldk4,how many physycal blocks must be read
from the disk?
這題想問的是index allcation,解答給的答案是2,為什麼不是1呢?
謝謝!!
--
另外是台大資工97年的軟體設計
題目在此 http://www.lib.ntu.edu.tw/exam/graduate/97/97420.pdf
想問一下第7題,題目簡單來講,就是問Longest common substring problem
可以在O(nlgn)下解決嗎?
正常應該是O(mn)吧 (m,n為字串A,B之長度)
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.39.2.216
※ 編輯: boy5548 來自: 114.39.2.216 (01/30 22:19)
→
01/30 22:15, , 1F
01/30 22:15, 1F
→
01/30 22:25, , 2F
01/30 22:25, 2F
→
01/30 22:25, , 3F
01/30 22:25, 3F
→
01/30 22:26, , 4F
01/30 22:26, 4F
→
01/30 22:26, , 5F
01/30 22:26, 5F
→
01/30 22:26, , 6F
01/30 22:26, 6F
→
01/30 22:27, , 7F
01/30 22:27, 7F
→
01/30 22:31, , 8F
01/30 22:31, 8F
推
01/31 00:13, , 9F
01/31 00:13, 9F
→
01/31 00:14, , 10F
01/31 00:14, 10F
推
01/31 01:21, , 11F
01/31 01:21, 11F
推
01/31 02:02, , 12F
01/31 02:02, 12F
→
01/31 09:09, , 13F
01/31 09:09, 13F
→
09/11 14:11, , 14F
09/11 14:11, 14F