================ Start Lecture #16 ================

Review midterm answers

Hand out lab2

4.1.2: File structure

A file is a

  1. Byte stream
  2. (fixed size) Record stream: Out of date

  3. Varied and complicated beast

4.1.3: File types

Examples

  1. (Regular) files

  2. Directories: studied below

  3. Special files (for devices)
  4. ``Symbolic'' Links (similar to ``shortcuts''): Also studied below.

``Magic number'': Identifies an executable file.

Strongly typed files: Easy (hopefully normal) case easier (and safer) hard case harder.

4.1.4: File access

Basically two possibilities, sequential access and random access (a.k.a. direct access). Previously, files were declared to be sequential or random. Modern systems do not do this.

  1. Sequential access where the bytes (or records) are accessed in order (i.e., n-1, n, n+1, ...) is most common and gives the highest performance. For some devices (e.g. tapes) access ``must'' be sequential.
  2. In random access, the bytes are accessed in any order. Thus each access must specify which bytes are desired.

4.1.5: File attributes

A laundry list of properties that can be specified for a file, e.g.