go to previous page   go to home page   hear noise   go to next page

Answer:

In modern computer systems, only the operating system can directly do anything with disk files. How does this:

  1. affect the security of the system?
    • The security is increased because programs that try to do dangerous or stupid things to files can't. They have to ask the operating system, which will only do safe and sensible things.
  2. affect computer games?
    • Older computer games did their file manipulation themselves without asking the operating system (old DOS was stupid and slow and many application programs ignored it.) Those games won't run on modern computers.
  3. affect the ease in creating programs?
    • Program creation is easier because the work of dealing with files is done by the operating system.

Types of Files

As far as the hard disk is concerned, all files are the same. At the electronic level, there is no difference between a file containing a program and a file containing data. All files are named collections of bytes. Of course, what the files are used for is different. The operating system can take a program file, copy it into main memory, and start it running. The operating system can take a data file, and supply its information to a running program when it asks.

Often then last part of a file's name (the extension) shows what the file is expected to be used for. For example, in mydata.txt the .txt means that the file is expected to be used as a collection of text, that is, characters. With doom.exe the .exe means that the file is an "executable," that is, a program that is ready to run. With program1.java the .java means that the file is a source program in the language Java (there will be more about source programs later on in these notes.) To the hard disk, each of these files is the same sort of thing: a collection of bytes.

QUESTION 14:

What happens when a file is used in a way other than its intended use? For example, what happens if you try to use a word processor on an ".EXE" file?