MECH 2301 Lecture Notes - Lecture 7: Computer File
![](https://new-preview-html.oneclass.com/Z7g9MEk45YyLQAbWP5wKm3qP8rleDpO6/bg1.png)
MECH 2301 Lecture 7 Notes
Introduction
The logical and physical view of files
• You will see how the file manager finds and allocates space for files, and how it reclaims
and keeps track of space vacated when a file is moved or deleted.
• We hope that, as a result of the discussion, you will be able to use and manage
computer file systems more effectively.
• Whether on computer or paper, a file is an organized collection of data.
• The organization of the file depends on the use of the data and is determined by the
program or user who created the file.
• Similarly, the meaning of the data in the file is established by the program or user.
• A computer file may be as simple as a single data stream that represents an entire
program to be loaded at one time or a collection of text data read sequentially
• As complex as a database made up of individual records, each with many fields and
subfields, to be retrieved one or a few records at a time in some random order.
• Nearly all data in the computer is stored and retrieved as files.
• Thus, files may take many different forms.
• Here are a few examples of common forms files might take
• A program file consisting of binary data
• The bytes of data in the file represent the sequence of instructions that make up a
program.
• The file is stored on a device such as disk and is loaded sequentially into succeeding
locations in memory for execution.
• A data file consisting of alphanumeric Unicode text that represents a program in source
code form and will serve as ͚͚data͛͛ input to a C++ compiler.
• A data file consisting of a sequence of numbers stored in ASCII format and separated by
delimiters that will be used as input to a program that does data analysis.
find more resources at oneclass.com
find more resources at oneclass.com