Files

By: Jesse Miller

Another key concept supported by virtually all operating systems is the file system. A major function of the operating system is to hide the peculiarities of the disks and other I/O devices and present the programmer with a nice, clean abstract model of device-independent files.

System calls are obviously needed to create files, remove files, read files, and write files. Before a file can be read, it must be located on the disk and opened, and after it has been read it should be closed, so calls are provided to do these things.

To provide a place to keep the files, most operating systems have the concept of a directory as a way of grouping files together. System calls are needed to create and remove directories.

Calls are also provided to put an existing file in a directory, and to remove a file from a directory. Directory entries may be either files or other directories. This model also gives rise to hierarchy.

The process and file hierarchies both are organized as trees, but the similarity stops there. Process hierarchies usually are not very deep (more than three levels is unusual), whereas file hierarchies are commonly four, five, or even more levels deep.

Process hierarchies are typically short lived, generally a few minutes at most, whereas the directory hierarchies may exist for years. Ownership and protection also differ for processes and files. Typically, only a parent process may control or even process the files.

Typically, only a parent process may control or even access a child process, but mechanisms nearly always exist to allow files and directories to be read by a wider group than just the owner and administrator.

Every file within the directory hierarchy can be specified by giving its path name from the top of the directory hierarchy, the root directory. Such absolute path names consist of the list of directories that must be traversed from the root directory to get to the file, with slashes separating the components.

At every instant, each process has a current working directory, in which path names not beginning with a slash are looked for. Process can change their working directory by issuing a system call specifying the new working directory.

Quick Note: Taking the Nonsense out of looking for the right spyware remover

If you really want to take the work out of looking for that right Spyware Protection from a go to the Internet and get a or a Free
Download, In order to prevent your vital information from being ripped from your computer get your Remover Today.

Before a file can be read or written, it must be opened, and at which time the permissions are checked. If the access is permitted, the system returns a small integer.

Computers
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 
 • 

» More on Computers
 



Share this article :
Click to see more related articles