硬连接和软连接的原理(The principle of hard and soft connection).docVIP

  • 40
  • 0
  • 约9.74千字
  • 约 10页
  • 2017-10-07 发布于河南
  • 举报

硬连接和软连接的原理(The principle of hard and soft connection).doc

硬连接和软连接的原理(The principle of hard and soft connection)

硬连接和软连接的原理(The principle of hard and soft connection) [text begins] Primer At present, the UNIX file system has many implementations, such as UFS (BSD based UNIX file system), ext3, ext4, ZFS and Reiserfs, and so on. No matter what file system, you always need to store data. The smallest unit of storage for a hard disk is the sector, and the smallest unit in the data is not the sector, because the storage efficiency in sectors is too low. A sector has only 512 bytes, while the head is read from sector to sector. That is to say, if the file is 10MB, then the head must be read 20480 times to read the file. This efficiency is extremely low. Logical block To improve efficiency, we have the notion of a logical block (Block), or a block of data. The logical block is partitioned in the file system format specified by the minimum storage unit, the minimum storage unit is a sector based, so the logical block size is 2 sector times n times. At this time, the head can read a block at a time, so that the efficiency will be higher! The planning of the logic block is very knowledgeable, not the bigger the better, because a logical block can also only contain a file (in Linux ext2), so if the logic block is planning is too large, it will be a waste of disk space. For example, if a logical block is 4KB, and one file is only 0.1KB in size, the small file still occupies a logical block, and therefore 3.9KB space is wasted. So, when planning a disk, you need to consider the use of the host. For example, BBS hosts, because the article is short and the file is smaller, then the logical block is allocated smaller. If the host is mainly used to store large capacity files, then consider the efficiency of use, or logical block a little better! Disk composition We can split one disk into one or more partitions. Each partition can contain a file system. We are going to describe a process of layering and refining, and please concentrate on thinking about it: The 1 disk is composed of one parti

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档