Browse Lessons
Assign Lesson

Help Teaching subscribers can assign lessons to their students to review online!

Assign Lesson to Students

Share/Like This Page

Operating System

Operating System

Lesson Objectives
  • Hardware vs. software (types) 
  • Operating systems
  • Functions of operating systems in detail
  • Utilities

Hardware vs. software

  • The physical component of the computer is hardware.
  • For example: monitor, keyboard, mouse, etc. The programs that run on the computer are software.
  • Both hardware and software work together for smooth functioning of the computer. 
  • All components communicate with the system using inputs and outputs. 

There are two kinds of software:
  • System software: System software is responsible for running hardware and managing computer systems.  For example: Operating systems, device drivers, utility software, etc.
  • Application software: Application software enables the user to perform a specific task.  For example: A word processor allows the user to store text and simple images, and a web browser displays web pages.

What is an Operating System?
  • Manages the software and hardware that make up the computer system. 
  • Acts as an interface between the user and important applications for managing the computer. 
  • It is software that runs in the background of a computer system. 
  • Some computer systems such as gaming consoles have unique operating systems.
  • Windows, Mac OS X, Linux, and iOS are a few examples of operating systems. 

Functions of an Operating System

Layers in an Operating System

  • The communications between the hardware and applications are processed through an operating system. 
  • An operating system is structured in the form of layers, as shown in the figure. 
  • The user interfaces with the applications installed in the system. 
  • These applications interact with the kernels of the operating system.
  • Kernels are the control center of the operating system. 
  • According to the priority of the requests, the resources are allocated. 
  • The central processing unit (CPU), memory, and other hardware devices are the resources required to process a request from an application. 
  • The response of the operating system is obtained by the user through the user interface. 

Human-Computer Interface

Graphical User Interface (GUI)

Command Line Interface (CLI)

BIOS (Basic Input/Output System)
  • The process of checking for new hardware and running some tests on the hardware when a computer is powered on. 
  • Alternatively called ‘booting up the computer’. 
  • A cold boot denotes the boot routine when a computer is powered on after shutting it down. 
  • Whereas, a warm boot refers to the boot routine when a computer is restarted.
  • BIOS chip is present in the motherboard of a computer. BIOS setup can be modified once the computer is turned on. 

Managing the CPU

  • To run a piece of software, the OS finds the program in the storage drive, loads it to the main memory, and instructs the CPU to start executing the program from the beginning. 


  • An OS can run multiple programs at the same time. 
  • Multiple programs can be copied to RAM at the same time, but only one program is processed at a particular instant. 
  • The programs could be in any of the following three states: Running, waiting, and runnable. 
  • CPUs are extremely fast and can swap between various processes. 
  • The OS controls the CPU and decides which process should be executed at a particular time.
  • When a process is run by a CPU, the other processes are put on hold in a waiting state.

The CPU is switched from running to a runnable process if:
  • A process that is currently running is interrupted by any external event, or 
  • Consumes more than its allocated time.

What is an Interrupt?
  • An interrupt is a signal sent from a device or software to the processor. 
  • The processor will temporarily stop its current process and will service the interrupt signal. 
  • For example: When paper is jammed in a printer, the CPU prompts the user to check the status. 

What is a Buffer?

  • Hardware devices operate at a much lower speed compared to that of the processor. 
  • If the processor is sending data to an output device, it needs to wait for the hardware to complete its operation. 
  • Buffers are temporary memory areas, which hold the data for the output hardware. 
  • Buffers are used to speed up the processor’s operation.
  • Buffers and interrupts are used together for the standard computer functions.

Multi-Tasking: Scheduling
  • Scheduling is to determine how the processes are run and swapped.
  • The operating system may choose the shortest job first or it may choose the one with the longest waiting time first. 
  • This is managed by the operating system.
  • This is very important for efficient and fair processing of all processes. 
  • A scheduler is a module in an operating system that ensures that the processor time is used efficiently. 
  • In a multi-user network, the task of a scheduler is complex because multiple users may request the use of the same application. 
  • It is always designed to allow an equal amount of the processor’s time to all the users along with acceptable response times.
  • It is also responsible for maximizing the throughput of the operating system by always keeping the hardware busy. 

