Skip navigation

FUNCTIONS OF AN OPERATING SYSTEM

The functions of an operating system are:

  1. Job scheduling
  2. Resource control and allocation
  3. Input/output handling
  4. Memory management
  5. Error handling
  6. Job sequencing
  7. Interrupt handling
  8. Communication control management

Job scheduling
The processor can only handle one task at a time.Therefore,the operating system has to determine which task will be processed first and makes sure that the one that is currently being processed is closely monitored to avoid wasting time in the processor.The criteria for selecting which task will come before the other depends on many factors.For example,the operating system may decide to process smaller tasks before larger ones.

Job scheduling may also be based on first in first out(FIFO),Last in first out(LIFO) or round robin.

Resource control and allocation
In order for the processor to be able to recognize and priorities the use and requests for resources,it gives each resource a unique identification number
called an interrupt request number(IRQ).Hence when two tasks request to use a resource at the same time,the one with higher priority interrupt is granted control.This can be compared to the priority given to the presidential motorcade on a busy road.Secondly,the operating system tries as much as possible to avoid a situation where a particular task holds a needed resource and refuses to release it for use by other tasks.When several tasks do this,an undesirable situation called deadlock occurs.

Therefore,resource control and allocation is a core operating system function because it determines which task uses a particular resource and at what time.

Input/output handling
Every computer has many input and output devices(I/O).Like a skilled traffic officer,the operating system coordinates between these various I/O and other peripheral devices such as auxiliary storage devices,making sure that data flows properly between them and sorting out any possible confusion.For example,when printing,the CPU directs its attention to the printing function.
The operating system searches for the printer,chooses the correct one,translates the name for the CPU and finally the CPU sends the document to the
printer.This then makes the CPU available for other activities.

Memory management
All data and instructions must be temporarily held in the main memory before and after processing.The operating system allocate itself memory and ensures that each program has enough memory to execute processes.It also ensures that one process does not use the memory that has been allocated  to another process.

A computer has three general types of memory.In order of speed;they are:high cache,main memory,secondary memory.

Error handling
The operating system has many ways of alerting the user,of errors that may arise out of illegal operations,hardware or software failure.Many operating system usually express what the error is,and where possible make suggestions on how to correct the error.The operating system does this by monitoring the status of the computer system and performing error checks on both hardware and the software.

Job sequencing
The operating system keeps a list of jobs or tasks currently being run and clocks them in and out of the processor.It also arranges them in a particular order to make it easy for the processor to execute them and to know how and when to fetch instructions and data for each task.

Interrupt handling
An interrupt is a break from the normal sequential processing of instructions in a program.An external request causes the processor to stop executing the current task,and do something else before returning the control back to the program that was interrupted.

Each hardware device communicates to the processor using a special number called the interrupt request number(IRQ number).

Communication control management

The OS is responsible for communication protocols in the computer.The term protocol refers to the rules that govern communication between devices on a network.

Other functions include

Program loading-It is the work of the OS to load programs or sub-programs into the RAM.

Supporting filing system-The OS allows organization of files into directories and sub-directories.

Disk management-The OS is responsible for performing tasks such as formatting,defragmenting,compression,system backup and partitioning.

System security-The OS controls access to the system and specific system resources.