Description: Write C language programs to simulate UNIX disk space management group used the link method.
1. The definition of a record number of disk blocks stack S-free [10], and the record number of disk blocks stack variables in the existing S-nfree.
2. The definition of a structure consisting of 40 elements in the array block [40] for disk blocks for storage.
struct size
{Int blocl [10]
}
struct blocd
{Struct size a [10]
// Used in the chain of free disk block number stored in the disk block number
} Block [40]
3. Assuming that the system files in the maximum capacity of 100 disk blocks, and only a maximum of 5 files, defined by the five elements of a
Array of structures file [5] used to record the disk blocks occupied by each file.
struct File
{Int fileblocd [100]
// Used to record files were assigned to the disk block number
} File [5]
4. Write a function init () to complete the stack of free disk block number, block number of free disk queue an
To Search:
File list (Check if you may need any files):
磁盘空间管理算法.cpp