1.10. The Operating System Environment

1.10.1. Some OS Tasks

1.10.1.1. Program Execution

An OS has to be able to load a program into memory and run that program. Also, this program needs to be able to end execution, whether normally or abnormally.

1.10.1.2. I/O Operations

  • A running program may require I/O in the form of a file or an output device.
  • Due to a security or efficiency need, users often do not control I/O, so the OS must provide the means for I/O.

1.10.1.3. File-system manipulation

  • Programs need to able to read and write to files, also delete, rename, and remove them.
  • It is also necessary that files have permission functionality to provide additional security.

1.10.1.4. Communication

  • Often times one process must communication with another process.
  • Communication may be between the processes of a single computer, or computers connected via a network.
  • Communication may be implemented via shared memory or through message passing.

1.10.1.5. Error detection

  • An OS should be constantly looking for errors, and know how to handle them.
  • For each error, the OS should have an action to take to ensure correct and consistent computing.
  • Debugging facilities enhance user and development usage of the system.

1.10.2. OS Efficiency Functions

1.10.2.1. Resource Allocation

  • Multiple users or jobs require that resources be allocated to each one.
  • Some resources have a special allocation code, while others may have more general request and release code.

1.10.2.2. Protection and Security

  • It should not be possible for one process to interfere with other processes or the OS itself.
  • This means that all access to system resources is controlled.
  • Protecting the system from outside threats is done through authenticating users, and to defending external I/O devices.
  • Log files can help detect and track attempts of outside infiltration.