17-07-2012, 02:52 PM
Ext3 File System
Ext3 file system semi doc.docx (Size: 72.54 KB / Downloads: 32)
Introduction:
Definition:
The methods and data structures that an operating system uses to keep track of files on a disk or partition; the way the files are organized on the disk. Also used to describe a partition or disk that is used to store the files or the type of the file system.
The file system is an important part of any operating system. After all, it’s where users keep their stuff. In any operating system, the organization of the file system plays an important role in helping the user’s to find their files. The organization also makes it easier for applications and the system itself to find the resources they need to support the user.
The file system in operating system has at its core a set of directories inherited from the Berkeley Software Distribution (BSD) operating system. While most of these directories are actually hidden by the Finder, many elements of the BSD world are still apparent. The file permissions model, symbolic links, and user home directories are all concepts inherited from BSD. OS also adds many of its own concepts to provide the user with a secure and elegant environment for managing files and folders.
The file systems are designed to provide power and flexibility while maintaining the traditional ease-of-use users expect. To this end, the file system provides users with a consistent structure that makes it clear where resources are located. (This consistency also helps developers, whose applications need to know where important resources are located.) Other file system conventions, such as aliases, extension hiding, and display names also enhance the user experience.
File System Overview
Introduction to the File System Overview
On a multi-user system, controlling access to system resources is important for maintaining the stability of the system. OS defines several file-system domains, each of which provides storage for resources in an established set of directories. Access to resources in each domain is determined by the permissions for the current user.
There are four file-system domains:
User: The user domain contains resources specific to the user who is logged in to the system. This domain is defined by the user’s home directory, which can either be on the boot volume (/Users) or on a network volume. The user has complete control of what goes into this domain.
Local: The local domain contains resources such as applications and documents that are shared among all users of a particular system but are not needed for the system to run. The local domain does not correspond to a single physical directory, but instead consists of several directories on the local boot (and root) volume. Users with system administrator privileges can add, remove, and modify items in this domain.
Network. The network domain contains resources such as applications and documents that are shared among all users of a local area network. Items in this domain are typically located on network file servers and are under the control of a network administrator.
System. The system domain contains the system software installed by operating system. The resources in the system domain are required by the system to run. Items in this domain are located on the local boot (and root) volume. Users cannot add, remove, or alter items in this domain. The domain for a given resource determines its applicability or accessibility to the users of the system.
For example, a font installed in the user’s home directory is available only to that user. If an administrator installs the same font in the network domain, all network users have access to it.
Within each domain, OS provides a set of initial directories for organizing the contained resources. OS uses identical directory names across domains to store the same types of resources. This consistency simplifies the process of finding resources both for the user and for the system methods that use those resources. When the system needs to find a resource, it searches the domains sequentially until it finds the resource. Searches start in the user domain and proceed through the local, network, and system domains in that order. Your code should never assume the path to a resource within a file-system domain, as those paths could change in the future. OS provides public interfaces for accessing standard file-system paths. It should always use these interfaces to locate system resources.
File-System Domains
The User Domain:
The user domain contains resources that are specific to a single user. The user domain is represented by the home directory of the current (logged-in) user. Each user of an OS, the computer must have an account on that computer or on the local area network to which the computer is connected. Each user account comes with an assigned area of space in the file system, called the user’s home directory. This directory is where the user’s programs, resources, and documents reside. The name of each user’s home directory is based on the user’s short login name, which must be unique.
The user domain makes a customized working environment possible for each user. When a user logs in, the Finder restores the user’s working environment and settings to their previous state using the preferences in the user domain. Similarly, programs and other system software use information in the user domain to restore application preferences, network settings, email settings, font sets, ColorSync profiles, and other settings.
The location of the user’s home directory depends on the user account. If the user account is local to the computer, the user’s home directory is in the Users directory on the boot volume. If the user account is a network account, the home directory is on a network server. Regardless of the physical location of the home directory, OS uses the convention of a ~ (tilde) character in some situations to indicate a user’s home directory. The tilde character can be used in combination with other directory names or user names to specify specific user directories.
Table 1:
Use of tilde to indicate locations in home directories
Top level of current user’s home directory ~
Where fonts are stored in current user’s home directory ~/Library/Fonts
Top level of user Steve’s home directory ~Steve
The home directory for each new user comes with some default directories and resources in place. If the user has an account, these directories are mirrored on the user’s Disk as well.
Table 2 lists some of the common directories that might find in a user’s home directory.
Table 2:
Home directory contents
Contains applications available only to the current user. Applications.
Contains the items the Finder displays on the desktop for the logged-in user. Desktop
Contains the user’s personal documents. Documents
Contains application settings, preferences, and other system resources that are specific to the user.
Should not contain user data. Library
Contains digital movies in QuickTime and other formats. Movies
Contains digital music files (.aiff, .mp3, .mp4, and other formats). Music
Contains image files in a variety of formats. Pictures
Description User directory
Contains items the user wishes to share with other users. By default, this directory is
Accessible to other users. Public
Contains web pages for the user’s personal website. Web Sharing must be enabled before
These pages are accessible to other users. Sites
When a user account is created, an Applications directory is not automatically added to the home directory. However, users can create an Applications directory and put their own applications in it. The system automatically searches for applications in this location.
The system protects the files and directories in the user’s home directory from outside interference by a set of default permissions, which the user may change at any time. Any new folders created by the user inherit the privileges of the parent directory.
In addition to the individual home directories, the Users directory contains a Shared subdirectory. This directory is accessible to any user of the local computer system and is intended for use only by users; applications should not store application-specific content here, unless explicitly directed to do so by the user. Any user can write documents to, retrieve documents from, and read documents in this directory. Although this directory is not really associated with the user domain, it provides a convenient means for users to exchange documents and other files.