.. _OSenv: The Operating System Environment ============================================== Some OS Tasks ---------------------------- 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. 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. 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. 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. 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. OS Efficiency Functions ------------------------ 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. 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.