[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
General Programming Concepts: Writing and Debugging Programs

Chapter 5. File Systems and Directories

A file is a one-dimensional array of bytes that can contain ASCII or binary information. In this operating system, files can contain data, shell scripts, and programs. File names are also used to represent abstract objects such as sockets or device drivers.

Internally, files are represented by index nodes (i-nodes). Within this file system, an i-node is a 128-byte structure that contains all access, timestamp, ownership, and data location information for each file. Pointers within the i-node structure designate the real disk address of the data blocks associated with the file. An i-node is identified by an offset number (i-number) and has no file name information. The connection of i-numbers and file names is called a link.

File names exist only in directories. Directories are a unique type of file that give hierarchical structure to the file system. Directories contain directory entries. Each directory entry contains a file name and an i-number.

The journaled file system (JFS) is native to this operating system. The file system links the file and directory data to the structure used by storage and retrieval mechanisms. This chapter contains the following sections that further describe the journaled file system programming model:

Related Information

Linking Files and Directories

File Systems Overview for System Management

List of Files and Directories Subroutines

Header Files Overview

Virtual File System Overview

Processes Overview

Input and Output Handling Programmer's Overview

Understanding System Memory Allocation

Special Files Overview

Network File System (NFS) Overview for System Management

Bach, Maurice. The Design of the UNIX Operating System. Englewood Cliffs, NJ: Prentice-Hall Press, 1986.

Leffler, Samuel J., McKusic, Marshall Kirk, Karels, Michael J., Quarterman, John S. The Design and Implementation of the 4.3 BSD UNIX Operating System. USA: Addison-Wesley Publishing Company, 1989.

Kernighan, Brian W., Pike, Rob. The UNIX Programming Environment. Englewood Cliffs, NJ: Prentice-Hall Press, 1984.


[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]