东南大学《操作系统》课程作业 第十一章

1. Contrast the performance of the three techniques for allocating disk blocks (contiguous, linked, and indexed) for both sequential and random file access.
image

2. What are the advantages of the variant of linked allocation that uses a FAT to chain together the blocks of a file?
借助FAT表,在进行随机访问时,相比朴素的链接分配,可以不需要从头跟着指针来进行定位,而可以通过查表、跟随FAT表内的指针快速定位到对应文件块。同时,FAT表大多能够缓存到内存中,从而通过快速的内存访问而非磁盘访问进行查询。

3. Consider a file system that uses inodes to represent files. Disk blocks are 8 KB in size, and a pointer to a disk block requires 4 bytes. This file system has 12 direct disk blocks, as well as single, double, and triple indirect disk blocks. What is the maximum size of a file that can be stored in this file system?
直接块:12 * 8 KB = 96KB
一级间接块:(8KB/4B) * 8KB = 16384KB
二级间接块:(8KB/4B)^2 * 8KB = 33554432KB
三级间接块:(8KB/4B)^3 * 8KB = 68719476736KB
∑= 68753047648KB = 64.03TB

原文地址:https://www.cnblogs.com/zxuuu/p/15631311.html