UNIX file system
#1

[attachment=12537]
1. Introduction
A file's purpose is to ease access to nonvolatile storage through a simple, commonly understood interface. Using a file system for access to all system resources is intrinsic to the UNIX programming paradigm. A File is a very important abstraction in the computing programming field. Files serve for storing data permanently; they offer a few simple but powerful primitives to the programmers. The file system is the way the operating system organizes, manages and maintains the file hierarchy into mass-storage devices, normally hard disks. Every modern operating system supports several different, disparate, file systems.
In UNIX. almost everything can be thought of as a file, even physical devices and processes. As long as information can be read from or written to them they are treated the same in many ways. The UNIX file system is hierarchical. Every file is in a directory. Every directory is contained within some other directory except for the highest-level directory (the root directory) whose designation is the forward slash / .When describing the location of a file within the directory structure, the names of directories are separated with slashes. Files are owned by users. A user can determine what access she and others will have to files and directories that she owns. File systems have historically been constrained to one hardware device or have been dependent upon underlying volume managers for file system capacities differing from the foundational hardware. A simple file is a named series of bytes that is addressable to byte granularity, and functions as a non-volatile storage location for the computer user's data. UNIX file name space consists of hierarchically nested directories, with files as leaves within this tree structure. Files can be accessed through command line utilities or standard library interfaces accessible to application software. In addition to simple files, UNIX represents many of its other resources as files for ease of access. Everything that is executed on the system is a process, and all process input and output (I/O) is done to a file. Some resources represented as files include hardware components, raw devices, operating system information, communication facilities, links to other files, and the directories that comprise the file system's name space itself. The utility of the file paradigm is evidenced by its continued popularity and ubiquity in modern operating systems.
Application developers have the option of writing to raw devices which themselves are represented as files, but the extra application sophistication required to write to raw devices and manage the data thereon, rarely justifies the benefits of marginally better performance and added control over data layout, storage, and retrieval. Database management systems often offer the option of storing data on raw devices, but most administrators still prefer to construct even these higher-level storage abstractions over file systems for ease of data management and backup. File systems provide a beneficial degree of abstraction from the hardware so storage resources can be allocated appropriately to various users. For voracious consumers of storage, numerous devices can be aggregated together to present a single file system, and for modest consumers large devices can be carved into small chunks for sharing amongst multiple file systems. With proper file system design, files can exceed the size of a single device, and even provide sparse record storage to meet the most exotic and challenging application storage requirements. Ultimately, the design goal of any file system should be to ease access to and management of large amounts of nonvolatile data without reducing performance or restricting the intended use of the system.
2. The File
A UNIX file is a storehouse of information; it is simply a sequence of characters (not wholly true). A file contains exactly those bytes that we put into it, be it a source program, executable code or anything else. It neither contains its own size nor its attributes, including the end-of-mark. It doesn’t even contain its own name.
Although everything is treated as a file by UNIX, it’s still necessary to divide these files into three categories:
• Ordinary files
• Directory files
• Device files
The reason behind making above distinction is that the significance of a file’s attributes depends on its type.
2.1. Ordinary File:
This is the traditional definition of file. It consist of a stream of data resident on some permanent magic media. We can put anything we want to put into this type of file. This includes all data, source programs, object and executable code, all UNIX commands as well as any files created by user. This file also referred as regular file.
The most common type of ordinary file is the text file. This is just a regular file containing printable characters. The characteristic feature of text files is that the data inside them are divided into groups of lines, with each line terminated by the newline character. This character isn’t visible, and doesn’t appear in hard copy output.
2.2. Directory File:
A directory contains no external data, but keeps some details of the files and sub-directories that it contains. The UNIX file system is organized with a number of such directories and sub-directories. This allows two or more files in separate directories to have the same filename.
A directory file contains two fields for each file- the name of the file, and its identification number (the inode). If a directory house, say, ten files, there will be ten such entries in the directory file. We can’t, however, write directly into a directory file; that power rests only with the kernel. When an ordinary file is created or removed, its corresponding directory file is automatically updated by the kernel.
2.3. Device File:
The definition of a file has been broadened by UNIX to consider even physical devices as files. The definition includes printers, tapes, floppy drives, CD-ROMs, hard disks and terminals.
The device file is special in the sense that any output directed to it will reflect onto the respective physical device associated with the filename. When we issue a command to print a file, we are really directing the file’s output to the file associated with the printer. The kernel takes care of this by mapping special filename to their respective devices.
2.4. Basic File Attributes:
Every file has a name and data. In addition all operating systems associate other information with each file, for example, file type, owner etc. We will call these extra items the file attributes. Some basic file attributes are:-
• File type and permissions: Shows the type of file i.e. ordinary, directory etc. and permissions as read, write etc.
• Links: It indicates the number of links associated with the file. This is actually the number of filenames maintained by the system of that file.
• Ownership: When one creates a file he automatically becomes the owner. The owner has certain privileges not normally available with others.
• Group ownership: Defines the group relating properties.
• File size: Contains the size of file in bytes, i.e., the amount of data it contains. It is only the character count of the file and not a measure of the disk space it occupies.
• File modification time: Shows last modification time of the file. A file is said to be modified only if its contents have been changed in any way. If we change only the permission or ownership, the modification time remains unchanged.
• File name: In UNIX filename can be very long(up to 255 characters), and can be framed by using practically any character.
3. Implementation of files Users are concerned with how files are named, what operations are allowed on them and similar interface issues. While an implementer is interested in how files and Directories are stored, how a disk space is managed, and how makes everything work efficiently and reliably. In UNIX every file associates a little table for keeping track of which block belongs to which file. That table is called Index-node (i-node), which lists the attributes and disk addresses of file’s blocks.
3.1. I-node table
A UNIX file is described by an information block called an i-node. There is an i-node on disc for every file on the disc and there is also a copy in kernel memory for every open file. All the information about a file, other than it's name, is stored in the i-node. This information includes
• File access and type information, collectively known as the mode.
• File ownership information.
• Time stamps for last modification, last access and last mode modification.
• Link count.
• File size in bytes.
• Addresses of physical blocks.
The layout of the components of a System i-node is shown in the following diagram. It occupies 16 32-bit words.
There are 13 physical block addresses in an i-node, each of these addresses is 3 bytes long. The first ten block addresses refer directly to data blocks, the next refers to a first level index block (which holds the addresses of further data
Reply

Important Note..!

If you are not satisfied with above reply ,..Please

ASK HERE

So that we will collect data for you and will made reply to the request....OR try below "QUICK REPLY" box to add a reply to this page
Popular Searches: filename in c, seminar of memory management in unix operating system ppt, unix 4sem questions paper vtu, unselect from vi editor in unix rejalt list, unix system project ideas, virtual file system in unix, rsa key generation in unix,

[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Possibly Related Threads...
Thread Author Replies Views Last Post
  Crime File management project topics 11 15,724 11-04-2014, 04:23 PM
Last Post: babs01
  E -Crime File Management System seminar class 8 13,452 24-06-2013, 10:02 AM
Last Post: computer topic
Wink Cross platform IDE for UNIX based C systems. computer science crazy 2 2,238 20-06-2013, 10:35 AM
Last Post: computer topic
  crime file system project topics 9 12,399 29-04-2013, 11:39 AM
Last Post: computer topic
  File tracking system mechanical engineering crazy 24 12,984 13-03-2013, 03:28 PM
Last Post: computer idea
  Secure Multipart File Transfer projectsofme 4 3,758 07-03-2013, 05:16 PM
Last Post: Guest
  File Compression Sunzip project topics 1 2,618 13-02-2012, 11:25 AM
Last Post: yamini chandrika
  Semantic-Aware Metadata Organization Paradigm in Next-Generation File Systems Projects9 0 1,186 23-01-2012, 05:24 PM
Last Post: Projects9
  File Sharing Virtual Network (FSVN) project report tiger 1 2,273 23-01-2012, 10:10 AM
Last Post: seminar addict
  File Splitter project topics 8 5,280 26-10-2011, 09:35 AM
Last Post: seminar addict

Forum Jump: