Operating System Design/Introduction

From Wikibooks, open books for an open world
Jump to: navigation, search

An operating system, often abbreviated OS, is the underlying software that directly interacts with the hardware of the platform and provides an environment for user applications to run.

Tasks[edit]

An operating system has several capabilities that it must provide:

Hardware control[edit]

See also: Operating System Design/Processes/Scheduling and Operating System Design/Memory Management

Hardware in a modern computer has too much variety for control mechanisms to be hard-coded. In the old days, each application had to provide its own drivers to be able to use the hardware. Because of the diversity of today's hardware, most operating systems abstract the implementation details from the application using the hardware. The operating system thus needs a mechanism to reliably juggle the various needs of the underlining platform. This is provided through a driver mechanism, and through this the operating system can keep the hardware in check.

In addition, multitasking would be impractical, if not impossible, without an operating system to manage the sharing of resources between competing applications. Each application would have to access and control the resources itself while voluntarily giving up control of the hardware occasionally (as was once common, called cooperative multitasking). This scenario has obvious implications in security and stability, as third-party applications in general cannot be trusted with direct hardware access. Therefore the operating system must schedule application processes (called pre-emptive scheduling) to have access to the processor according to an algorithm that may be modified by many factors.

Software environment[edit]

Applications need a safe and easy way to access hardware. Whether it be allocating memory, writing a file to permanent storage, playing a sound file, or showing a movie, at some point the application will need to call a function provided by the operating system. This is provided through an API, or Application Programming Interface. A well-rounded API will prevent code duplication and thus leave the application developer free to implement the needed behavior without hassle.

User interface[edit]

Most operating systems are going to need some way for the user to operate them on a day-to-day basis. The interface should generally be efficient for power users, while still holding the hands of less technically proficient users. The interface can be either graphical or text-based.

Components[edit]

Operating Systems generally consist of several parts. Principal parts are

  1. The Kernel, which is the "core" of the OS.
  2. The Libraries, which provide an array of functions to applications.
  3. Drivers, for interacting with, and controlling external hardware.

Also the operating system will come with

  1. The Boot Mechanism, which loads the kernel into memory.
  2. A Command Interpreter, or "shell", that takes input from the user.

An OS might also implement a file system for storing data.

Some OSs allow only one program to run at a time, but many new OS's allow multiple applications to run almost simultaneously. Such operating systems are called "Multitasking Operating Systems". Some OS's are very large, and depend on the user for input, but other OS's are very small, and are expected to do work without human intervention. The first type are the desktop OS's, and the second type are the "Real-Time" OS's.

Further Reading[edit]


Previous: Preface Forward: Case studies