Files and File Systems
Everyone has created a word processing document and stored it on a
computer. The general purpose word used to describe the document is
file. A file consists of data
that can be manipulated as one entity. For example, several things
that can be done to files as a whole are in the following list.
Users also need to be able to do other things like send them across networks and print them.
Each file needs to have a unique name, at least relative to the other files are are directly around it.
There are many different types of files that are almost always determined by the types of applications in which they are used. For example, files developed in Microsoft Word have particular formats and extensions that make them incompatible with most other programs. For example, you couldn't compile them in a C++ compiler or edit them in a photo processor.
File Types. The following table contains a description of a variety of application programs, their standard file extension and file types.
|File Extension||File Type||Description||Associated Programs|
|.avi||Audio/Video||Movie file||Media Players|
|.bmp||Bitmap||Graphics file||Image Viewers|
|.doc||Document||Word Processing Document||Word Processing Programs|
|.gif||Graphics Interchange Format Picture||Compressed graphics file can also be used in animations||Image Viewers and Web Browsers|
|.hlp||Help||Help data files||Text editors|
|.htm/.html||HTML||Web pages including hypertext links||Web Browsers|
|.ini||Initialization||Configuration files||OSs use these to set configurations|
|.jpg/.jpeg||JPEG Picture||Compressed graphics file||Image Viewers and Web Browsers|
|.mid/.midi||Musical Instrument Digital Interface||Sound files for synthesized music||Media players|
|Portable Document Format||High quality, portable text and graphics documents||Adobe Readers|
|.ra||Real Audio||High quality audio files||RealPlayer|
|.rtf||Rich Text Format||Formatted text files||Word processors or text editors|
|.tar||Tape Archive||UNIX archive files||UNIX commands|
|.tif/.tiff||Tagged Image Format||High quality graphics format||Image viewers|
|.wav||Waveform Sound File||Sound||Media Players|
Files stored on secondary storage devices such as hard drives, floppies
and CDs need to be organized so they can be located and worked with.
The overall approach used to place, retrieve and do other manipulations on
files is called the file system.
Different OSs implement different file systems. Some operating systems can make use of more than one file system. For example, early Windows 3.x could use only the FAT16 (File Allocation Table) file system. Windows 2000 can use FAT16, FAT32 or NTFS.
The file system determines naming conventions and the format for specifying a path or route to a file's location. Naming conventions vary from system to system. The following list contains some fairly common, though far from universal naming conventions.
Pathnames can function in one of the two ways contained in the following list.
C:\Documents and Settings\fox\My Documents\NetworkingUndergrad\filename.ext
These sorts of paths are consistent across operating systems except that there is usually a distinction between using forward and backward slashes. Windows and OS/2 use backslashes. UNIX and Linux use forward slashes.
Most popular operating systems use trees as the basic structure for the file system. This is true of MS-DOS, all Windows, Macintosh, OS/2, UNIX and Linux. The root is at the top and containers called directories or folders are created below the root. These directories or folders can contain other directories or folders. Any given folder cannot contain either two files or two folders/directories with the same name. This guarantees unique naming and storage locations even if you use the same names someplace else within a tree.
Popular File Systems. The following list displays what are probably the most widely used files systems.
We will now survey some of the basic features of each of these file systems.
|/bin||contains executable binary files which are commands or utilities for everyday operation|
|/dev||contains special files that represent physical devices such as printers|
|/etc||contains commands and system files used for system administration|
|/lib||contains libraries used by programs|
|/tmp||contains temporary files which are removed when the system reboots|
|/usr||contains user's home directories along with other files such as the online manual|
Data and Disk Partitions. Hard disks have become the industry standard for data storage on desktops. The size of these disks can vary greatly depending on the age and cost. A hard disk is often made up of a stack of disks. Data is stored in concentric circles on the disk called tracks. The disk drive has two heads that read and write data. The heads are in relatively fixed positions and the disks rotate to enable access to different portions of the disk. Obviously data access speeds depend on the rotation speeds and seek times.
Data stored on a disk is accessed according to its sector, track and cylinder. A cylinder is all of the tracks in the same position on each disk in the stack. A sector is a division of a track. All file systems must map the precise location of data on a disk in order to retrieve it again in the future.
Many disks are very large and it can be worthwhile to partition them. Each of these partitions will appear as different drives in the file system with a different letter assigned as if it were a different physical disk. This can be useful to do things like physically separate application programs from data from documents and so on. You can also provide some internal backup on different partitions.
It may also be possible to make use of different file systems on different partitions. It may also be possible to make use of different operating systems on different partitions.
Microsoft, with Windows 2000, allows for the creation of volumes, which are like partitions except they can be dynamically resized.
Due to the extra effort involved in getting data off of a hard disk, access times are slower than those for making use of RAM.