Directory Implementation 1.Linear list of file names with pointer to the data blocks. Simple to program Time-consuming to execute 2.Hash Table-linear list with hash data structure. Decreases directory search time Collisions-situations where two file names hash to the same location Fixed variable size or chained-overflow hash table 4口”484在4色,主月QC
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Directory Implementation 1. Linear list of file names with pointer to the data blocks. ▶ Simple to program ▶ Time-consuming to execute 2. Hash Table– linear list with hash data structure. ▶ Decreases directory search time ▶ Collisions – situations where two file names hash to the same location ▶ Fixed & variable size or chained-overflow hash table
Outline Allocation Methods(分配方法) 4口”484在4色,主月QC
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Outline Allocation Methods (分配方法)
Allocation Methods(分配方法) An allocation method refers to how disk blocks are allocated for files so that disk space is utilized effectively files can be accessed quickly 1.Contiguous allocation(连续分配) 2.Linked allocation(链接分配) 3.Indexed allocation(索引分配) 4.Combined(组合方式) “口4814在4生,主QC
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Allocation Methods (分配方法) ▶ An allocation method refers to how disk blocks are allocated for files so that disk space is utilized effectively & files can be accessed quickly 1. Contiguous allocation (连续分配) 2. Linked allocation (链接分配) 3. Indexed allocation (索引分配) 4. Combined (组合方式)
1.Contiguous Allocation(连续分配)I Each file occupies a set of contiguous blocks on the disk Simple-directory entry only need starting location (block # length(number of blocks) Mapping from logical to physical LogicalAddress/512=Q......R Block to be accessed =Q+starting address Displacement into block =R “口4814在4生:主QC
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1. Contiguous Allocation (连续分配) I ▶ Each file occupies a set of contiguous blocks on the disk ▶ Simple – directory entry only need ▶ starting location (block #) ▶ & length (number of blocks) ▶ Mapping from logical to physical LogicalAddress/512 = Q. . . . . . R Block to be accessed = Q + starting address Displacement into block = R
1.Contiguous Allocation(连续分配)川 count 0☐1☐2☐3☐ 4☐5☐6☐7☐ directory file 8☐9☐10☐11☐ start length tr count 0 2 12☐13☐14☐15☐ tr 14 3 mail 19 6 16☐17☐18☐19☐ mail list 28 4 20☐21☐22☐23☐ f 6 2 24☐25☐26☐27☐ list 28☐29☐30☐31☐ 4口”4814在4色,主)QC
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1. Contiguous Allocation (连续分配) II count f tr mail list 28 29 30 31 24 25 26 27 20 21 22 23 16 17 18 19 12 13 14 15 8 9 10 11 4 5 6 7 0 1 2 3 directory file start length count 0 2 tr 14 3 mail 19 6 list 28 4 f 6 2