Processor Scheduling: Algorithms
  • First come, first served (FCFS): FCFS works as if all the jobs are placed in a queue. The jobs are processed in the order of their arrival.
  • Shortest job first: The job that is expected to be completed in the shortest amount of time is executed first. Thereafter, the jobs are processed in the order of the execution time. 
  • Round robin: The jobs are considered on a first in, first out basis, but each job is allocated a time slice, which is a limited amount of CPU time. 

  • Shortest remaining time: * The process which is expected to be completed in the shortest remaining time is executed next.  * The number of waiting jobs is reduced.  * The small jobs waiting after big jobs are also completed first.  * A disadvantage of this algorithm is that the user needs to estimate the time required for each job to be completed.  * Suitable for jobs that run regularly in a system where the time taken can be estimated.

  • Multiple-level feedback queues: * The processes are separated into different categories based on their need for the processor and the jobs are placed in different queues.  * The jobs may be transferred from one queue to another.  * This algorithm gives preference to short jobs and jobs that require interaction with I/O devices.  * The speed of I/O devices is slower than that of the processor. * This algorithm tries to keep the I/O devices as busy as possible.  * When a job is using an output device, the other jobs requiring that output device may complete their processing with the processor.

Memory Management

  • The memory is shared efficiently between the processes. 
  • When multiple processes are being run, the OS makes sure that each process has its data and instructions stored in a different memory location. 
  • Hence, the processes do not interfere with each other.
  • In cases where processes need to share some data, these data are stored in a shared location.
  • Consider four processes running at the same time and being allocated memory A, B, C and D as given in the scenario. How can memory space be allocated for process E?

Allocating Memory to a New Process: Segmentation

  • The memory required from process E is split into two parts, as shown. 
  • This way of splitting memory and allocating it to a process is called segmentation.

Allocating memory to new process: Paging

  • Alternatively, the memory can also be split into equally sized blocks called pages. 
  • The information of which page is allocated to which process is maintained in a table.

  • An operating system may use both of these methods to manage memory.

File Management System

  • In order to access a file, the OS needs to know the location of the file. 
  • To retrieve data from the file, an OS needs to know: * the organization structure * the amount of data in the file  * the protocol needed to communicate with the file system
  • Each file in a folder has a unique name and the OS maintains a look-up table that contains information about the location of all the files. 
  • Files are stored in a hierarchical system.


  • Utilities are programs that are installed in a system alongside the operating system.

Maintenance Utilities: Backup

  • To make the system reliable, a copy of all data and files is stored in a separate server or storage drive. 
  • This protects the data from being lost due to failure. 
  • Backup is also useful when the data is accidentally overwritten.

Maintenance Utilities: Disk De-fragmentation
  • When many small files are deleted, small parts of all clusters are free for usage. 
  • If a large file needs to be stored, this file is fragmented into smaller parts and can then be stored in many small clusters. 
  • When this large file is accessed, the read-write head has to move many times and the time taken to access this data increases.  
  • Therefore, a utility software disk-defragmenters are used that reassembles the fragments, and the file appears in continuous sequences of clusters. 
  • Also, the free space now appears as a separate sequence of clusters. 

Maintenance Utilities: Disk Cleaner
  • A storage drive is divided into clusters. 
  • A look-up table for all files with their addresses is present in the drive. 
  • When a file is deleted, its address from the look-up table is also deleted.
  • Now, the address is free to be used for another file. 
  • Commercially available disk cleaners identify and remove the unused, temporary, and cached files to make more free space on the disk.

Maintenance Utilities: Formatting
  • Storage devices need to be formatted to be compatible with the OS. 
  • When a storage device is connected to an OS, the device is formatted automatically.

Security Utilities

Related Worksheets:

Become a Help Teaching Pro subscriber to access premium lessons

Unlimited premium lessons Unlimited premium printables Unlimited online testing

Learn More About Benefits and Options