作者work76 (work)
看板Grad-ProbAsk
標題[理工] [OS]-File system
時間Thu Oct 1 18:59:19 2009
有人可以解釋一下,下面這兩題要做啥?實在看不懂,如有人知如何解,也麻煩幫忙解
謝謝。
一、
The unix inode uses combined indexed allocation scheme with 15 pointers of the
index block in the file's inode. the first 12 of these pointers point to
direct data block. the first indirect block pointer is an index block,
containing not data, but rather the addresses of blocks that do contain data.
then, there is a double indirect block pointer, which contains the address of
the actual data blocks. the last pointer would contain the address of triple
indirect block. under this method. the number of blocks that can be allocated
to a file exceeds the amount of space addressable by the pure 4-byte indexed
file pointers used by many operating system. please show the unix inode
structure as a figure?(難道是畫恐龍版11章unix那個inode那個圖嗎?還是這個有變化?)
二、
if a block size is 4kb and a file pointer is 4-byte. then up to how many data
blocks can be addressed by double indirect block pointer?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.136.255.177
→ yesa315:1. 沒錯 SHOW 那個圖出來 2. 4KB/4K =1K double 有兩層 10/01 19:57
→ yesa315:block 指向第一層 (1k) 第一層在指向第2層 第2層在指向 10/01 19:58
→ yesa315:資料區塊 一開始的data block 可放1k個指標 故第一層就有 10/01 20:00
→ yesa315:1k的data block 在指向第2層 每層又可指向 1k個 故共可放 10/01 20:01
→ yesa315:1k*1k=1m blocks 10/01 20:02