HPlogo Understanding Your System: HP 3000 Series 9X8LX Computer Systems > Chapter 3 What Are Files?

Where Are Files?

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

Files are kept on disks (unless they are stored on tape), and it is logical to assume that computers keep the contents of a single disk file in one, single location. In fact, computers almost never do that.

What they really do is to keep the contents of a single disk file in one identity. You control the identity of files by giving them names.

Disk memory

A phonograph disk is the device that comes closest to the behavior of a computer's memory disk. But the phonograph disk allows you to play back (retrieve) only what is recorded on it. Magnetic or digital tape of the sort used to record music does permit both recording (input) and playback (output).

Still, tape has one serious drawback. In order to hear the music recorded in the middle of the tape, you must first play the music at the front of the tape and wait. With a phonograph, you can position the tone arm of the phonograph to play music from any place on the phonograph record.

Computer memory disks combine the best of both: like tapes, disks can record and retrieve information. Like the phonograph, computer disks have a "tone arm," called a read-write head, that records and retrieves information from any location on the disk.

There is one serious complication. At any moment, several people may be recording or retrieving information. None of them wants to wait his or her turn while someone else records or retrieves information.

Two solutions are combined in computer disk management:

  • The recording and retrieving of information occur at breathtaking speed.

  • Information is recorded in small chunks, called segments, that are scattered in locations all across the disk.

This sounds like a prescription for chaos. In fact, it is accomplished in a highly efficient manner. More to the point, you do not need to worry that the computer will lose one of the segments of any of your files.

File recording

File segments are written (recorded) in tracks on a disk. A track, like the groove in a record, is a prescribed path for the read-write head of the disk to follow.

If three people are recording information at the same time, the computer writes a segment of information for the first person, a segment for the next person, and a segment for the next person. Then it repeats the process beginning again with the first person. It continues in this fashion until all of the information for all three people is written to the disk. Along the way, there is no attempt to keep all of the related segments together. Instead, the computer creates a map for itself to direct it to all of all the segments it records.

TIP: While everyone using the computer is recording and retrieving information from the disk, the computer itself is busy reading and writing information for its own purposes, keeping track of everything it needs to know about its own operations and about your work.

Pointing to the right pieces

Controlling the location of a file on the disk is the computer's job. Your part consists of controlling the identity of the files by giving names to the files you create. For the most part, you will give names to files while using a particular program that stores information in files. Using the EDIT/3000 program's command KEEP allows you to name the file that you save to disk. In a few cases, however, the program itself will give names to files that it uses for its own purposes.

TIP: Many programs create temporary files. These serve as holding places--"scratch pads," if you prefer--while work is in progress. When the work is completed, the program that created the temporary file writes the final version of the work in a permanent file and erases the temporary file.

The computer keeps a record of the names (and creators) of all files created. This record is kept in still another, special file that the computer itself creates and names.

Along with the name of each file, the computer records the location on the disk where the first segment of every file is to be found. While you are recording information in files, while the computer is laying down segments of files, the computer keeps careful records of the location of each segment of every file.

The naming of files

Every computer system has rules about the names that you give to files.

Within those rules, you are free to have user names, account names, group names, and passwords of almost any sort. For a summary of MPE and HFS syntax and naming rules, see the following Table.

Table 3-1 Summary of MPE/iX CI Limits

FeatureHFS SyntaxMPE Syntax
Maximum directory depth512 (/1/2/.../512)3 (file, group, account)
Maximum number of characters in a componentUp to 255 for files or directories under HFS directories8 for accounts, groups, or files
Use of MPE syntax or HFS syntaxInitial slash (/) or dot (.) in the CI means use HFS syntax; only HFS syntax is used in the MPE/iX shellLack of an initial / or . in the CI means use MPE syntax
File referencing directionTop-down (/ACCT/GRP/file)Bottom-up (FILE.GRP.ACCT)
Pathname separatorsSlashes (/)Dots (.)
Case sensitivityYes (FILE1 and file1 are two different files.)No (Lowercase automatically upshifts to uppercase.)
File locationUnder any directory, /, account, or groupUnder a group only
Maximum characters in pathname253 for relative pathnames (./253chars), and 254 for absolute names (/254chars)26 (8 times 3) +2
LockwordsNot allowedMEMO/A3 is a file named MEMO with a lockword called A3
Specifying remote environmentNot allowedRemote environment specified using envid
File equations(1) Allowed only on right side of equation; (2) Cannot backreference a file using HFS syntaxAllowed on both sides of the equation; backreferencing done by preceding name with asterisk (*)

 

Table 3-1 summarizes the primary differences between HFS and MPE syntax as it operates in the command interpreter (CI). The CI poses some constraints on component and pathname lengths, and maximum directory depth due to the length of the command buffer. (The term component refers to a file, account, group, directory, or fileset).

Unless it is your job to set up the computer, you will probably find that whoever did set up the computer has already established account names, group names, and user names by the time you start working with the computer.

Feedback to webmaster