Minix 1.0

Operation System

The file system of Linux 0.11 is Minux 1.0, this is very tiny file system with limited capacity. But it is very suited to be an eductional version.

The Minux 1.0 devides the device by 1KB per block. The first block is the boot block. To make sure the unity of the file format, this block can contain no content, but it must exist. The second block is the super block, it has the basic information about the current file system, for example the maximum number of the inode, the maximum number of the logical block, size of the inode bitmap and the size of the logical block bitmap.
Here are the explanation to this concepts.

inode

In the minix 1.0, every file has its inode. In the inode there are the file type, length, modification time, user, user group and the logical block numbers that the file has occupied. These logical block numbers are stored in a array i_zone[9], i_zone[0] to i_zone[6] are the direct block numbers, which means they directly point to the data blocks. i_zone[7] is one order block number that it point to a logical block and in this block, there are the the direct block numbers. And i_zone[8] is two order block number that it point to a logical block and in this block, there are the the one order block numbers.

As each block is represented by a 2-byte short number, each block can store at most 512 block numbers (the size of one block is 1KB). So, the Minix 1.0 can support $7 + 512 + 512*512 = 262,663$KB.

In Minix 1.0, the directory is also a kind of file. In the data blocks of the directory, there are the files’ names and inode numbers. All the information about the inodes is stored in the blocks between the end of logical block bitmap and the start of the logical block.

inode bitmap

Normally, the inode bitmap will take 8 blocks, which is 65,536 bits. The first bit is not used. So, in this case, Minix 1.0 can support at most 65,535 inodes. With the inode bitmap, the system can find the unused inode in no time. So it can help to speed up the creating file operation.

logical block

Logical blocks are mainly used to store the data of the files. In super block, there is a number denoting the start position of the logical block.

logical block bitmap

Just like inode bitmap, the logical block bitmap stores the information about whether a logical block has been used. This bitmap can take at most 8 blocks. So, the Minix 1.0 supports at most 65,536 block which means Minix 1.0 supports a device with at most 64MB.

With the device number and the block number in the device, the system can operate the corresponding block of the device.