Why is the Apple hard disk not partitioned?

Source: Internet
Author: User
Tags naming convention root directory advantage

Someone can explain to me why Linux file system is a "single directory Hierarchical tree" structure, rather than having a c:d like Windows: Partitioning What, does this have any particular reason?

(Small note: Apple Mac OS and Linux are branches of Unix, so the topic I just ... ╮(╯▽╰)╭)

Doug O ' Neal 163 votes

The Unix file system is daoxing much older than Windows, so your question has to be changed: "Why does windows have to do a set of hard disk partition symbols?"

A tree-like file structure has the advantage that any subdirectory or file can be found along the root directory. So, if you need to migrate your local files to a network hard drive, then for software, they won't notice any difference.

Suppose you have a system, the operating system cannot be welded, but there is a program with high I/O requirements, then you can easily load the/usr directory as read-only, then the/OPT (application installation directory) directory loaded onto an SSD. The structure of the entire file system has not changed for the operating system. However, under Windows, this kind of problem is more annoying, especially in front of the program path with a C:Program Files ...

Gilles 70 votes

There are historical reasons for this, partly because it was more effective at the time.

Multics

Multics is the first operating system in history to use the hierarchical tree file structure, which is also embedded in subdirectories. Refer to R.C. Daley and P.G. Neumann's General auxiliary file Store (a general-purpose file System for secondary Storage) in the article:

The second part of the paper describes a "hierarchical tree file Structure" file system, for the operating system, it is very efficient. This structure takes into account reliability and flexibility ...

For the sake of understanding, we can think of this structure as a tree, a tree of files, and some of the directories are actually files. But there is an exception to the directory, its own pointer to only a single, determined directory, then the root directory. It is not explicitly referred to by other directories, and the root directory simply represents a virtual branch, which we call the "filesystem".

At any time, the user is under a directory and we call it "working directory (working directory)" Where users can access the files under the working directory by specifying a portal. and multiple users can work in the same working directory at the same time. In all other respects, the Multics pursues flexibility, the user only needs to work in a branch of the entire file system, the other is not the tube, but also to ensure the convenience of directory management files. The directory is also used to control access-the READ property of the directory allows the user to access files in the directory, while the EXECUTE property allows the user to modify the files in the directory (this feature is inherited by later Unix systems).

Multics also follows the design principles of a single storage object pool. But the paper did not unfold in this area. "Single Storage Object pool" is very suitable for the hardware conditions at that time, there is no removable hard disk, at least no one cares about this problem. Multics does have an alternate backup storage pool, but it does not exist for the user.

Unix

Unix systems are deeply affected by Multics, but are more focused on strengthening the "simplicity" of the system than Multics's "flexible",unix. "

The single tree hierarchy file system is ideal for UNIX systems. As with Multics, the details of the storage pool often do not require user care. But then there was the removable hard drive, and Unix exposed the operations of the storage device to the user via mount and umount two commands (only users with "administrator privileges" could do so). In the article "Unix time-sharing system Design", Dennis Ritchie and Ken Tompson explained:

Although the system root directory is generally on the same storage device, it is not necessary for other branch directories. For two reasons, we need the mount command to complete the work of the storage device mount: The file name consistency of ordinary files, and the storage device where the file resides may have its own file storage structure. With the Mount command, you can replace a previous file with a complete directory structure on a removable storage device, in fact, the Mount command replaces some part of the file hierarchy by referencing the external data to a new structure. This makes no changes to the previous file system. In fact, take our system installation process example, the root directory has been on our hard disk to occupy a small piece of space, but other user data on different hard disks, through the mount mechanism, the sequence is loaded into an initialized system. A "can be mounted" system, complete by reading and writing special files. A variety of applications can create their own file systems, or simply copy them from elsewhere.

(Small note: The central idea of the text above: In Unix, everything is a file.) )

The "Hierarchical Tree File System" also has the advantage of handing over the complex tasks of managing storage devices to the kernel, which means that the kernel is becoming more complex, but the result is to keep it simple for the applications on which it is built. Because the kernel has already wrapped up dirty live dirty, most applications don't care about this part of the details, which is a more natural design.

Windows

The Windows system runs through two ancient veins: a VMS operating system designed to run on a VAX microcomputer, and an cp/m operating system running on an earlier Intel microcomputer (such as 8080, Z80).

VMS have a distributed hierarchical file system called Files-11.

。 In Files-11, the full path to a file includes a node name, an associated user account, device name, directory tree, file name and file type, and version number. VMS have a powerful logical names feature that allows custom "shortcuts" to the specified path, so the user does not need to care about the "real" path of the directory.

Cp/m is designed for 64kB of memory and floppy disk systems, and for basics, it has no concept of "directory" since birth, but the file is accessed by referring to "drive location", such as A: or B:

And MS DOS 1.0 inherits this feature of cp/m, so when MS DOS 2.0 introduces the concept of "directory", in order to be compatible with 1.0 also in the path money retains the "drive letter" character, and the slash "/" symbol is the original VMS and cp/m system in the "command parameter start" symbol, so Later DOS and Windows had to be differentiated, with the backslash "symbol" as the path delimiter.

Windows inherits the DOS and VMS habits, although it has little meaning, but retains the "drive letter" tradition. Today, at the bottom of Windows, the UNC path (the Universal naming convention, the SERVERNAMESHARENAME specification) is used, but this is just some of the features that advanced Windows users need to know, and windows can now actually pass the reparse point (reparse Points) to hang on the storage device. (So don't need C: such a drive letter)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.