Basic Concepts, Characteristics, and Functions

The Basic Concept of an Operating System

What is an operating system?

An operating system (OS) is system software that manages and controls the hardware and software resources of a computer, providing users and applications with an interface and a set of services. It is the most important piece of system software in any computer system, and the bridge between the user and the underlying hardware.

Defining the operating system

An operating system can be described from four angles at once:

  • Resource manager: manages hardware resources such as the CPU, memory, and peripheral devices
  • Service provider: exposes service interfaces that applications can call into
  • User interface: gives users a friendly way to work with the machine
  • System coordinator: coordinates the concurrent execution of multiple programs

The Basic Characteristics of an Operating System

1. Concurrency

Definition: multiple programs or processes execute at the same time within the same period of time.

Characteristics:

  • Concurrent at the macro level, interleaved at the micro level
  • Achieved by rotating the CPU among the programs with time slices
  • Raises the utilization of system resources

Example:

RunningWaitingConcurrently in macro terms · interleaved in micro terms
Process ARun
Process BRun
Process CRun
Time slice 1Time slice 2Time slice 3

2. Sharing

Definition: a resource in the system can be used jointly by several concurrently running programs.

Modes of sharing:

  • Mutual exclusion sharing: the resource can be used by only one program at a time
  • Simultaneous sharing: the resource can be used by several programs at the same time

Typical shared resources:

  • CPU time
  • Memory space
  • Peripheral devices (printers, disks, and so on)
  • Files and data

3. Virtualization

Definition: a technique that turns a single physical entity into several logical counterparts.

Kinds of virtualization:

  • CPU virtualization: multiprogramming, so that each user feels as if they own the CPU
  • Memory virtualization: virtual memory, which offers an address space larger than physical memory
  • Device virtualization: virtual printers, virtual disks, and the like

Example:

Physical Memory4 GBA single entity, shared by all
Process 14 GB virtual address space
Process 24 GB virtual address space
Process 34 GB virtual address space
Each process believes it owns the full 4 GB

4. Asynchronism

Definition: a program does not run to completion in one go. It moves forward in fits and starts, at a pace that cannot be predicted.

Causes:

  • Competition for resources
  • System scheduling
  • External events (I/O operations)

Characteristics:

  • The order in which programs execute cannot be predicted
  • Synchronization mechanisms are needed to guarantee correctness
  • Improves the responsiveness of the system

The Core Functions of an Operating System

1. Process Management

Main tasks:

  • Creating, terminating, and scheduling processes
  • Communication and synchronization between processes
  • Preventing and detecting deadlocks

What it manages:

  • The process control block (PCB)
  • Process scheduling algorithms
  • Transitions between process states

2. Memory Management

Main tasks:

  • Allocating and reclaiming memory
  • Address translation
  • Memory protection

Management techniques:

  • Partitioning
  • Paging
  • Segmentation
  • Virtual memory

3. File Management

Main tasks:

  • Creating, deleting, reading, and writing files
  • Directory management
  • Managing file storage space

What it manages:

  • The structure of the file system
  • File access control
  • File backup and recovery

4. Device Management

Main tasks:

  • Allocating and reclaiming devices
  • Managing device drivers
  • Controlling I/O

Management techniques:

  • Interrupt handling
  • DMA (Direct Memory Access)
  • Buffer management

5. User Interface

Kinds of interface:

  • Command-line interface (CLI): you interact with the system by typing commands
  • Graphical user interface (GUI): you interact with the system through a graphical interface
  • Program interface (API): applications call system services through it

Why Operating Systems Matter

1. For users

  • Simpler operation: users never have to know the details of the hardware
  • Higher productivity: multitasking lets more work get done in the same amount of time
  • Data protection: the system guards the user’s data and privacy

2. For applications

  • A standard interface: one unified set of system calls for every program to use
  • Resource management: hardware resources are managed automatically
  • Error handling: the system detects failures and provides a way to recover from them

3. For hardware

  • Hardware abstraction: the complexity of the hardware is hidden away
  • Resource optimization: hardware utilization goes up
  • Compatibility: many different hardware platforms are supported

Glossary

TermAbbreviationExplanation
Operating SystemOSSystem software that manages hardware and software resources
Kernel-The core part of an operating system
System Call-The interface through which an application requests services from the kernel
Kernel Mode-Privileged execution mode, with access to every resource
User Mode-Unprivileged execution mode, with restricted access
Concurrency-Several tasks execute in an interleaved fashion
Parallelism-Several tasks execute at the same time
Sharing-Several tasks share the same system resources
Virtual-Physical resources are presented to programs as logical resources
Asynchronous-The moment at which an event happens is not deterministic
Interrupt-An external device asks the CPU to handle something
Exception-An abnormal event during program execution
Trap-A deliberately triggered exception (a system call)
Process Management-Creation, scheduling, and termination of processes
Memory Management-Allocation, reclamation, and protection of memory
File Management-Storage, retrieval, and protection of files
Device Management-Control and management of I/O devices
Job Management-Scheduling and control of jobs
Multiprogramming-Several programs are held in memory at the same time
Time-Sharing System-Several users share the computer in time slices
Real-Time System-A system with strict timing constraints

Found an issue with this content?

Tell us what could be improved.