作者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
1F:→ yesa315:1. 没错 SHOW 那个图出来 2. 4KB/4K =1K double 有两层 10/01 19:57
2F:→ yesa315:block 指向第一层 (1k) 第一层在指向第2层 第2层在指向 10/01 19:58
3F:→ yesa315:资料区块 一开始的data block 可放1k个指标 故第一层就有 10/01 20:00
4F:→ yesa315:1k的data block 在指向第2层 每层又可指向 1k个 故共可放 10/01 20:01
5F:→ yesa315:1k*1k=1m blocks 10/01 20:02